void-packages/srcpkgs/hexer/patches/fix-cross.patch

23 lines
651 B
Diff

--- a/Makefile
+++ b/Makefile
@@ -29,8 +29,8 @@ CPPFLAGS_STD ?= -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 \
CPPFLAGS += $(CPPFLAGS_STD) -DHEXER_VERSION=\"1.0.4\"
# -- Which compiler? --
-CC ?= cc
-CC_FOR_BUILD ?= $(CC)
+CC := cc
+CC_FOR_BUILD := $(CC)
CFLAGS ?= -O
LDFLAGS ?=
LDLIBS = $(LTERMCAP) -lm
@@ -72,7 +72,7 @@ $(MYC): calc.c config.h
$(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -DMYCALC=1 -o $@ calc.c -lm
bin2c: bin2c.c
- $(CC_FOR_BUILD) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ bin2c.c
+ $(CC_FOR_BUILD) $(HOSTCPPFLAGS) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ bin2c.c
helptext.c: help.txt bin2c
./bin2c -n helptext -o $@ help.txt