"
DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}"/${P}-pie-ftbs.patch )
+
src_configure() {
# Not an autoconf configure script.
# Note that it appears to have been cloned from the flint configure script
--with-flint="${EPREFIX}/usr" \
--with-gmp="${EPREFIX}/usr" \
--with-mpfr="${EPREFIX}/usr" \
- $(use_enable static-libs static) || die
+ $(use_enable static-libs static) \
+ CFLAGS="${CPPFLAGS} ${CFLAGS}" || die
}
src_compile() {
--- /dev/null
+Description: Use -r instead of -Wl,-r to fix FTBFS with PIE enabled
+Author: Logan Rosen
+Forwarded: yes
+
+diff --git a/Makefile.subdirs b/Makefile.subdirs
+index 3dc757d..f0ec923 100644
+--- a/Makefile.subdirs
++++ b/Makefile.subdirs
+@@ -52,7 +52,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)
+