aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/rpm-lua.patch
blob: a9930d6705f5c562faea9e177cfb2cf66f99266a (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
30
31
32
33
Add support for cross compiling lua

Upstream-Status: Pending

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

Index: rpm-5.4.14/configure.ac
===================================================================
--- rpm-5.4.14.orig/configure.ac
+++ rpm-5.4.14/configure.ac
@@ -121,6 +121,9 @@ AC_PROG_YACC
 
 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,
Index: rpm-5.4.14/lua/Makefile.am
===================================================================
--- rpm-5.4.14.orig/lua/Makefile.am
+++ rpm-5.4.14/lua/Makefile.am
@@ -41,7 +41,7 @@ rpmluac_LDADD = liblua.la
 
 # --- 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@