xref: /OK3568_Linux_fs/buildroot/package/duma/0001-fix-cross-compilation.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1Allow cross compilation. Adapted from crosstool-ng.
2
3Signed-off-by: Baruch Siach <baruch at tkos.co.il>
4
5Index: b/GNUmakefile
6===================================================================
7--- a/GNUmakefile
8+++ b/GNUmakefile
9@@ -93,10 +93,6 @@
10 # also define 'WIN32'
11
12 # some defaults:
13-CC=gcc
14-CXX=g++
15-AR=ar
16-RANLIB=ranlib
17 INSTALL=install
18 RM=rm
19 RMFORCE=rm -f
20@@ -471,7 +467,7 @@
21
22 createconf$(EXEPOSTFIX): createconf.o
23 	- $(RMFORCE) createconf$(EXEPOSTFIX)
24-	$(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
25+	$(CC_FOR_BUILD) $(HOST_CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
26
27 tstheap$(EXEPOSTFIX): libduma.a tstheap.o
28 	- $(RMFORCE) tstheap$(EXEPOSTFIX)
29@@ -532,7 +528,7 @@
30 # define rules how to build objects for createconf
31 #
32 createconf.o:
33-	$(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
34+	$(CC_FOR_BUILD) $(HOST_CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
35
36
37 #
38