buildroot/boot/syslinux/0004-utils-Use-the-host-too...

61 lines
1.9 KiB
Diff

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