]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
prereq: use staging_dir's compiler 20350/head
authorRosen Penev <rosenp@gmail.com>
Mon, 29 Sep 2025 19:14:48 +0000 (12:14 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 19 Oct 2025 22:55:06 +0000 (00:55 +0200)
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>
include/prereq-build.mk
include/prereq.mk

index ba95f7eb62e9df27b03aa18a977452be2f78a5e3..af1d4b2fc20e3c04ff59fa4b3ebecff5e05f3b2b 100644 (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) $< $@
index 23287eade476c6d36a5f14762e3dfe0a846c2589..ea018df345b3eb2e6bfa47b1aa73fecdff8952ef 100644 (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)))