On 18 April 2012 11:09, Hite, Christopher wrote: > I can't get the linker plugin to work. > g++: error: -fuse-linker-plugin is not supported in this configuration > > I build a userland binutils and gcc with dependencies. I've tried gold and bfd. Does anyone see anything obvoiusly wrong with this? You mean apart from the fact you're running ./configure to build GCC, despite all the documentation saying not to do that? Also, are you really sure you want to build gmp, mpfr and mpc separately and install them to non-standard locations? You'll need to use ldconfig or set LD_LIBRARY_PATH in order to use the gcc executables. See http://gcc.gnu.org/wiki/InstallingGCC for a simpler approach. > cd gcc-4.7.0 > ./configure --with-gmp=$INSTALLATION/gmp-4.3.2 --with-mpfr=$INSTALLATION/mpfr-2.4.2 --with-mpc=$INSTALLATION/mpc-0.8.2 --with-ppl=$INSTALLATION/ppl-0.11 \ > --enable-cloog-backend=isl --with-cloog=$INSTALLATION/cloog-0.16.2 --prefix=$INSTALLATION/gcc-4.7.0 \ > --enable-languages=c,c++ \ > --enable-lto --with-libelf=$INSTALLATION/libelf-0.8.12 --enable-gold > make install > > cd binutils-2.22 > ./configure --enable-gold --enable-plugins --enable-lto --with-gmp=$INSTALLATION/gmp-4.3.2 --with-mpfr=$INSTALLATION/mpfr-2.4.2 --with-mpc=$INSTALLATION/mpc-0.8.2 \ > --with-ppl=$INSTALLATION/ppl-0.11 --enable-cloog-backend=isl --with-cloog=$INSTALLATION/cloog-0.16.2 --prefix=$INSTALLATION/binutils-2.22 \ > --disable-werror > make all-gold > > > Do I have the order right? No. Install binutils first, then install GCC to the *same* prefix. GCC will automatically use the ld it finds in that location, and as it's a recent version of binutils it will detect that linker plugin support works. If you don't want to install GCC and ld to the same prefix then you can configure GCC with --with-ld=$INSTALLATION/binutils-2.22/bin/ld (and optionally --with-as=$INSTALLATION/binutils-2.22/bin/as) but you still need to install binutils first to do that (think about it: GCC depends on binutils, not the other way around, so install binutils first.) > Someone mentioned an in-tree build to build binutils and gcc together. Is there some doc explaining how to do that? I believe it's not recommended unless you are using the latest sources from svn for both GCC and binutils. Since you're trying to install gcc 4.7.0 and binutils 2.22 the shared top-level config and makefiles might not match.