Hi,
Has anyone here had success with using ld.gold? If yes, it'd be great if I could get a few pointers:
1. I primarily use the CLFS book to set-up an x86_64-64 build. Would I need to add gold support in the temporary toolchain as well? In chapter 10.18 of the book, I configured binutils with "--enable-gold" and it compiled fine. I linked /usr/bin/ld to ld.gold and proceeded to compile gcc. But I get this error:
Code:
/tools/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/../../../../x86_64-unknown-linux-gnu/bin/ld: /tmp/ccWICiMC.ltrans0.ltrans.o: relocation R_X86_64_PC32 against undefined symbol `__do_global_dtors_aux' can not be used when making a shared object; recompile with -fPIC
/tools/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/../../../../x86_64-unknown-linux-gnu/bin/ld: final link failed: Bad value
So, at this stage, is the ld from the temp toolchain being used or the one in /usr/bin? If the former is true, then linking to gold was futile, and gold support should have been added earlier?
2. Is it alright to use the LFS book instead of CLFS, for x86_64-64, when both host and target arch are the same? I ask this because I had been advised to use the CLFS book for 64-bit, supposedly because it produced a more stable build.
Thanks in advance.