patches/duma/2_5_1/100-cross-compile.patch
changeset 236 42650dc4e95e
child 369 9258a7c3b84f
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/duma/2_5_1/100-cross-compile.patch	Thu Jul 12 08:47:15 2007 +0000
     1.3 @@ -0,0 +1,110 @@
     1.4 +diff -dur duma_2_5_1/Makefile duma_2_5_1.orig/Makefile
     1.5 +--- duma_2_5_1/Makefile	2006-06-18 06:02:13.000000000 +0200
     1.6 ++++ duma_2_5_1.orig/Makefile	2007-07-11 17:49:43.000000000 +0200
     1.7 +@@ -98,10 +98,6 @@
     1.8 +   LIBS=-lpthread
     1.9 + endif
    1.10 + 
    1.11 +-
    1.12 +-CC=gcc
    1.13 +-CXX=g++
    1.14 +-AR=ar
    1.15 + INSTALL=install
    1.16 + 
    1.17 + ############################################################
    1.18 +@@ -169,31 +165,31 @@
    1.19 + 
    1.20 + createconf: createconf.o
    1.21 + 	- rm -f createconf
    1.22 +-	$(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf
    1.23 ++	$(HOSTCC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf
    1.24 + 
    1.25 + tstheap: libduma.a tstheap.o
    1.26 + 	- rm -f tstheap
    1.27 +-	$(CC) $(CFLAGS) tstheap.o libduma.a -o tstheap $(LIBS)
    1.28 ++	$(HOSTCC) $(CFLAGS) tstheap.o libduma.a -o tstheap $(LIBS)
    1.29 + 
    1.30 + dumatest: libduma.a dumatest.o
    1.31 + 	- rm -f dumatest
    1.32 +-	$(CC) $(CFLAGS) dumatest.o libduma.a -o dumatest $(LIBS)
    1.33 ++	$(HOSTCC) $(CFLAGS) dumatest.o libduma.a -o dumatest $(LIBS)
    1.34 + 
    1.35 + dumatestpp: libduma.a dumatestpp.o dumapp.h
    1.36 + 	- rm -f dumatestpp
    1.37 +-	$(CXX) $(CPPFLAGS) dumatestpp.o libduma.a -o dumatestpp $(LIBS)
    1.38 ++	$(HOSTCXX) $(CPPFLAGS) dumatestpp.o libduma.a -o dumatestpp $(LIBS)
    1.39 + 
    1.40 + testoperators: libduma.a testoperators.o dumapp.h
    1.41 + 	- rm -f testoperators
    1.42 +-	$(CXX) $(CPPFLAGS) testoperators.o libduma.a -o testoperators $(LIBS)
    1.43 ++	$(HOSTCXX) $(CPPFLAGS) testoperators.o libduma.a -o testoperators $(LIBS)
    1.44 + 
    1.45 + tstheap_so: tstheap_so.o
    1.46 + 	- rm -f tstheap_so
    1.47 +-	$(CC) $(CFLAGS) tstheap_so.o -o tstheap_so $(LIBS)
    1.48 ++	$(HOSTCC) $(CFLAGS) tstheap_so.o -o tstheap_so $(LIBS)
    1.49 + 
    1.50 + dumatestpp_so: dumatestpp_so.o
    1.51 + 	- rm -f dumatestpp_so
    1.52 +-	$(CXX) $(CPPFLAGS) dumatestpp_so.o -o dumatestpp_so $(LIBS)
    1.53 ++	$(HOSTCXX) $(CPPFLAGS) dumatestpp_so.o -o dumatestpp_so $(LIBS)
    1.54 + 
    1.55 + 
    1.56 + $(OBJECTS) tstheap.o dumatest.o dumatestpp.o: duma.h
    1.57 +@@ -211,7 +207,7 @@
    1.58 + # define rules how to build objects for createconf
    1.59 + #
    1.60 + createconf.o:
    1.61 +-	$(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
    1.62 ++	$(HOSTCC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
    1.63 + 
    1.64 + 
    1.65 + #
    1.66 +@@ -230,13 +226,6 @@
    1.67 + print_so.o:	print.c print.h
    1.68 + 	$(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c print.c -o $@
    1.69 + 
    1.70 +-# DUMA_SO_OPTIONS needed cause duma.h is included explicitly
    1.71 +-tstheap_so.o:
    1.72 +-	$(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c tstheap.c -o $@
    1.73 +-
    1.74 +-dumatestpp_so.o:
    1.75 +-	$(CXX) $(CPPFLAGS) $(DUMA_SO_OPTIONS) -c dumatestpp.cpp -o $@
    1.76 +-
    1.77 + #
    1.78 + # define rules how to build objects for static library
    1.79 + #
    1.80 +@@ -259,17 +248,23 @@
    1.81 + #
    1.82 + 
    1.83 + dumatest.o:	dumatest.c duma.h duma_config.h
    1.84 +-	$(CC) $(CFLAGS) -c dumatest.c -o $@
    1.85 ++	$(HOSTCC) $(CFLAGS) -c dumatest.c -o $@
    1.86 + 
    1.87 + dumatestpp.o:	dumatestpp.cpp duma.h dumapp.h duma_config.h
    1.88 +-	$(CXX) $(CPPFLAGS) -c dumatestpp.cpp -o $@
    1.89 ++	$(HOSTCXX) $(CPPFLAGS) -c dumatestpp.cpp -o $@
    1.90 + 
    1.91 + tstheap.o:	tstheap.c duma.h duma_config.h
    1.92 +-	$(CC) $(CFLAGS) -c tstheap.c -o $@
    1.93 ++	$(HOSTCC) $(CFLAGS) -c tstheap.c -o $@
    1.94 + 
    1.95 + testoperators.o:	testoperators.cpp duma.h dumapp.h duma_config.h
    1.96 +-	$(CXX) $(CPPFLAGS) -c testoperators.cpp -o $@
    1.97 ++	$(HOSTCXX) $(CPPFLAGS) -c testoperators.cpp -o $@
    1.98 ++
    1.99 ++# DUMA_SO_OPTIONS needed cause duma.h is included explicitly
   1.100 ++tstheap_so.o:
   1.101 ++	$(HOSTCC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c tstheap.c -o $@
   1.102 + 
   1.103 ++dumatestpp_so.o:
   1.104 ++	$(HOSTCXX) $(CPPFLAGS) $(DUMA_SO_OPTIONS) -c dumatestpp.cpp -o $@
   1.105 + 
   1.106 + #
   1.107 + # default rules
   1.108 +@@ -280,5 +275,3 @@
   1.109 + #.cpp.o:
   1.110 + #	$(CXX) $(CPPFLAGS) -c $< -o $@
   1.111 + #
   1.112 +-
   1.113 +-