Hello,

I don't think anything changed with this bug, which still prevents
gprolog's inclusion in any stable release, and affects Ubuntu as well.

I believe just pulling the latest upstream source would fix it.

Alternatively, if downgrading to the stable gprolog-1.4.4 is an option,
the attached patch lets it compile with gcc 6.  Tested on Debian 9.4.

                                        Thanks in advance,
                                        Cedric Ware.
diff -ru 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	2018-05-10 16:31:10.534235899 +0200
@@ -204,8 +204,8 @@
   strcpy(asm_reg_cp, Off_Reg_Bank(MAP_OFFSET_CP));
 #endif
 
-#ifdef M_x86_64_darwin
-  pic_code = 1;			/* NB: on darwin everything is PIC code */
+#if defined(M_x86_64_darwin) || defined(M_x86_64_bsd) || defined(M_x86_64_linux)
+  pic_code = 1;			/* NB: on darwin and BSD everything is PIC code, last gcc 6 needs this for linux */
 #elif defined(_WIN32)
   pic_code = 0;			/* NB: on MinGW nothing is needed for PIC code */
 #endif

Reply via email to