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