Please pass CC environment variable. We have a more specific CC instead of cc. e.g) x86_64-pc-linux-gnu-gcc Actual Results: >>> Compiling source in /var/tmp/portage/app-shells/quoter-2.0_p2/work/quoter-2.0_p2 ... make -j1 cc -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c || \ cc -DAVOID_ATTRIBUTE_NORETURN \ -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c || \ cc -DAVOID_BUILTIN_EXPECT \ -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c || \ cc -DAVOID_BUILTIN_EXPECT -DAVOID_ATTRIBUTE_NORETURN \ -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c >>> Source compiled. Expected Results: >>> Compiling source in /var/tmp/portage/app-shells/quoter-2.0_p2/work/quoter-2.0_p2 ... make -j1 x86_64-pc-linux-gnu-gcc -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c || \ x86_64-pc-linux-gnu-gcc -DAVOID_ATTRIBUTE_NORETURN \ -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c || \ x86_64-pc-linux-gnu-gcc -DAVOID_BUILTIN_EXPECT \ -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c || \ x86_64-pc-linux-gnu-gcc -DAVOID_BUILTIN_EXPECT -DAVOID_ATTRIBUTE_NORETURN \ -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c >>> Source compiled.
Created attachment 452406 [details, diff] sample patch for quoter-2.0_p2.ebuild
I am surprised to learn that CC is different than e.g. CFLAGS or LDFLAGS here, i.e., that the mere default of portage is not already doing the right thing for CC automatically, but that an eclass must might used. Thanks for the patch! (I already put it in the mv overlay).
CFLAGS work automatically because it can be accessed via the environment - but CC is not automagically defined anywhere. tc-getCC determines CC based on CHOST, something that some build systems can do automatically.
Can't cross-compile : > cc -DAVOID_BUILTIN_EXPECT -DAVOID_ATTRIBUTE_NORETURN \ > -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -Wl,-O1 \ > -Wl,--as-needed -o bin/quoter src/quoter.c > gcc: error: unrecognized command line option '-mfpu=vfpv3-d16' > gcc: error: unrecognized command line option '-mfloat-abi=hard' > gcc: error: unrecognized command line option '-mfpu=vfpv3-d16' > gcc: error: unrecognized command line option '-mfloat-abi=hard' > gcc: error: unrecognized command line option '-mfpu=vfpv3-d16' > gcc: error: unrecognized command line option '-mfloat-abi=hard' > gcc: error: unrecognized command line option '-mfpu=vfpv3-d16' > gcc: error: unrecognized command line option '-mfloat-abi=hard' > make: *** [Makefile:10: bin/quoter] Error 1 > * ERROR: app-shells/quoter-3.0_p2-r1::gentoo failed (compile phase): > * emake failed