0

I'm compiling binutils-2.27 with gcc 5.3.0. Here are the configure options:

../binutils-2.27/configure --prefix=$FOO --build=x86_64-redhat-linux --disable-multilib --with-gmp=$FOO --with-mpfr=$FOO --with-mpc=$FOO --with-isl=$FOO --with-system-zlib --enable-lto --enable-ld --enable-gold --enable-plugins

When I run make check, I get

gcc -Bgcctestdir/ -fPIE -g -O2 -Bgcctestdir/ -Wl,-R,.  -o pr20216a_test pr20216a_test-pr20216_main.o pr20216a_test-pr20216_def.o pr20216_gd.o pr20216_ld.o -ldl 
../../../binutils-2.27/gold/testsuite/pr20216_gd.S:13: error: missing expected TLS relocation
../../../binutils-2.27/gold/testsuite/pr20216_gd.S:27: error: missing expected TLS relocation
../../../binutils-2.27/gold/testsuite/pr20216_gd.S:48: error: missing expected TLS relocation
gcctestdir/ld: error: missing expected TLS relocation
../../../binutils-2.27/gold/testsuite/pr20216_ld.S:21: error: missing expected TLS relocation
../../../binutils-2.27/gold/testsuite/pr20216_ld.S:22: error: missing expected TLS relocation
../../../binutils-2.27/gold/testsuite/pr20216_ld.S:33: error: missing expected TLS relocation
../../../binutils-2.27/gold/testsuite/pr20216_ld.S:34: error: missing expected TLS relocation
../../../binutils-2.27/gold/testsuite/pr20216_ld.S:35: error: missing expected TLS relocation
gcctestdir/ld: error: missing expected TLS relocation
collect2: error: ld returned 1 exit status
SU3
  • 5,064
  • 3
  • 35
  • 66

1 Answers1

2

This was caused by a bug in the test suite, where it was accidentally using the system assembler instead of the latest assembler in the build tree. The test was written to expect a relocation that is only produced by a more recent version of gas. It was fixed on Aug. 10 and backported to the 2.27 branch. See the discussion for PR 20216 for more info.

Cary Coutant
  • 606
  • 3
  • 7
  • Is there a way to tell it to use the newly built assembler instead? – SU3 Sep 17 '16 at 19:46
  • You can simply update your copy of the 2.27 branch of binutils, or manually apply the patch from comment #5 of the referenced PR. – Cary Coutant Sep 19 '16 at 00:24