diff --git a/include/prereq-build.mk b/include/prereq-build.mk index ba95f7eb62..af1d4b2fc2 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -237,7 +237,7 @@ endif $(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c mkdir -p $(dir $@) - $(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $< + $(STAGING_DIR_HOST)/bin/gcc -O2 -I$(TOPDIR)/tools/include -o $@ $< $(STAGING_DIR_HOST)/bin/xxd: $(SCRIPT_DIR)/xxdi.pl $(LN) $< $@ diff --git a/include/prereq.mk b/include/prereq.mk index 23287eade4..ea018df345 100644 --- a/include/prereq.mk +++ b/include/prereq.mk @@ -71,7 +71,7 @@ endef # 4: optional link library test (example -lncurses) define RequireCHeader define Require/$(1) - echo 'int main(int argc, char **argv) { $(3); return 0; }' | gcc -include $(1) -x c -o $(TMP_DIR)/a.out - $(4) + echo 'int main(int argc, char **argv) { $(3); return 0; }' | $(STAGING_DIR_HOST)/bin/gcc -include $(1) -x c -o $(TMP_DIR)/a.out - $(4) endef $$(eval $$(call Require,$(1),$(2)))