From 733486cff227fe558d4efc117e215b7e5a93c337 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Tue, 7 Feb 2012 15:26:47 +0100 Subject: [PATCH] luajit: imported patch to drop TARGET=arch --- ...e299c9fc00e8d2252fa3f12c6005686783d6.patch | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 lua/luajit/b61be299c9fc00e8d2252fa3f12c6005686783d6.patch diff --git a/lua/luajit/b61be299c9fc00e8d2252fa3f12c6005686783d6.patch b/lua/luajit/b61be299c9fc00e8d2252fa3f12c6005686783d6.patch new file mode 100644 index 000000000..69fead6d3 --- /dev/null +++ b/lua/luajit/b61be299c9fc00e8d2252fa3f12c6005686783d6.patch @@ -0,0 +1,119 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../luajit/b61be299c9fc00e8d2252fa3f12c6005686783d6.patch +# Copyright (C) 2012 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +From b61be299c9fc00e8d2252fa3f12c6005686783d6 Mon Sep 17 00:00:00 2001 +From: Mike Pall +Date: Thu, 15 Dec 2011 19:16:06 +0100 +Subject: [PATCH] Auto-detect target arch via cross-compiler. Drop TARGET=arch. + +--- + doc/install.html | 10 +++++----- + src/Makefile | 9 +++++---- + 2 files changed, 10 insertions(+), 9 deletions(-) + +diff --git a/doc/install.html b/doc/install.html +index 4e226d1..07c55fa 100644 +--- a/doc/install.html ++++ b/doc/install.html +@@ -355,7 +355,7 @@ EGLIBC). The CROSS prefix may vary depending on the + --target of the toolchain: +

+
+-make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabi- TARGET=arm
++make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabi-
+ 
+

+ You can cross-compile for Android (ARM) using the » Android NDK. +@@ -368,7 +368,7 @@ NDKABI=8 + NDKVER=$NDK/toolchains/arm-linux-androideabi-4.4.3 + NDKP=$NDKVER/prebuilt/linux-x86/bin/arm-linux-androideabi- + NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm" +-make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF" TARGET=arm ++make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF" + +

+ You can cross-compile for iOS 3.0+ (iPhone/iPad) using the » iOS SDK. +@@ -387,7 +387,7 @@ ISDKVER=iPhoneOS4.3.sdk + ISDKP=$ISDK/usr/bin/ + ISDKF="-arch armv6 -isysroot $ISDK/SDKs/$ISDKVER" + make HOST_CC="gcc -m32 -arch i386" CROSS=$ISDKP TARGET_FLAGS="$ISDKF" \ +- TARGET=arm TARGET_SYS=iOS ++ TARGET_SYS=iOS + +

+ You can cross-compile for a PPC target or a +@@ -398,11 +398,11 @@ of the toolchain: +

+
+ # PPC
+-make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu- TARGET=ppc
++make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu-
+ 
+
+ # PPC/e500v2
+-make HOST_CC="gcc -m32" CROSS=powerpc-e500v2-linux-gnuspe- TARGET=ppcspe
++make HOST_CC="gcc -m32" CROSS=powerpc-e500v2-linux-gnuspe-
+ 
+

+ Whenever the host OS and the target OS differ, you need to specify +diff --git a/src/Makefile b/src/Makefile +index d4f8033..3e5b6dc 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -173,13 +173,11 @@ XCFLAGS= + # + # Cross-compilation examples: + # make HOST_CC="gcc -m32" CROSS=i586-mingw32msvc- TARGET_SYS=Windows +-# make HOST_CC="gcc -m32" CROSS=powerpc-e500v2-linux-gnuspe- TARGET=ppcspe ++# make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu- + + CCOPTIONS= $(CCDEBUG) $(CCOPT) $(CCWARN) $(XCFLAGS) $(CFLAGS) + LDOPTIONS= $(CCDEBUG) $(LDFLAGS) + +-TARGET_ARCH= $(patsubst %,-DLUAJIT_TARGET=LUAJIT_ARCH_%,$(TARGET)) +- + HOST_CC= $(CC) + HOST_RM= rm -f + # NOTE: The LuaJIT distribution comes with pre-generated buildvm_*.h files. +@@ -214,6 +212,7 @@ TARGET_DYNXLDOPTS= + TARGET_XCFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U_FORTIFY_SOURCE + TARGET_XLDFLAGS= + TARGET_XLIBS= -lm ++TARGET_TCFLAGS= $(CCOPTIONS) $(TARGET_XCFLAGS) $(TARGET_FLAGS) $(TARGET_CFLAGS) + TARGET_ACFLAGS= $(CCOPTIONS) $(TARGET_XCFLAGS) $(TARGET_ARCH) $(TARGET_FLAGS) $(TARGET_CFLAGS) + TARGET_ALDFLAGS= $(LDOPTIONS) $(TARGET_XLDFLAGS) $(TARGET_FLAGS) $(TARGET_LDFLAGS) + TARGET_ASHLDFLAGS= $(LDOPTIONS) $(TARGET_XSHLDFLAGS) $(TARGET_FLAGS) $(TARGET_SHLDFLAGS) +@@ -223,7 +222,7 @@ ifneq (,$(findstring stack-protector,$(shell $(TARGET_CC) -dumpspecs))) + TARGET_XCFLAGS+= -fno-stack-protector + endif + +-TARGET_TESTARCH=$(shell $(TARGET_CC) $(TARGET_ACFLAGS) -E lj_arch.h -dM) ++TARGET_TESTARCH=$(shell $(TARGET_CC) $(TARGET_TCFLAGS) -E lj_arch.h -dM) + ifneq (,$(findstring LJ_TARGET_X64 ,$(TARGET_TESTARCH))) + TARGET_CCARCH= x64 + TARGET_XCFLAGS+= $(CCOPT_X64) +@@ -251,6 +250,8 @@ endif + endif + endif + ++TARGET_ARCH= $(patsubst %,-DLUAJIT_TARGET=LUAJIT_ARCH_%,$(TARGET_CCARCH)) ++ + ifneq (,$(PREFIX)) + ifneq (/usr/local,$(PREFIX)) + TARGET_XCFLAGS+= -DLUA_XROOT=\"$(PREFIX)/\" +-- +1.6.5.GIT +