[HN Gopher] How to wrap a C compiler and preprocessor, really
       ___________________________________________________________________
        
       How to wrap a C compiler and preprocessor, really
        
       Author : matt_d
       Score  : 70 points
       Date   : 2024-09-06 05:18 UTC (2 days ago)
        
 (HTM) web link (www.humprog.org)
 (TXT) w3m dump (www.humprog.org)
        
       | fuhsnn wrote:
       | I have some experience getting several non-trivial projects to
       | build with a small C compiler [1]. Generally, the more a
       | toolchain resemblance, say GCC, the more GCC specific stuff build
       | scripts will feed to it, this may send you down a rabbit hole of
       | recreating GCC behavior distracting from the intended topic.
       | There are simply too many varying factors in the internal
       | messages between a toolchain's sub-fuctions: versioning, target
       | system, the specific installation's default configuration etc. I
       | have no idea what the author's intended modification are, but it
       | may be actually simpler, and more reliable, to modify a compiler
       | at source level than to provide a drop in injection of a certain
       | stage.
       | 
       | [1] https://github.com/fuhsnn/widcc?tab=readme-ov-
       | file#building-...
        
         | NonEUCitizen wrote:
         | "widcc is based on Rui Ueyama's chibicc"
        
           | senkora wrote:
           | The chibicc commit history is a fun read. It builds up a
           | mostly working C compiler from nothing, adding one small
           | feature on each commit, keeping a working compiler at every
           | step. It really is pleasant and informative to read.
        
       ___________________________________________________________________
       (page generated 2024-09-08 23:01 UTC)