aboutsummaryrefslogtreecommitdiff
path: root/lang/lua52
diff options
context:
space:
mode:
authorBrandon Bergren <bdragon@FreeBSD.org>2020-09-09 21:47:58 +0000
committerBrandon Bergren <bdragon@FreeBSD.org>2020-09-09 21:47:58 +0000
commit3c7e4e45eaae9985aa6dbf58b2e462e196282184 (patch)
tree733eaf116a5ccfe0e4cbc9f4aaed98b9fbb0190b /lang/lua52
parented2f42d9188594ac93ab16b3d46273196a0c3604 (diff)
downloadports-3c7e4e45eaae9985aa6dbf58b2e462e196282184.tar.gz
ports-3c7e4e45eaae9985aa6dbf58b2e462e196282184.zip
[PowerPC64LE] Fix Lua 5.2 runtime issue
Lua 5.2 (but not earlier or later versions) has a powerpc platform detection check. This check was not using the preferred define `__powerpc__` so fails to trigger on gcc. It also assumes that all of powerpc is big-endian. Check a more universal preprocessor define, and add support for the upcoming FreeBSD PowerPC64LE. Submitted by: Daniel Kolesa <daniel@octaforge.org> Reviewed by: luporl Approved by: portmgr (blanket: runtime fix) Differential Revision: https://reviews.freebsd.org/D26234
Notes
Notes: svn path=/head/; revision=548161
Diffstat (limited to 'lang/lua52')
-rw-r--r--lang/lua52/files/patch-src__luaconf.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/lang/lua52/files/patch-src__luaconf.h b/lang/lua52/files/patch-src__luaconf.h
new file mode 100644
index 000000000000..350769c977e7
--- /dev/null
+++ b/lang/lua52/files/patch-src__luaconf.h
@@ -0,0 +1,19 @@
+--- src/luaconf.h.old
++++ src/luaconf.h
+@@ -519,10 +519,15 @@
+ #define LUA_IEEE754TRICK
+ #define LUA_IEEEENDIAN 0
+
+-#elif defined(__POWERPC__) || defined(__ppc__) /* }{ */
++#elif defined(__powerpc__)
+
+ #define LUA_IEEE754TRICK
++
++#ifdef __LITTLE_ENDIAN__
++#define LUA_IEEEENDIAN 0
++#else
+ #define LUA_IEEEENDIAN 1
++#endif
+
+ #else /* }{ */
+