Created attachment 369146 [details] Build log I've got CC=${CHOST}-gcc-4.8.2 and dev-libs/openssl fails to build passing invalid arguments to gcc: >>> Compiling source in /tmp/portage/dev-libs/openssl-1.0.1f/work/openssl-1.0.1f ... make -j8 -j1 depend making depend in crypto... make[1]: Wejście do katalogu '/tmp/portage/dev-libs/openssl-1.0.1f/work/openssl-1.0.1f/crypto' x86_64-pc-linux-gnu-gcc-4.8.2: error: unrecognized command line option ‘--’ x86_64-pc-linux-gnu-gcc-4.8.2: error: unrecognized command line option ‘--’ Looks like this dumb conditional is reponsible for it: util/domd:17: if expr "$MAKEDEPEND" : '.*gcc$' > /dev/null; then which obviously fails to match when gcc is actually versioned. Possible solutions: 1. replace the stupid conditional with build-time check, 2. provide an explicit method of telling the build system that MAKEDEPEND is not makedepend instead of this guessing, 3. stop abusing MAKEDEPEND.
Created attachment 382854 [details, diff] Fix 'make depend' with non-/gcc$/ compilers Two things: 1. replace the $MAKEDEPEND test with simple 'true' since we're always overriding MAKEDEPEND with the compiler, 2. add -Qunused-arguments to CFLAGS when clang is used to silence out the warnings about wrong kind of flags being passed to wrong kind of tool. This fixes a lot of warnings nobody's going to fix and also 'make depend' which failed because it uses -Werror for some reason.
+ 13 Aug 2014; Michał Górny <mgorny@gentoo.org> openssl-0.9.8z_p2.ebuild, + openssl-1.0.1i.ebuild, openssl-1.0.2_beta2.ebuild: + Short-circuit the $MAKEDEPEND-is-gcc to always-on since we are overriding + MAKEDEPEND unconditionally anyway. Pass -Qunused-arguments when clang is used + to silence the unused flag warnings that can not be fixed without major + changes to the build system, and to make -Werror in "make depend" happier. + Fixes build with CC values that do not end with "gcc", bug #499818, and with + clang, bug #417795. Reviewed by Chainsaw.