Hello,
Just a quick report that I encounter this bug from time to time:
./.libs/libudev-core.a(libbasic_la-cgroup-util.o):cgroup-util.c:function
cg_ns_supported: error: TLS relocation against invalid instruction
./.libs/libudev-core.a(libbasic_la-cgroup-util.o):cgroup-util.c:function
cg_unified_controller: error: TLS relocation against invalid
instruction
[snip]
against invalid instruction
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:14976: test-udev] Error 1
I checked out if gold was invoked during the build:
(chroot) root:/usr/src/systemd-234-lfs# grep gold config.log
configure:15881: checking if gcc supports flag -Wl,-fuse-ld=gold in
envvar LDFLAGS
configure:15892: gcc -o conftest -O2 -pipe -m64 -m80387
-m128bit-long-double -malign-stringops -malign-data=cacheline
-mfancy-math-387 -mfentry -mfp-ret-in-387 -mglibc -mhard-float
-mieee-fp -mno-sse4 -mred-zone -mstackrealign -mtls-direct-seg-refs
-maccumulate-outgoing-args -mfpmath=sse -mtls-dialect=gnu2
-mincoming-stack-boundary=4 -mpreferred-stack-boundary=4 -fweb
-falign-loops=4 -falign-jumps=4 -falign-labels=4 -falign-functions=4
-Werror -Wl,-fuse-ld=gold conftest.c >&5
LDFLAGS: -Wl,--gc-sections -Wl,--as-needed
-Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -pie -Wl,-fuse-ld=gold
cc_cv_LDFLAGS__Wl__fuse_ld_gold=yes
OUR_LDFLAGS=' -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined
-Wl,-z,relro -Wl,-z,now -pie -Wl,-fuse-ld=gold '
Usually, what trigger the issue is these CFLAGS for which I tested
previously (1-2 months ago) with -fpic and -fPIC on different
combination and it doesn't trigger them.
Usually, I have to force disable gold linking for systemd to solve the
issue more permanently.
I'll try that and report back but a quick google search revealed a bug
reports about the error:
https://lists.gnu.org/archive/html/bug-binutils/2015-03/msg00070.html
I used to find many more back then but it depend on the particular
error message given, always with relocation thought.
Alain
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page