You receive this bug because this package does not respect my system's CXX ( x86_64-pc-linux-gnu-g++ - /usr/bin/x86_64-pc-linux-gnu-g++ ) and calls directly g++ -/usr/bin/g++ The possible solutions to fix this issue are: 1)Fix the buildsystem, if you can 2)inherit toolchain-funcs and use tc-export CXX 3)inherit toolchain-funcs and use emake CXX="$(tc-getCXX)" g++ -c -pipe -g -D_REENTRANT -Wall -W -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.. -I. -Iconsole -Irestore -Iselect -Imoc -Iui -o obj/main.o main.cpp
Inheriting from toolchain-funcs and adding CXX="$(tc-getCXX)" to emake fixes this proble: x86_64-pc-linux-gnu-g++ -c -march=native -O2 -pipe -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.. -I. -Iconsole -Irestore -Iselect -Imoc -Iui -o obj/main.o main.cpp
Fixed version in tree. I hope I got all problems. Thanks for thorough test. + 20 Dec 2012; Thomas Beierlein <tomjbe@gentoo.org> bacula-5.0.3-r3.ebuild: + Fix to respect CXX and CXXFLAGS (bug #447728 and 447730). Make build log + verbose (bug #447806). Fix problems with USE=static. Switch to EAPI=5 and + REQUIRED_USE. Thanks ago and peratu +