summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGokturk Yuksek <gokturk@binghamton.edu>2015-11-28 20:29:51 -0500
committerGokturk Yuksek <gokturk@binghamton.edu>2015-12-05 16:39:13 -0500
commit208727cd120aff0f241c9ee0a5f033fe6b41987f (patch)
tree17530327291cdd12f9753b40317f26918549d62b /dev-libs/libaio/files
parentsys-devel/gcc: version bump to 5.3.0 (diff)
downloadgentoo-208727cd120aff0f241c9ee0a5f033fe6b41987f.tar.gz
gentoo-208727cd120aff0f241c9ee0a5f033fe6b41987f.tar.bz2
gentoo-208727cd120aff0f241c9ee0a5f033fe6b41987f.zip
dev-libs/libaio: link against stdlib to pull the fortified functions #558406
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 Package-Manager: portage-2.2.20.1
Diffstat (limited to 'dev-libs/libaio/files')
-rw-r--r--dev-libs/libaio/files/libaio-0.3.110-link-stdlib.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/dev-libs/libaio/files/libaio-0.3.110-link-stdlib.patch b/dev-libs/libaio/files/libaio-0.3.110-link-stdlib.patch
new file mode 100644
index 000000000000..696a928f24d8
--- /dev/null
+++ b/dev-libs/libaio/files/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)