aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/libaio/0.3.110/libaio-0.3.110-link-stdlib.patch')
-rw-r--r--patches/libaio/0.3.110/libaio-0.3.110-link-stdlib.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/patches/libaio/0.3.110/libaio-0.3.110-link-stdlib.patch b/patches/libaio/0.3.110/libaio-0.3.110-link-stdlib.patch
new file mode 100644
index 0000000..696a928
--- /dev/null
+++ b/patches/libaio/0.3.110/libaio-0.3.110-link-stdlib.patch
@@ -0,0 +1,21 @@
+From: Gokturk Yuksek <gokturk@binghamton.edu>
+Subject: [PATCH] Link against stdlib to resolve fortified functions
+
+When '-fstack-protector-strong' is included in CFLAGS, the function
+'__stack_chk_fail_local' needs to be pulled from libc. However, upstream
+uses '-nostdlib' to avoid linking against any C library or gcc libs. Remove
+'-nostdlib' and '-nostartfiles' to pull the required symbols from libc.
+
+Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=558406
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -4,7 +4,7 @@
+ usrlibdir=$(libdir)
+
+ CFLAGS ?= -g -fomit-frame-pointer -O2
+-CFLAGS += -nostdlib -nostartfiles -Wall -I. -fPIC
++CFLAGS += -Wall -I. -fPIC
+ CFLAGS += $(CPPFLAGS)
+ SO_CFLAGS=-shared $(CFLAGS)
+ L_CFLAGS=$(CFLAGS)