Skip to content

Commit 6cdeb9c

Browse files
Benoît AllardgeneC
authored andcommitted
utils: Use the host toolchain to build.
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> (GC): Minor merge conflict Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
1 parent e28fa26 commit 6cdeb9c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

utils/Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ include $(MAKEDIR)/syslinux.mk
1919

2020
CC_FOR_BUILD ?= $(CC)
2121

22-
CFLAGS = $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC)
23-
LDFLAGS = -O2
22+
CFLAGS = $(CFLAGS_FOR_BUILD) $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC)
23+
LDFLAGS = $(LDFLAGS_FOR_BUILD) -O2
2424

2525
C_TARGETS = isohybrid gethostip memdiskfind
2626
SCRIPT_TARGETS = mkdiskimage
@@ -37,7 +37,7 @@ ISOHDPFX = $(addprefix $(OBJ)/,../mbr/isohdpfx.bin ../mbr/isohdpfx_f.bin \
3737
all: $(TARGETS)
3838

3939
%.o: %.c
40-
$(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
40+
$(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
4141

4242
mkdiskimage: mkdiskimage.in ../mbr/mbr.bin bin2hex.pl
4343
$(PERL) $(SRC)/bin2hex.pl < $(OBJ)/../mbr/mbr.bin | cat $(SRC)/mkdiskimage.in - > $@
@@ -53,13 +53,13 @@ isohdpfx.c: $(ISOHDPFX) isohdpfxarray.pl
5353
$(PERL) $(SRC)/isohdpfxarray.pl $(ISOHDPFX) > $@
5454

5555
isohybrid: isohybrid.o isohdpfx.o
56-
$(CC) $(LDFLAGS) -o $@ $^ -luuid
56+
$(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^ -luuid
5757

5858
gethostip: gethostip.o
59-
$(CC) $(LDFLAGS) -o $@ $^
59+
$(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^
6060

6161
memdiskfind: memdiskfind.o
62-
$(CC) $(LDFLAGS) -o $@ $^
62+
$(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^
6363

6464
tidy dist:
6565
rm -f *.o .*.d isohdpfx.c

0 commit comments

Comments
 (0)