summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/gprolog')
-rw-r--r--dev-lang/gprolog/files/gprolog-pic-code.patch12
-rw-r--r--dev-lang/gprolog/gprolog-1.4.4.ebuild6
2 files changed, 13 insertions, 5 deletions
diff --git a/dev-lang/gprolog/files/gprolog-pic-code.patch b/dev-lang/gprolog/files/gprolog-pic-code.patch
new file mode 100644
index 000000000000..a85aea0746eb
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-pic-code.patch
@@ -0,0 +1,12 @@
+diff -ur gprolog-1.4.4.orig/src/Ma2Asm/x86_64_any.c gprolog-1.4.4/src/Ma2Asm/x86_64_any.c
+--- gprolog-1.4.4.orig/src/Ma2Asm/x86_64_any.c 2013-04-22 13:52:16.000000000 +0200
++++ gprolog-1.4.4/src/Ma2Asm/x86_64_any.c 2017-07-19 17:27:37.057124771 +0200
+@@ -204,7 +204,7 @@
+ strcpy(asm_reg_cp, Off_Reg_Bank(MAP_OFFSET_CP));
+ #endif
+
+-#ifdef M_x86_64_darwin
++#if defined(M_x86_64_darwin) || defined(M_x86_64_linux)
+ pic_code = 1; /* NB: on darwin everything is PIC code */
+ #elif defined(_WIN32)
+ pic_code = 0; /* NB: on MinGW nothing is needed for PIC code */
diff --git a/dev-lang/gprolog/gprolog-1.4.4.ebuild b/dev-lang/gprolog/gprolog-1.4.4.ebuild
index 7116f2c8c4db..4d915c78666d 100644
--- a/dev-lang/gprolog/gprolog-1.4.4.ebuild
+++ b/dev-lang/gprolog/gprolog-1.4.4.ebuild
@@ -20,6 +20,7 @@ RDEPEND=""
src_prepare() {
epatch "${FILESDIR}"/${P}-ldflags.patch
+ epatch "${FILESDIR}"/${P}-pic-code.patch
epatch "${FILESDIR}"/${P}-links.patch
epatch "${FILESDIR}"/${P}-nodocs.patch
epatch "${FILESDIR}"/${P}-txt-file.patch
@@ -31,11 +32,6 @@ src_configure() {
append-flags -fno-strict-aliasing
use debug && append-flags -DDEBUG
- if gcc-specs-pie ; then
- # gplc generates its own native ASM; disable PIE
- append-ldflags -nopie
- fi
-
cd "${S}"/src
econf \
CFLAGS_MACHINE="${CFLAGS_MACHINE}" \