summaryrefslogtreecommitdiff
path: root/Build/source/libs
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-09-28 08:44:01 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-09-28 08:44:01 +0000
commita7c63a2257f4923220afa43b88f7d5950abf0c80 (patch)
tree9ad0e693734e8af6f2022ccdf77f43a144a0e76b /Build/source/libs
parent300e9a57f1d8f94c6437fb988f1e3b41d33600ee (diff)
libs/luajit: Try to fix it for NetBSD/amd64
git-svn-id: svn://tug.org/texlive/trunk@38487 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs')
-rw-r--r--Build/source/libs/luajit/ChangeLog5
-rw-r--r--Build/source/libs/luajit/Makefile.am2
-rw-r--r--Build/source/libs/luajit/Makefile.in2
-rwxr-xr-xBuild/source/libs/luajit/configure19
-rw-r--r--Build/source/libs/luajit/configure.ac7
-rw-r--r--Build/source/libs/luajit/m4/lj-system.m47
6 files changed, 35 insertions, 7 deletions
diff --git a/Build/source/libs/luajit/ChangeLog b/Build/source/libs/luajit/ChangeLog
index 0d821f1cb6c..5d02d9a8dd2 100644
--- a/Build/source/libs/luajit/ChangeLog
+++ b/Build/source/libs/luajit/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-28 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am, configure.ac, m4/lj-system.m4: Try to stay
+ closer to the distributed build system.
+
2015-09-09 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am, m4/lj-system.m4: Keep preprocessed src/lj_arch.h
diff --git a/Build/source/libs/luajit/Makefile.am b/Build/source/libs/luajit/Makefile.am
index 1eb62020492..fcf39f6a4a3 100644
--- a/Build/source/libs/luajit/Makefile.am
+++ b/Build/source/libs/luajit/Makefile.am
@@ -16,7 +16,7 @@ EXTRA_DIST += $(LUAJIT_TREE)-PATCHES
include $(srcdir)/../../am/dist_hook.am
NEVER_NAMES += $(NEVER_NAMES_SUB) $(NEVER_NAMES_LT)
-AM_CPPFLAGS = -I$(srcdir)/$(LUAJIT_TREE)/src $(LUAJIT_DEFINES)
+AM_CPPFLAGS = -I$(srcdir)/$(LUAJIT_TREE)/src $(LUAJIT_DEFINES) -U_FORTIFY_SOURCE
AM_CFLAGS = $(LUAJIT_CFLAGS) -Wall
AM_CCASFLAGS = $(LUAJIT_CFLAGS)
diff --git a/Build/source/libs/luajit/Makefile.in b/Build/source/libs/luajit/Makefile.in
index 9c6a2cbed1d..a350a890298 100644
--- a/Build/source/libs/luajit/Makefile.in
+++ b/Build/source/libs/luajit/Makefile.in
@@ -675,7 +675,7 @@ NEVER_DIST = `find . $(NEVER_NAMES)`
NEVER_NAMES = -name .svn $(NEVER_NAMES_SUB) $(NEVER_NAMES_LT)
NEVER_NAMES_SUB = -o -name .deps -o -name .dirstamp -o -name '*.$(OBJEXT)'
NEVER_NAMES_LT = -o -name .libs -o -name '*.lo'
-AM_CPPFLAGS = -I$(srcdir)/$(LUAJIT_TREE)/src $(LUAJIT_DEFINES)
+AM_CPPFLAGS = -I$(srcdir)/$(LUAJIT_TREE)/src $(LUAJIT_DEFINES) -U_FORTIFY_SOURCE
AM_CFLAGS = $(LUAJIT_CFLAGS) -Wall
AM_CCASFLAGS = $(LUAJIT_CFLAGS)
SUBDIRS = . native include
diff --git a/Build/source/libs/luajit/configure b/Build/source/libs/luajit/configure
index 84b03b5d68c..53a0f24c9c5 100755
--- a/Build/source/libs/luajit/configure
+++ b/Build/source/libs/luajit/configure
@@ -14144,15 +14144,19 @@ if ac_fn_c_try_cpp "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for architecture" >&5
$as_echo_n "checking for architecture... " >&6; }
cp conftest.i system_flags
+LUAJIT_CFLAGS='-fomit-frame-pointer'
if grep 'LJ_TARGET_X64 ' conftest.i >/dev/null 2>&1; then :
LJARCH=x64
elif grep 'LJ_TARGET_X86 ' conftest.i >/dev/null 2>&1; then :
LJARCH=x86
- LUAJIT_CFLAGS='-march=i686 -msse -msse2 -mfpmath=sse'
+ LUAJIT_CFLAGS="$LUAJIT_CFLAGS -march=i686 -msse -msse2 -mfpmath=sse"
elif grep 'LJ_TARGET_ARM ' conftest.i >/dev/null 2>&1; then :
LJARCH=arm
elif grep 'LJ_TARGET_ARM64 ' conftest.i >/dev/null 2>&1; then :
LJARCH=arm64
+ if test "x$LJHOST" = xiOS; then :
+ LUAJIT_CFLAGS='-fno-omit-frame-pointer'
+fi
elif grep 'LJ_TARGET_PPC ' conftest.i >/dev/null 2>&1; then :
LJARCH=ppc
if grep 'LJ_LE 1' conftest.i >/dev/null 2>&1; then :
@@ -14263,12 +14267,23 @@ CPPFLAGS=$lj_save_CPPFLAGS
case $LJHOST in #(
Windows) :
LJVM_MODE=peobj
- LUAJIT_CFLAGS=-malign-double ;; #(
+ LUAJIT_CFLAGS="$LUAJIT_CFLAGS -malign-double" ;; #(
Darwin | iOS) :
LJVM_MODE=machasm ;; #(
*) :
LJVM_MODE=elfasm ;;
esac
+lj_save_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS -fno-stack-protector"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ LUAJIT_CFLAGS="$LUAJIT_CFLAGS -fno-stack-protector"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS=$lj_save_CFLAGS
if test "x$LJVM_MODE" = xpeobj; then
PEOBJ_TRUE=
PEOBJ_FALSE='#'
diff --git a/Build/source/libs/luajit/configure.ac b/Build/source/libs/luajit/configure.ac
index bec139f35d4..080c39dd2ec 100644
--- a/Build/source/libs/luajit/configure.ac
+++ b/Build/source/libs/luajit/configure.ac
@@ -48,9 +48,14 @@ AS_CASE([$host_os],
LJ_ARCH()
AS_CASE([$LJHOST],
[Windows], [LJVM_MODE=peobj
- LUAJIT_CFLAGS=-malign-double],
+ LUAJIT_CFLAGS="$LUAJIT_CFLAGS -malign-double"],
[Darwin | iOS], [LJVM_MODE=machasm],
[LJVM_MODE=elfasm])
+lj_save_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS -fno-stack-protector"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]],[[]])],
+ [LUAJIT_CFLAGS="$LUAJIT_CFLAGS -fno-stack-protector"])
+CFLAGS=$lj_save_CFLAGS
AM_CONDITIONAL([PEOBJ], [test "x$LJVM_MODE" = xpeobj])
AC_SUBST([LUAJIT_CFLAGS])
diff --git a/Build/source/libs/luajit/m4/lj-system.m4 b/Build/source/libs/luajit/m4/lj-system.m4
index 5f0d164af80..f8069d79c8b 100644
--- a/Build/source/libs/luajit/m4/lj-system.m4
+++ b/Build/source/libs/luajit/m4/lj-system.m4
@@ -13,15 +13,18 @@ m4_define([_LJ_ARCH], [dnl
rm -f dynasm_flags native_flags
AC_MSG_CHECKING([for architecture])
cp conftest.i system_flags
+LUAJIT_CFLAGS='-fomit-frame-pointer'
AS_IF([grep 'LJ_TARGET_X64 ' conftest.i >/dev/null 2>&1],
[LJARCH=x64],
[grep 'LJ_TARGET_X86 ' conftest.i >/dev/null 2>&1],
[LJARCH=x86
- LUAJIT_CFLAGS='-march=i686 -msse -msse2 -mfpmath=sse'],
+ LUAJIT_CFLAGS="$LUAJIT_CFLAGS -march=i686 -msse -msse2 -mfpmath=sse"],
[grep 'LJ_TARGET_ARM ' conftest.i >/dev/null 2>&1],
[LJARCH=arm],
[grep 'LJ_TARGET_ARM64 ' conftest.i >/dev/null 2>&1],
- [LJARCH=arm64],
+ [LJARCH=arm64
+ AS_IF([test "x$LJHOST" = xiOS],
+ [LUAJIT_CFLAGS='-fno-omit-frame-pointer'])],
[grep 'LJ_TARGET_PPC ' conftest.i >/dev/null 2>&1],
[LJARCH=ppc
AS_IF([grep 'LJ_LE 1' conftest.i >/dev/null 2>&1],