On 04/03/25, Philippe Mathieu-Daudé wrote: > > On default macOS I get: > > Program bison found: NO found 2.3 but need: '>=3.0' (/usr/bin/bison) > > Fixed by installing via brew and: > > export PATH=/opt/homebrew/opt/bison/bin:$PATH > > > @@ -401,3 +409,4 @@ analyze_funcs_generated = custom_target( > > hexagon_ss.add(analyze_funcs_generated) > > target_arch += {'hexagon': hexagon_ss} > > +target_system_arch += {'hexagon': hexagon_softmmu_ss} > > But then I get: > [1/1980] Generating target/hexagon/idef_parser_input.preprocessed.h.inc with > a custom command > FAILED: target/hexagon/idef_parser_input.preprocessed.h.inc > target/hexagon/idef-parser/prepare target/hexagon/idef_parser_input.h.inc > -Itarget/hexagon/idef-parser -o > target/hexagon/idef_parser_input.preprocessed.h.inc > target/hexagon/idef_parser_input.h.inc:1:10: fatal error: 'macros.h.inc' > file not found > 1 | #include "macros.h.inc" > | ^~~~~~~~~~~~~~ > # 1 "target/hexagon/idef_parser_input.h.inc" > # 1 "<built-in>" 1 > # 1 "<built-in>" 3 > # 423 "<built-in>" 3 > # 1 "<command line>" 1 > # 1 "<built-in>" 2 > # 1 "target/hexagon/idef_parser_input.h.inc" 2 > > > J4_hintjumpr(in RsV) { > {fHINTJR(RsV);} > } > > J2_loop0r(in RsV, riV) { > { fIMMEXT(riV); fPCALIGN(riV); fWRITE_LOOP_REGS0( fREAD_PC()+riV, RsV); > fSET_LPCFG(0); } > } > [...] > > $ find . -name macros.h.inc > ./target/hexagon/idef-parser/macros.h.inc > > $ cat target/hexagon/idef-parser/prepare > #!/usr/bin/env bash > ... > # Run the preprocessor and drop comments > cpp "$@" > > $ which cpp > /usr/bin/cpp > > $ cpp --version > Apple clang version 16.0.0 (clang-1600.0.26.6) > > Since this works on Linux for user emulation, I suppose this is a > macOS vs Linux issue with default cpp command line arguments...
Hi Phil, yes this is an issue of default arguments added by cpp on mac, I ran into this a little while ago on a downstream fork. cpp on mac expands clang ... -traditional-cpp which alsos break macro concatenation.. I carry a patch which: * Removes indent pass on idef-parser output, as indent is not available on mac; * Replaces cpp with ${compiler} ... -E ... where compiler is gotten from meson. I'm a bit sad about the default meson version being outdated though..:( -- Anton Johansson rev.ng Labs Srl.