--- /dev/null
+Allow cross compilation. Adapted from crosstool-ng.
+
+Signed-off-by: Baruch Siach <baruch at tkos.co.il>
+
+Index: b/GNUmakefile
+===================================================================
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -93,10 +93,6 @@
+ # also define 'WIN32'
+
+ # some defaults:
+-CC=gcc
+-CXX=g++
+-AR=ar
+-RANLIB=ranlib
+ INSTALL=install
+ RM=rm
+ RMFORCE=rm -f
+@@ -471,7 +467,7 @@
+
+ createconf$(EXEPOSTFIX): createconf.o
+ - $(RMFORCE) createconf$(EXEPOSTFIX)
+- $(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
++ $(CC_FOR_BUILD) $(HOST_CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
+
+ tstheap$(EXEPOSTFIX): libduma.a tstheap.o
+ - $(RMFORCE) tstheap$(EXEPOSTFIX)
+@@ -532,7 +528,7 @@
+ # define rules how to build objects for createconf
+ #
+ createconf.o:
+- $(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
++ $(CC_FOR_BUILD) $(HOST_CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
+
+
+ #
--- /dev/null
+Do not build test programs
+
+Biulding test programs does not work when we want to do a static link,
+because duma.a redefines memcpy and strcpy, so the link fails.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN duma-2.5.15.orig/GNUmakefile duma-2.5.15/GNUmakefile
+--- duma-2.5.15.orig/GNUmakefile 2014-11-16 14:47:05.874448560 +0100
++++ duma-2.5.15/GNUmakefile 2014-11-16 14:54:50.792048921 +0100
+@@ -294,7 +294,7 @@
+ SO_OBJECTS=dumapp_so.o duma_so.o sem_inc_so.o print_so.o
+
+ # Make all the top-level targets the makefile knows about.
+-all: libduma.a tstheap$(EXEPOSTFIX) dumatest$(EXEPOSTFIX) thread-test$(EXEPOSTFIX) testmt$(EXEPOSTFIX) dumatestpp$(EXEPOSTFIX) testoperators$(EXEPOSTFIX) $(DUMA_DYN_DEPS)
++all: libduma.a $(DUMA_DYN_DEPS)
+
+ # Perform self tests on the program this makefile builds.
+ check test:
+++ /dev/null
-Allow cross compilation. Adapted from crosstool-ng.
-
-Signed-off-by: Baruch Siach <baruch at tkos.co.il>
-
-Index: b/GNUmakefile
-===================================================================
---- a/GNUmakefile
-+++ b/GNUmakefile
-@@ -93,10 +93,6 @@
- # also define 'WIN32'
-
- # some defaults:
--CC=gcc
--CXX=g++
--AR=ar
--RANLIB=ranlib
- INSTALL=install
- RM=rm
- RMFORCE=rm -f
-@@ -471,7 +467,7 @@
-
- createconf$(EXEPOSTFIX): createconf.o
- - $(RMFORCE) createconf$(EXEPOSTFIX)
-- $(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
-+ $(CC_FOR_BUILD) $(HOST_CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
-
- tstheap$(EXEPOSTFIX): libduma.a tstheap.o
- - $(RMFORCE) tstheap$(EXEPOSTFIX)
-@@ -532,7 +528,7 @@
- # define rules how to build objects for createconf
- #
- createconf.o:
-- $(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
-+ $(CC_FOR_BUILD) $(HOST_CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
-
-
- #