If CXX is set to g++-3.2 then emerge qt will disrespect that and use g++ instead. How to reproduce: In make.conf: CXX=g++-3.2 run: emerge qt Look for g++-3.2 and g++. g++-3.2 is never there.
do other ebuilds respect it?
Yes. My guess is that arts does not use CXX in the Makefile, but use g++ instead.
The problem is that mkspecs/linux-g++/qmake.conf hardcodes the compiler to g++, regardless. We'll have to do some patching on this one, so I'll have to confer with Dan Armak first.
Dan: Is it advisable to patch this one so close to 1.4 release ? My current suggestion would be to patch the spec file in src_unpack, where we simply remove the CXX setting altogether. This way, the user may toy with switch between compilers by doing CXX="foo" ebuild qt compile, without having to reunpack it between each time.
Yes, that sounds ok. As long as we can be sure $CXX will always be set. Should I check for it not being set?
OK, I've committed a masked test ebuild (3.0.5-r2) that seds qmake.conf to use $CC and $CXX if defined (each separately). Works ok here afaics. Please tell me if this answers.
*** Bug 7316 has been marked as a duplicate of this bug. ***
*** Bug 6053 has been marked as a duplicate of this bug. ***
Is this code actually correct ? # use env's $CC, $CXX if [ -n "$CXX" ]; then einfo 'Using environment definition of $CXX' cp qmake.conf qmake.conf.orig sed -e "s:= cc:= ${CC}:" qmake.conf.orig > qmake.conf fi if [ -n "$CC" ]; then einfo 'Using environment definition of $CC' cp qmake.conf qmake.conf.orig sed -e "s:= g++:= ${CXX}:" qmake.conf.orig > qmake.conf fi Isn't ${CXX} and ${CC} switched ? Apart from that, it works.
Um, yes sorry :-) I've switched it to be correct and committed. I'm going to ask for testing on -core, -dev.
Hello there, noticing that CFLAGS for qt ebuilds are always set to -O2, I was wondering if it would break compilation to "persuade" qmake to use system-wide CFLAGS in the same manner. In some customized ebuild I do source /etc/make.conf && export CC CXX CFLAGS CXXFLAGS and later on, I replace -O2 with $CFLAGS just the way CC and CXX are inserted. I reported this quite some time ago, and the only response was that there was work in progress concerning this issue, but there was no change to the qt-3.0.5-r2 ebuild except the switched CC/CXX issue. Sincerely Chris
Christian: I tried that twice, and came up against various compile issues. They may or may not be still valid with the latest QTs and gcc versions. This is on my todo list but very far down.
I'm shuffling this over to Dan, as this is after all "his" ebuild.
The CC, CXX code is in the latest ebuilds (unmasked for some time now). The CFLAGS thing is still way down the todo list... I think I've got another bug for it somewhere, anyway...