1
0
mirror of https://github.com/openwrt/openwrt.git synced 2025-10-30 07:49:23 +08:00

prereq: use staging_dir's compiler

Fixes compilation with missing OS GCC.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20350
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Rosen Penev
2025-09-29 12:14:48 -07:00
committed by Hauke Mehrtens
parent ab805ec316
commit df950f4cfd
2 changed files with 2 additions and 2 deletions

View File

@ -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) $< $@

View File

@ -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)))