0004-utils-Use-the-host-toolchain-to-build.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From e000251144056c99e390a2a4449d06cbd2a19c0a Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
  3. Date: Wed, 5 Apr 2017 14:25:02 +0200
  4. Subject: [PATCH] utils: Use the host toolchain to build.
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. The utilities are meant to run on the host machine, hence must be built using
  9. the host toolchain.
  10. Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
  11. ---
  12. utils/Makefile | 12 ++++++------
  13. 1 file changed, 6 insertions(+), 6 deletions(-)
  14. diff --git a/utils/Makefile b/utils/Makefile
  15. index dfe6259..ac91aaa 100644
  16. --- a/utils/Makefile
  17. +++ b/utils/Makefile
  18. @@ -17,8 +17,8 @@
  19. VPATH = $(SRC)
  20. include $(MAKEDIR)/syslinux.mk
  21. -CFLAGS = $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC)
  22. -LDFLAGS = -O2
  23. +CFLAGS = $(CFLAGS_FOR_BUILD) $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC)
  24. +LDFLAGS = $(LDFLAGS_FOR_BUILD) -O2
  25. C_TARGETS = isohybrid gethostip memdiskfind
  26. SCRIPT_TARGETS = mkdiskimage
  27. @@ -35,7 +35,7 @@ ISOHDPFX = $(addprefix $(OBJ)/,../mbr/isohdpfx.bin ../mbr/isohdpfx_f.bin \
  28. all: $(TARGETS)
  29. %.o: %.c
  30. - $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
  31. + $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
  32. mkdiskimage: mkdiskimage.in ../mbr/mbr.bin bin2hex.pl
  33. $(PERL) $(SRC)/bin2hex.pl < $(OBJ)/../mbr/mbr.bin | cat $(SRC)/mkdiskimage.in - > $@
  34. @@ -51,13 +51,13 @@ isohdpfx.c: $(ISOHDPFX) isohdpfxarray.pl
  35. $(PERL) $(SRC)/isohdpfxarray.pl $(ISOHDPFX) > $@
  36. isohybrid: isohybrid.o isohdpfx.o
  37. - $(CC) $(LDFLAGS) -o $@ $^ -luuid
  38. + $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^ -luuid
  39. gethostip: gethostip.o
  40. - $(CC) $(LDFLAGS) -o $@ $^
  41. + $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^
  42. memdiskfind: memdiskfind.o
  43. - $(CC) $(LDFLAGS) -o $@ $^
  44. + $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^
  45. tidy dist:
  46. rm -f *.o .*.d isohdpfx.c
  47. --
  48. 2.1.4