sci-mathematics/flint: Fix FTBFS with PIE enabled
authorThomas Deutschmann <whissi@gentoo.org>
Sun, 24 Sep 2017 19:17:22 +0000 (21:17 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Sun, 24 Sep 2017 19:17:38 +0000 (21:17 +0200)
Closes: https://bugs.gentoo.org/608704
Package-Manager: Portage-2.3.10, Repoman-2.3.3

sci-mathematics/flint/files/flint-2.4.4-PIE-FTBFS.patch [new file with mode: 0644]
sci-mathematics/flint/flint-2.4.4-r1.ebuild
sci-mathematics/flint/flint-2.4.5.ebuild
sci-mathematics/flint/flint-2.5.2.ebuild

diff --git a/sci-mathematics/flint/files/flint-2.4.4-PIE-FTBFS.patch b/sci-mathematics/flint/files/flint-2.4.4-PIE-FTBFS.patch
new file mode 100644 (file)
index 0000000..5689e36
--- /dev/null
@@ -0,0 +1,17 @@
+Description: invoke $(CC) with -r and not -Wl,-r to fix FTBFS with PIE enabled
+Author: Logan Rosen <logan@ubuntu.com>
+Forwarded: yes
+
+diff --git a/Makefile.subdirs b/Makefile.subdirs
+index ec05fb0..f2d8b37 100644
+--- a/Makefile.subdirs
++++ b/Makefile.subdirs
+@@ -59,7 +59,7 @@ $(BUILD_DIR)/$(MOD_DIR)_%.o: %.c
+       $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) -c $< -o $@ -MMD -MP -MF "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$@"
+ $(MOD_LOBJ): $(LOBJS)
+-      $(QUIET_CC) $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib
++      $(QUIET_CC) $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib
+ -include $(LOBJS:.lo=.d)
index aca6c9be9410cf09523fb663912d6107a98c5ff2..1068395a40c3166de3dd69d0813e61d6a19d26f3 100644 (file)
@@ -30,7 +30,8 @@ src_prepare() {
        epatch "${FILESDIR}"/${PN}-2.4.3-libdir.patch \
                "${FILESDIR}"/${PN}-2.4.3-whitespaces.patch \
                "${FILESDIR}"/${PN}-2.4.3-cflags-ldflags.patch \
-               "${FILESDIR}"/${PN}-2.4.4-test.patch
+               "${FILESDIR}"/${PN}-2.4.4-test.patch \
+               "${FILESDIR}"/${PN}-2.4.4-PIE-FTBFS.patch
 
        sed -i \
                -e '/echo "DLPATH_ADD=/s/\$DLPATH_ADD/\\\$(CURDIR)/' \
index a8293b9632a7cfadf8d191e65468f5b521f60e29..b36ea8b5f2b31825310d43ae4c45b3f40dfc9fef 100644 (file)
@@ -32,7 +32,8 @@ src_prepare() {
                "${FILESDIR}"/${PN}-2.4.3-cflags-ldflags.patch \
                "${FILESDIR}"/${PN}-2.4.4-test.patch \
                "${FILESDIR}"/${PN}-2.4.5-gmp6-compat.patch \
-               "${FILESDIR}"/${PN}-2.4.5-ntl62.patch
+               "${FILESDIR}"/${PN}-2.4.5-ntl62.patch \
+               "${FILESDIR}"/${PN}-2.4.4-PIE-FTBFS.patch
 
        sed -i \
                -e '/echo "DLPATH_ADD=/s/\$DLPATH_ADD/\\\$(CURDIR)/' \
index 0217ae0600ca52bf0a93dbe57d6ee16354e74c5f..64f94ae79dcff4f9bb770a95c198d18bd75641fa 100644 (file)
@@ -27,6 +27,8 @@ DEPEND="${RDEPEND}
        )"
 
 src_prepare() {
+       epatch "${FILESDIR}"/${PN}-2.4.4-PIE-FTBFS.patch
+
        sed -i \
                -e '/echo "DLPATH_ADD=/s/\$DLPATH_ADD/\\\$(CURDIR)/' \
                ./configure || die