[vlc-devel] [PATCH] contrib/lua: do not override user-specified compiler

Sean McGovern gseanmcg at gmail.com
Mon Mar 21 17:49:03 CET 2016


---
Actually apply the patch this time.
---
 contrib/src/lua/lua-cc-no-override.patch |   12 ++++++++++++
 contrib/src/lua/rules.mak                |    2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 contrib/src/lua/lua-cc-no-override.patch

diff --git a/contrib/src/lua/lua-cc-no-override.patch b/contrib/src/lua/lua-cc-no-override.patch
new file mode 100644
index 0000000..e8ac5ec
--- /dev/null
+++ b/contrib/src/lua/lua-cc-no-override.patch
@@ -0,0 +1,12 @@
+--- lua-5.3.2/src/Makefile.ORIG	Wed May 27 07:10:11 2015
++++ lua-5.3.2/src/Makefile	Mon Mar 21 12:28:51 2016
+@@ -6,7 +6,9 @@
+ # Your platform. See PLATS for possible values.
+ PLAT= none
+ 
++ifneq ($(findstring $(origin CC),undefined default),)
+ CC= gcc -std=gnu99
++endif
+ CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)
+ LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
+ LIBS= -lm $(SYSLIBS) $(MYLIBS)
diff --git a/contrib/src/lua/rules.mak b/contrib/src/lua/rules.mak
index 145b1cd..588d4d0 100644
--- a/contrib/src/lua/rules.mak
+++ b/contrib/src/lua/rules.mak
@@ -48,6 +48,7 @@ lua: lua-$(LUA_VERSION).tar.gz .sum-lua
 	$(APPLY) $(SRC)/lua/no-dylibs.patch
 	$(APPLY) $(SRC)/lua/no-localeconv.patch
 	$(APPLY) $(SRC)/lua/lua-android-log2.patch
+	$(APPLY) $(SRC)/lua/lua-cc-no-override.patch
 ifdef HAVE_DARWIN_OS
 	(cd $(UNPACK_DIR) && \
 	sed -e 's%gcc%$(CC)%' \
@@ -64,7 +65,6 @@ ifdef HAVE_WIN32
 	cd $(UNPACK_DIR) && sed -i.orig -e 's/lua luac/lua.exe luac.exe/' Makefile
 endif
 	cd $(UNPACK_DIR)/src && sed -i.orig \
-		-e 's/CC=/#CC=/' \
 		-e 's/= *strip/=$(STRIP)/' \
 		-e 's/= *ranlib/= $(RANLIB)/' \
 		Makefile
-- 
1.7.9.2



More information about the vlc-devel mailing list