Re: [OE-core] [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold

2016-09-22 Thread Khem Raj
On Tue, Sep 20, 2016 at 10:30 PM, Andreas Müller
 wrote:
> works around:
> /ld: error: Gperf-simple.o: cannot make copy relocation for 
> protected symbol '_Uarm_local_addr_space', defined in 
> ../src/.libs/libunwind-arm.so
> collect2: error: ld returned 1 exit status
> Makefile:1038: recipe for target 'Gperf-simple' failed
> make[1]: *** [Gperf-simple] Error 1
> make[1]: *** Waiting for unfinished jobs
> <...>
> /ld: error: Lperf-simple.o: cannot make copy relocation for 
> protected symbol '_ULarm_local_addr_space', defined in 
> ../src/.libs/libunwind.so
> collect2: error: ld returned 1 exit status
> Makefile:1094: recipe for target 'Lperf-simple' failed
> make[1]: *** [Lperf-simple] Error 1
> <...>
> ERROR: oe_runmake failed
> /ld: error: Gperf-trace.o: cannot make copy relocation for 
> protected symbol '_Uarm_local_addr_space', defined in 
> ../src/.libs/libunwind-arm.so
> collect2: error: ld returned 1 exit status
> Makefile:1042: recipe for target 'Gperf-trace' failed
> make[1]: *** [Gperf-trace] Error 1
> /ld: error: Lperf-trace.o: cannot make copy relocation for 
> protected symbol '_ULarm_local_addr_space', defined in 
> ../src/.libs/libunwind.so
> collect2: error: ld returned 1 exit status
> Makefile:1098: recipe for target 'Lperf-trace' failed
> make[1]: *** [Lperf-trace] Error 1
> <...>
> /ld: error: test-coredump-unwind.o: cannot make copy 
> relocation for protected symbol '_UCD_accessors', defined in 
> ../src/.libs/libunwind-coredump.so
> collect2: error: ld returned 1 exit status
> Makefile:1186: recipe for target 'test-coredump-unwind' failed
>
> Signed-off-by: Andreas Müller 
> ---
>  meta/recipes-support/libunwind/libunwind_git.bb | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-support/libunwind/libunwind_git.bb 
> b/meta/recipes-support/libunwind/libunwind_git.bb
> index cd4cb89..4249430 100644
> --- a/meta/recipes-support/libunwind/libunwind_git.bb
> +++ b/meta/recipes-support/libunwind/libunwind_git.bb
> @@ -26,3 +26,4 @@ SECURITY_CFLAGS_append_aarch64 = " -fPIE"
>
>  S = "${WORKDIR}/git"
>
> +LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 
> 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"

I dont think we need to check for DISTRO_FEATURE here. Since we want
to always use BFD linker using -fuse-ld=bfd unconditionally is fine
always.

> --
> 2.5.5
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold

2016-09-22 Thread Martin Jansa
On Wed, Sep 21, 2016 at 07:30:43AM +0200, Andreas Müller wrote:
> works around:
> /ld: error: Gperf-simple.o: cannot make copy relocation for 
> protected symbol '_Uarm_local_addr_space', defined in 
> ../src/.libs/libunwind-arm.so
> collect2: error: ld returned 1 exit status
> Makefile:1038: recipe for target 'Gperf-simple' failed
> make[1]: *** [Gperf-simple] Error 1
> make[1]: *** Waiting for unfinished jobs
> <...>
> /ld: error: Lperf-simple.o: cannot make copy relocation for 
> protected symbol '_ULarm_local_addr_space', defined in 
> ../src/.libs/libunwind.so
> collect2: error: ld returned 1 exit status
> Makefile:1094: recipe for target 'Lperf-simple' failed
> make[1]: *** [Lperf-simple] Error 1
> <...>
> ERROR: oe_runmake failed
> /ld: error: Gperf-trace.o: cannot make copy relocation for 
> protected symbol '_Uarm_local_addr_space', defined in 
> ../src/.libs/libunwind-arm.so
> collect2: error: ld returned 1 exit status
> Makefile:1042: recipe for target 'Gperf-trace' failed
> make[1]: *** [Gperf-trace] Error 1
> /ld: error: Lperf-trace.o: cannot make copy relocation for 
> protected symbol '_ULarm_local_addr_space', defined in 
> ../src/.libs/libunwind.so
> collect2: error: ld returned 1 exit status
> Makefile:1098: recipe for target 'Lperf-trace' failed
> make[1]: *** [Lperf-trace] Error 1
> <...>
> /ld: error: test-coredump-unwind.o: cannot make copy 
> relocation for protected symbol '_UCD_accessors', defined in 
> ../src/.libs/libunwind-coredump.so
> collect2: error: ld returned 1 exit status
> Makefile:1186: recipe for target 'test-coredump-unwind' failed

Acked-by: Martin Jansa 

I've verified that this fixes the issue I was reporting in "bitbake
wordl status" e-mails since last binutils upgrade to 2.27

It's basically complement to this oe-core change which went in together
with binutils:

commit 0092a076adb11cac411c86389af84bb96169730f
Author: Khem Raj 
Date:   Mon Aug 8 15:51:01 2016 -0700

libunwind: Do not use gold for linking

Which only stopped gold being used when bfd is the default linker, but
which left libunwind broken for people with ld-is-gold in
DISTRO_FEATURES to use gold by default.

Thanks!

> Signed-off-by: Andreas Müller 
> ---
>  meta/recipes-support/libunwind/libunwind_git.bb | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-support/libunwind/libunwind_git.bb 
> b/meta/recipes-support/libunwind/libunwind_git.bb
> index cd4cb89..4249430 100644
> --- a/meta/recipes-support/libunwind/libunwind_git.bb
> +++ b/meta/recipes-support/libunwind/libunwind_git.bb
> @@ -26,3 +26,4 @@ SECURITY_CFLAGS_append_aarch64 = " -fPIE"
>  
>  S = "${WORKDIR}/git"
>  
> +LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 
> 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
> -- 
> 2.5.5
> 
> -- 
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com


signature.asc
Description: Digital signature
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold

2016-09-20 Thread Andreas Müller
works around:
/ld: error: Gperf-simple.o: cannot make copy relocation for 
protected symbol '_Uarm_local_addr_space', defined in 
../src/.libs/libunwind-arm.so
collect2: error: ld returned 1 exit status
Makefile:1038: recipe for target 'Gperf-simple' failed
make[1]: *** [Gperf-simple] Error 1
make[1]: *** Waiting for unfinished jobs
<...>
/ld: error: Lperf-simple.o: cannot make copy relocation for 
protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
collect2: error: ld returned 1 exit status
Makefile:1094: recipe for target 'Lperf-simple' failed
make[1]: *** [Lperf-simple] Error 1
<...>
ERROR: oe_runmake failed
/ld: error: Gperf-trace.o: cannot make copy relocation for 
protected symbol '_Uarm_local_addr_space', defined in 
../src/.libs/libunwind-arm.so
collect2: error: ld returned 1 exit status
Makefile:1042: recipe for target 'Gperf-trace' failed
make[1]: *** [Gperf-trace] Error 1
/ld: error: Lperf-trace.o: cannot make copy relocation for 
protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
collect2: error: ld returned 1 exit status
Makefile:1098: recipe for target 'Lperf-trace' failed
make[1]: *** [Lperf-trace] Error 1
<...>
/ld: error: test-coredump-unwind.o: cannot make copy relocation 
for protected symbol '_UCD_accessors', defined in 
../src/.libs/libunwind-coredump.so
collect2: error: ld returned 1 exit status
Makefile:1186: recipe for target 'test-coredump-unwind' failed

Signed-off-by: Andreas Müller 
---
 meta/recipes-support/libunwind/libunwind_git.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-support/libunwind/libunwind_git.bb 
b/meta/recipes-support/libunwind/libunwind_git.bb
index cd4cb89..4249430 100644
--- a/meta/recipes-support/libunwind/libunwind_git.bb
+++ b/meta/recipes-support/libunwind/libunwind_git.bb
@@ -26,3 +26,4 @@ SECURITY_CFLAGS_append_aarch64 = " -fPIE"
 
 S = "${WORKDIR}/git"
 
+LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 
'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
-- 
2.5.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core