0

I am building gccgo given the instruction here. However, I got error message after I did:

../gccgo/configure --prefix=/opt/gccgo --enable-languages=c,c++,go --with-ld=/opt/gold/bin/ld  
make

Error:

/opt/gold/bin/ld: error: cannot find -lugin
/opt/gold/bin/ld: error: cannot find -lugin-opt=/home/objdir/./gcc/lto-wrapper
/opt/gold/bin/ld: error: cannot find -lugin-opt=-fresolution=/tmp/cc9M7ZGm.res

Here is what source code I used:

os: ubuntu 14.04/x86_64
binutils: http://ftp.gnu.org/gnu/binutils/binutils-2.29.tar.xz
gccgo code brach: https://github.com/gcc-mirror/gcc/tree/gccgo

Is there anything that I missed?

Update: It works for me after I remove the --with-ld==/opt/gold/bin/ld option when running configure for gccgo make. Seems this is an issue related to gold.

Alex
  • 247
  • 3
  • 12

1 Answers1

0

You should pass --enable-plugins to configure when you build binutils to be able to use plugins with ld.gold (the plugin interface is enabled by default for new enough versions of ld.bfd, the traditional GNU linker).

See this bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22500

Vladislav Ivanishin
  • 2,092
  • 16
  • 22