Skip to contentSkip to conversation

binutils: Use target provided zlib

PATCH In review Richard Purdie 3 participants 4 messages Jan 31, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 binutils: Use target provided zlib

When using -fpic (security related cflags), qemux6-64 builds would fail due to linker symbol errors. This was due to the internal zlib that binutils was using.

Add the switch to tell it to use the target system zlib which is already in DEPENDS. That zlib is already compiled with the correct flags.

meta/recipes-devtools/binutils/binutils_2.26.bb +1 -0
index 6f42671..b70ffbf 100644
@@ -7,6 +7,7 @@ EXTRA_OECONF += "--with-sysroot=/ \
                 --enable-install-libbfd \
                 --enable-install-libiberty \
                 --enable-shared \
+                --with-system-zlib \
                 "
 
 EXTRA_OECONF_class-native = "--enable-targets=all \
#1 lore raw
Quoted 7 lines · Richard Purdie

When using -fpic (security related cflags), qemux6-64 builds would fail due to linker symbol errors. This was due to the internal zlib that binutils was using.

Add the switch to tell it to use the target system zlib which is already in DEPENDS. That zlib is already compiled with the correct flags.

this looks good to me.

Quoted 17 lines
meta/recipes-devtools/binutils/binutils_2.26.bb +1 -0
index 6f42671..b70ffbf 100644
@@ -7,6 +7,7 @@ EXTRA_OECONF += "--with-sysroot=/ \
                 --enable-install-libbfd \
                 --enable-install-libiberty \
                 --enable-shared \
+                --with-system-zlib \
                 "
 
 EXTRA_OECONF_class-native = "--enable-targets=all \
#3 lore raw
Quoted 4 lines · Phil Blundell
Quoted 1 line · Richard Purdie

When using -fpic (security related cflags),

Do you mean -fpie?

I do, thanks :)

I'll fix the typos in -next.

Cheers,

Richard