0001-fix-cross-compilation.patch 938 B

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