Open rossburton opened 5 years ago
The usual technique is to carry on the FOR_BUILD
idiom, and respect CFLAGS_FOR_BUILD
etc. Maybe it's time to use something like Meson which does this for you?
I also observe similar breakage with makeguids crashing with invalid opcode because our build scripts compile for particular target architecture which is not supported by the host where makeguids is being executed.
The problem is that util.o
is linked both into makeguids
binary (which should run on the build machine) and target libraries/binaries. Depending on luck either the $build util.o
gets linked into target libraries/binaries, or the target util.o
is linked into makeguids
.
The problem is that
util.o
is linked both intomakeguids
binary (which should run on the build machine) and target libraries/binaries. Depending on luck either the $buildutil.o
gets linked into target libraries/binaries, or the targetutil.o
is linked intomakeguids
.
This has been solved by ca48d3964d26f5e3b38d73655f19b1836b16bd2d
If the native compiler is e.g. gcc 6.3 but the cross compiler is gcc 9, then using the target CFLAGS when building the native makeguids binary could fail if gcc9-specific options were being used.