summaryrefslogtreecommitdiff
path: root/lang/gprolog/files/patch-EnginePl_machine.h
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2020-11-23 13:26:14 +0000
committerEugene Grosbein <eugen@FreeBSD.org>2020-11-23 13:26:14 +0000
commit5973cbeb09c236864961e043b4509b6cb01d1c8a (patch)
treea6699450e0714ddfda4a039c70f7c879b992bb99 /lang/gprolog/files/patch-EnginePl_machine.h
parentUpdate to 3.3.0 to be ruby 2.7 compatible. (diff)
lang/gprolog: recover GNU Prolog under FreeBSD.
Update to version 1.4.5 released in 2020. Make it build and run with Clang 10: - clang has no register reservation for x86, hence patch-EnginePl_machine.h and -DNO_MACHINE_REG_FOR_REG_BANK to prevent using missing feature; - add patch-Ma2Asm_x86__64__any.c fetched from upstream SourceForge post-release commit dealing with PIC issues; - disable usage of spinlocks that results in a hang eating all available CPU cycles; fixed with -DUSE_LOCKS=1 -DUSE_RECURSIVE_LOCKS=1 -DUSE_SPIN_LOCKS=0; - the software uses bundled dlmalloc dated back 2011 that replaces functions like calloc() with own implemenations and it's calloc() sometimes fails to clear allocated memory; this results in SIGSEGV when its own hash-table implementation dereferences junk that supposed to be NULL pointer, so it fails to complete build; fixed with MMAP_CLEARS=0. PR: 231393
Notes
Notes: svn path=/head/; revision=556106
Diffstat (limited to 'lang/gprolog/files/patch-EnginePl_machine.h')
-rw-r--r--lang/gprolog/files/patch-EnginePl_machine.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/lang/gprolog/files/patch-EnginePl_machine.h b/lang/gprolog/files/patch-EnginePl_machine.h
new file mode 100644
index 000000000000..69bb186b924b
--- /dev/null
+++ b/lang/gprolog/files/patch-EnginePl_machine.h
@@ -0,0 +1,20 @@
+--- EnginePl/machine.h.orig 2015-01-13 18:00:19 UTC
++++ EnginePl/machine.h
+@@ -124,7 +124,7 @@ void M_Check_Magic_Words(void); /* not c
+ # define M_USED_REGS {"$9", "$10", "$11", "$12", "$13", "$14", 0}
+
+ /* on M_ix86_darwin : %ebx is used by gcc for pic base */
+-#elif defined(M_ix86) && !defined(_MSC_VER) && !defined(M_ix86_darwin)
++#elif defined(M_ix86) && !defined(_MSC_VER) && !defined(M_ix86_darwin) && !defined(__clang__)
+
+ #ifdef NO_USE_EBP
+ # define M_USED_REGS {"ebx", 0}
+@@ -137,7 +137,7 @@ void M_Check_Magic_Words(void); /* not c
+ # define M_USED_REGS {"15", "20", 0}
+
+ /* on M_x86_64_darwin Lion r12-r15 do not work (why ?) */
+-#elif defined(M_x86_64) && !defined(_MSC_VER) && !defined(M_x86_64_darwin)
++#elif defined(M_x86_64) && !defined(_MSC_VER) && !defined(M_x86_64_darwin) && !defined(__clang__)
+
+ # define M_USED_REGS {"r12", "r13", "r14", "r15", 0}
+