This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ld-gold, i386 without PIC and "/usr/bin/ld: -f may not be used without -shared"


I'm working on Ubuntu 12.04 with Binutils 2.22. I have a test script
that builds a library under different configurations. The test fails
under the ld-gold test on i386 without PIC. The same test build
without ld.gold is fine.

$ make
...
g++ -DNDEBUG -g2 -O2 -march=native -pipe -c datatest.cpp
...
g++ -o cryptest.exe -DNDEBUG -g2 -O2 -march=native -pipe bench1.o
bench2.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o
regtest.o fipsalgt.o dlltest.o ./libcryptopp.a -pthread
-Wl,-fuse-ld=gold
/usr/bin/ld: -f may not be used without -shared
collect2: ld returned 1 exit status
make: *** [cryptest.exe] Error 1

And:

$ ld.gold -version
GNU gold (GNU Binutils for Ubuntu 2.22) 1.11

My questions are:

  * Is this expected
  * what are the options to work around it?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]