summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/rpm-lua.patch
blob: 980e1b1476e81b34e73d7e102a571821f282e7e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Add support for cross compiling lua

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>

diff -ur rpm-5.4.9.orig/configure.ac rpm-5.4.9/configure.ac
--- rpm-5.4.9.orig/configure.ac	2012-05-16 12:16:36.589813548 -0500
+++ rpm-5.4.9/configure.ac	2012-05-16 12:26:01.070813518 -0500
@@ -120,6 +120,9 @@
 
 AC_PATH_PROG(AS, as, as)
 
+CC_FOR_BUILD=${CC_FOR_BUILD-\$(CC)}
+AC_SUBST(CC_FOR_BUILD)
+
 dnl # GCC specifics
 AC_PROG_GCC_TRADITIONAL
 AC_ARG_ENABLE(build-pic,
diff -ur rpm-5.4.9.orig/lua/Makefile.am rpm-5.4.9/lua/Makefile.am
--- rpm-5.4.9.orig/lua/Makefile.am	2012-04-07 19:15:25.000000000 -0500
+++ rpm-5.4.9/lua/Makefile.am	2012-05-16 12:26:19.556856688 -0500
@@ -40,7 +40,7 @@
 
 # --- bin2c doesn't need anything but a compiler
 bin2c$(EXEEXT):  bin2c.c
-	$(CC) -o $@ $<
+	$(CC_FOR_BUILD) -o $@ $<
 
 liblua_la_SOURCES =
 liblua_la_CFLAGS = @WITH_LUA_SUBDIR_DEF@