Ticket #4821: cmm-suffix-rules.mk.diff

File cmm-suffix-rules.mk.diff, 1.6 KB (added by gwright, 3 years ago)

Patch for cmm-suffix-rules.mk

  • cmm-suffix-rules.mk

    old new  
    2222 
    2323ifneq "$$(BootingFromHc)" "YES" 
    2424 
     25# Below is an unfortunate hack. Expliciting invoking the preprocessor 
     26# breaks the delicate option invocation of the default case. Passing 
     27# "-traditional" as an argument breaks building .cmm files, because .cmm 
     28# files need to have comments stripped out.  However, the "-traditional" 
     29# argument is required in most other cases.  So it is filtered out. 
     30 
    2531$1/$2/build/%.$$($3_way_)o : $1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. 
    26         "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -c $$< -o $$@ 
     32        "$$($1_$2_HC)" $$(filter-out -optP-traditional,$$($1_$2_$3_MOST_HC_OPTS)) -c $$< -o $$@ 
    2733 
    2834$1/$2/build/%.$$($3_way_)o : $1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. 
    29         "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -c $$< -o $$@ 
     35        "$$($1_$2_HC)" $$(filter-out -optP-traditional,$$($1_$2_$3_MOST_HC_OPTS)) -c $$< -o $$@ 
    3036 
    3137$1/$2/build/%.$$($3_way_)hc : $1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. 
    32         "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -C $$< -o $$@ 
     38        "$$($1_$2_HC)" $$(filter-out -optP-traditional,$$($1_$2_$3_MOST_HC_OPTS)) -C $$< -o $$@ 
    3339 
    3440$1/$2/build/%.$$($3_way_)hc : $1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. 
    35         "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -C $$< -o $$@ 
     41        "$$($1_$2_HC)" $$(filter-out -optP-traditional,$$($1_$2_$3_MOST_HC_OPTS)) -C $$< -o $$@ 
    3642 
    3743# XXX 
    3844# When we started using "| $$$$(dir $$$$@)/." for directory deps, these