Bug 10300 - libunwind fails to build with ld-is-gold
Summary: libunwind fails to build with ld-is-gold
Status: RESOLVED WORKSFORME
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.5
Assignee: Maxin B. John
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-09-17 21:58 UTC by Jussi Kukkonen
Modified: 2018-02-08 12:24 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jussi Kukkonen 2016-09-17 21:58:08 UTC
gold complains "cannot make copy relocation for protected symbol '_Ux86_local_addr_space'" on qemux86 with ld-is-gold distro feature.



Making all in tests
make[1]: Entering directory '/home/jku/src/poky/build/tmp/work/i586-poky-linux/libunwind/1.1+gitAUTOINC+bc8698fd7e-r0/build/tests'
../i586-poky-linux-libtool  --tag=CC   --mode=link i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/home/jku/src/poky/build/tmp/sysroots/qemux86  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/jku/src/poky/build/tmp/work/i586-poky-linux/libunwind/1.1+gitAUTOINC+bc8698fd7e-r0=/usr/src/debug/libunwind/1.1+gitAUTOINC+bc8698fd7e-r0 -fdebug-prefix-map=/home/jku/src/poky/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/jku/src/poky/build/tmp/sysroots/qemux86=   -fexceptions -Wall -Wsign-compare  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o Gperf-simple Gperf-simple.o ../src/libunwind-x86.la ../src/libunwind.la -latomic_ops 
i586-poky-linux-libtool: link: i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/jku/src/poky/build/tmp/sysroots/qemux86 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/jku/src/poky/build/tmp/work/i586-poky-linux/libunwind/1.1+gitAUTOINC+bc8698fd7e-r0=/usr/src/debug/libunwind/1.1+gitAUTOINC+bc8698fd7e-r0 -fdebug-prefix-map=/home/jku/src/poky/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/jku/src/poky/build/tmp/sysroots/qemux86= -fexceptions -Wall -Wsign-compare -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o .libs/Gperf-simple Gperf-simple.o  ../src/.libs/libunwind-x86.so /home/jku/src/poky/build/tmp/work/i586-poky-linux/libunwind/1.1+gitAUTOINC+bc8698fd7e-r0/build/src/.libs/libunwind.so ../src/.libs/libunwind.so -lc -lgcc_s /home/jku/src/poky/build/tmp/sysroots/qemux86/usr/lib/libatomic_ops.a
/home/jku/src/poky/build/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/6.2.0/ld: error: Gperf-simple.o: cannot make copy relocation for protected symbol '_Ux86_local_addr_space', defined in ../src/.libs/libunwind-x86.so
collect2: error: ld returned 1 exit status
Makefile:1038: recipe for target 'Gperf-simple' failed
make[1]: *** [Gperf-simple] Error 1
make[1]: Leaving directory '/home/jku/src/poky/build/tmp/work/i586-poky-linux/libunwind/1.1+gitAUTOINC+bc8698fd7e-r0/build/tests'
Makefile:595: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
Comment 1 Ross Burton 2016-11-08 17:16:45 UTC
Khem, do you have any thoughts?
Comment 2 Khem Raj 2016-11-08 17:24:45 UTC
I think its related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
Comment 3 Ross Burton 2018-02-06 12:03:43 UTC
Maxin, can you see if the toolchain we have in master has fixed this?
Comment 4 Maxin B. John 2018-02-06 15:15:40 UTC
Hi Ross,

(In reply to comment #3)
> Maxin, can you see if the toolchain we have in master has fixed this?

Fixed in GCC 5.

Built libunwind (qemux86 using ld-is-gold distro feature) with latest master ( commit: dafa1ac8646954fa02db2a3e572adc6a957edd39 ) 

# bitbake libunwind

Build didn't fail.
Comment 5 Maxin B. John 2018-02-08 12:24:54 UTC
Works fine in master.