<p dir="ltr"><br>
On Nov 6, 2015 7:44 AM, "Ross Burton" <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>> wrote:<br>
><br>
> For some reason that I don't understand (a decade-old attempt at optimisation?)<br>
> libaio disables linkage to the system libraries. Enabling fortify means linking<br>
> to the system libraries, so remove the existing addition of -lc for x86 (the<br>
> problem also happens on at least PPC) and just link to the system libraries on<br>
> all platforms.<br>
><br>
> Also remove the sed of src/Makefile as the build not respecting LDFLAGS has been<br>
> fixed upstream.</p>
<p dir="ltr">It might be due to AS NEEDED becoming default in linker. That now the positions of command line Argument will matter.</p>
<p dir="ltr">><br>
> Signed-off-by: Ross Burton <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>><br>
> ---<br>
> .../libaio/libaio/system-linkage.patch | 37 ++++++++++++++++++++++<br>
> meta/recipes-extended/libaio/<a href="http://libaio_0.3.110.bb">libaio_0.3.110.bb</a> | 9 ++----<br>
> 2 files changed, 39 insertions(+), 7 deletions(-)<br>
> create mode 100644 meta/recipes-extended/libaio/libaio/system-linkage.patch<br>
><br>
> diff --git a/meta/recipes-extended/libaio/libaio/system-linkage.patch b/meta/recipes-extended/libaio/libaio/system-linkage.patch<br>
> new file mode 100644<br>
> index 0000000..0b1f475<br>
> --- /dev/null<br>
> +++ b/meta/recipes-extended/libaio/libaio/system-linkage.patch<br>
> @@ -0,0 +1,37 @@<br>
> +From 94bba6880b1f10c6b3bf33a17ac40935d65a81ae Mon Sep 17 00:00:00 2001<br>
> +From: Ross Burton <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>><br>
> +Date: Fri, 6 Nov 2015 15:19:46 +0000<br>
> +Subject: [PATCH] Don't remove the system libraries and startup files from<br>
> + libaio, as in some build configurations these are required. For example,<br>
> + including conf/include/security_flags.inc on PPC results in:<br>
> +<br>
> +io_queue_init.os: In function `io_queue_init':<br>
> +tmp/work/ppce300c3-poky-linux/libaio/0.3.110-r0/libaio-0.3.110/src/io_queue_init.c:33:<br>
> +undefined reference to `__stack_chk_fail_local'<br>
> +<br>
> +Upstream-Status: Pending<br>
> +Signed-off-by: Ross Burton <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>><br>
> +---<br>
> + src/Makefile | 4 ++--<br>
> + 1 file changed, 2 insertions(+), 2 deletions(-)<br>
> +<br>
> +diff --git a/src/Makefile b/src/Makefile<br>
> +index eadb336..56ab701 100644<br>
> +--- a/src/Makefile<br>
> ++++ b/src/Makefile<br>
> +@@ -3,10 +3,10 @@ includedir=$(prefix)/include<br>
> + libdir=$(prefix)/lib<br>
> +<br>
> + CFLAGS ?= -g -fomit-frame-pointer -O2<br>
> +-CFLAGS += -nostdlib -nostartfiles -Wall -I. -fPIC<br>
> ++CFLAGS += -Wall -I. -fPIC<br>
> + SO_CFLAGS=-shared $(CFLAGS)<br>
> + L_CFLAGS=$(CFLAGS)<br>
> +-LINK_FLAGS=<br>
> ++LINK_FLAGS=$(LDFLAGS)</p>
<p dir="ltr">Isnt this line redundant see the below line adds same</p>
<p dir="ltr">> + LINK_FLAGS+=$(LDFLAGS)<br>
> +<br>
> + soname=libaio.so.1<br>
> +--<br>
> +2.1.4<br>
> +<br>
> diff --git a/meta/recipes-extended/libaio/<a href="http://libaio_0.3.110.bb">libaio_0.3.110.bb</a> b/meta/recipes-extended/libaio/<a href="http://libaio_0.3.110.bb">libaio_0.3.110.bb</a><br>
> index cbe29ce..2adfa0a 100644<br>
> --- a/meta/recipes-extended/libaio/<a href="http://libaio_0.3.110.bb">libaio_0.3.110.bb</a><br>
> +++ b/meta/recipes-extended/libaio/<a href="http://libaio_0.3.110.bb">libaio_0.3.110.bb</a><br>
> @@ -11,18 +11,13 @@ SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \<br>
> file://destdir.patch \<br>
> file://libaio_fix_for_x32.patch \<br>
> file://libaio_fix_for_mips_syscalls.patch \<br>
> -"<br>
> + file://system-linkage.patch \<br>
> + "<br>
><br>
> SRC_URI[md5sum] = "2a35602e43778383e2f4907a4ca39ab8"<br>
> SRC_URI[sha256sum] = "e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e"<br>
><br>
> EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}"<br>
> -# Need libc for stack-protector's __stack_chk_fail_local() bounce function<br>
> -LDFLAGS_append_x86 = " -lc"<br>
> -<br>
> -do_configure () {<br>
> - sed -i 's#LINK_FLAGS=.*#LINK_FLAGS=$(LDFLAGS)#' src/Makefile<br>
> -}<br>
><br>
> do_install () {<br>
> oe_runmake install DESTDIR=${D}<br>
> --<br>
> 2.1.4<br>
><br>
> --<br>
> _______________________________________________<br>
> Openembedded-core mailing list<br>
> <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
> <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</p>