qt4-build.eclass: [...] # Bug 282984 && Bug 295530 sed -e "s:\(^SYSTEM_VARIABLES\):CC=$(tc-getCC)\nCXX=$(tc-getCXX)\nCFLAGS=\"${CFLAGS}\"\nCXXFLAGS=\"${CXXFLAGS}\"\nLDFLAGS=\"${LDFLAGS}\"\n\1:" \ -i configure || die "sed qmake compilers failed" # bug 321335 if version_is_at_least 4.6; then find ./config.tests/unix -name "*.test" -type f -exec grep -lZ \$MAKE '{}' \; | \ xargs -0 \ sed -e "s:\(\$MAKE\):\1 CC=$(tc-getCC) CXX=$(tc-getCXX) LD=$(tc-getCXX) LINK=$(tc-getCXX):g" \ -i || die "sed test compilers failed" fi [...] CC and CXX (and LD and LINK) need quoting in the same way that CFLAGS, CXXFLAGS and LDFLAGS are quoted. They too can contain whitespace.
I've seen tons of ebuilds without quotes around CC/CXX, does this mean they're all broken? BTW could you show an example of CC/CXX containing spaces please?
(In reply to comment #1) > I've seen tons of ebuilds without quotes around CC/CXX, does this mean they're > all broken? Possibly, but not necessarily. There are cases where quoting CC/CXX would be redundant because the shell doesn't do word splitting anyway. There are also cases where quoting CC/CXX would be wrong because you want the shell to do word splitting, because you're trying to compile something. > BTW could you show an example of CC/CXX containing spaces please? CC="/usr/bin/x86_64-pc-linux-gnu-gcc -specs=/path/to/my/custom/specs/file" But if you just want to test to see what fails and doesn't, you can just as easily use CC="/usr/bin/env gcc". If you do try this, by the way, and notice something breaks, please don't file bug reports here if the wrong quoting is in the upstream package. I'm not going to do that either; those bugs can just go upstream. :)
(In reply to comment #2) Thanks a lot for the explanation! I suppose eqmake4 is broken in a similar way then... around line 252 of qt4-r2.eclass: QMAKE_CC=$(tc-getCC) \ QMAKE_CXX=$(tc-getCXX) \ QMAKE_LINK=$(tc-getCXX) \
Yes, thanks, those should be updated too, in both the qt4-r2 and qt4 eclasses.
Fixed. I didn't fix qt4.eclass because it is deprecated anyway
(In reply to comment #5) > Fixed. I didn't fix qt4.eclass because it is deprecated anyway Looks like the fix [1] is incorrect for qt4-build.eclass. Each quote inside sed argument must be escaped with a backslash. Let's look through the changesets more carefully: sed -e "s:\(\$MAKE\):\1 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getCXX)" LINK="$(tc-getCXX)":g" It is actually (except spaces): sed -e "s:\(\$MAKE\):\1 CC=" \ $(tc-getCC) \ " CXX=" \ $(tc-getCXX) \ " LD=" \ $(tc-getCXX) \ " LINK=" \ $(tc-getCXX) \ ":g" [1] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/qt4-build.eclass?r1=1.80&r2=1.82
Created attachment 246369 [details, diff] escape quotes in qt4-build.eclass
I would like to reopen this bug, but I guess, I can't do it.:(
Reopening per request
Someone fix this please, it's trivial.
Ugh, fixed now. Sorry for taking this long for something as trivial as this... Hope we got it right this time.