Currently, it is possible to set the multitarget flag for binutils, but NOT set it for binutils-libs. This is a bug. The ebuild for binutils-libs should forbid a situation like this. Here's why: Suppose you merged sys-devel/binutils-2.25.1-r1 with the multitarget USE flag set in your make.conf. Suppose also that your make.conf does not say anything about sys-libs/binutils-libs. Now, merge sys-libs/binutils-libs. It will be merged *without* multitarget support. You will probably not notice anything weird, until you try to merge some package that requires 'as', the assembler. Let's say you want to merge sci-mathematics/flint-2.5.2-r1 (you will find this version in the 'sage-on-gentoo' overlay, which you can add with layman - make sure to add the 'science' overlay first, it is required). You will be greeted with a segmentation fault: >>> Source prepared. >>> Configuring source in /host/var/tmp/portage/sci-mathematics/flint-2.5.2-r1/work/flint-2.5.2 ... Configuring...x86-Linux Testing __builtin_popcountl...yes Testing __thread...yes Testing fenv...yes FLINT was successfully configured. >>> Source configured. >>> Compiling source in /var/tmp/portage/sci-mathematics/flint-2.5.2-r1/work/flint-2.5.2 ... make -j2 verbose make AT= QUIET_CC= QUIET_CXX= QUIET_AR= make[1]: Entering directory '/var/tmp/portage/sci-mathematics/flint-2.5.2-r1/work/flint-2.5.2' sed "s/ /,/g;s/.*/&,/g" qadic/CPimport.txt > build/CPimport.h if [ "1" -eq "1" ]; then \ make shared; \ fi make[2]: Entering directory '/var/tmp/portage/sci-mathematics/flint-2.5.2-r1/work/flint-2.5.2' i686-pc-linux-gnu-gcc -fPIC -O2 -march=pentium4 -pipe -I/var/tmp/portage/sci-mathematics/flint-2.5.2-r1/work/flint-2.5.2 -I/usr/include -I/usr/include -I/usr/include -c printf.c -o build/printf.lo; i686-pc-linux-gnu-gcc -fPIC -O2 -march=pentium4 -pipe -I/var/tmp/portage/sci-mathematics/flint-2.5.2-r1/work/flint-2.5.2 -I/usr/include -I/usr/include -I/usr/include -c fprintf.c -o build/fprintf.lo; i686-pc-linux-gnu-gcc: internal compiler error: Segmentation fault (program as) Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.gentoo.org/> for instructions. Makefile:258: recipe for target 'build/fprintf.lo' failed make[2]: *** [build/fprintf.lo] Error 4 make[2]: *** Waiting for unfinished jobs.... i686-pc-linux-gnu-gcc: internal compiler error: Segmentation fault (program as) Please submit a full bug report, with preprocessed source if appropriate. As you can see, what is failing is NOT GCC, but 'program as'. 'as' is provided by binutils. Now, you might think that 'as' is broken because of the multitarget flag. Because, if you look at the meaning of this flag: equery uses binutils ... + + multitarget : Adds support to binutils for cross compiling (does not work with gas) and 'gas', as I understand it, is the GNU assembler... But we are not cross-compiling here, so that doesn't make sense. To see it, set the multitarget USE flag for binutils-libs too in your make.conf, re-merge binutils-libs and retry the above: emerge -1 =sys-libs/binutils-libs-2.25.1-r2 binutils-config -l Optional: choose binutils 2.25.1 (for me no.2) just to make sure you use the right version: binutils-config 2 source /etc/profile emerge -1 =sci-mathematics/flint-2.5.2-r1 WOW! No errors this time! Solution ====== The ebuild for binutils-libs should contain a line that enforces the following: IF binutils is merged with the multitarget flag, THEN binutils-libs must enable multitarget too. The same logic should apply to the binutils package: if binutils-libs is merged with multitarget set, then it should be required for binutils too.
the status of binutils-libs should have no impact on binutils itself. the problem is that the flint build itself messes with LD_LIBRARY_PATH. *** This bug has been marked as a duplicate of bug 573868 ***