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
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
-rw-r--r--dev-libs/libaio/files/libaio-0.3.110-link-stdlib.patch21
-rw-r--r--dev-libs/libaio/libaio-0.3.110.ebuild3
2 files changed, 23 insertions, 1 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)
diff --git a/dev-libs/libaio/libaio-0.3.110.ebuild b/dev-libs/libaio/libaio-0.3.110.ebuild
index a772baf97c40..0605dbed076a 100644
--- a/dev-libs/libaio/libaio-0.3.110.ebuild
+++ b/dev-libs/libaio/libaio-0.3.110.ebuild
@@ -21,7 +21,8 @@ src_prepare() {
"${FILESDIR}"/${PN}-0.3.109-x32.patch \
"${FILESDIR}"/${PN}-0.3.109-testcase-8.patch \
"${FILESDIR}"/${PN}-0.3.110-cppflags.patch \
- "${FILESDIR}"/${PN}-0.3.110-optional-werror.patch
+ "${FILESDIR}"/${PN}-0.3.110-optional-werror.patch \
+ "${FILESDIR}"/${PN}-0.3.110-link-stdlib.patch #558406
local sed_args=(
-e "/^prefix=/s:/usr:${EPREFIX}/usr:"