diff options
| author | Rosen Penev | 2025-09-29 19:14:48 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2025-10-19 22:55:06 +0000 |
| commit | df950f4cfddd6696fe72f51d4260152f08bd643f (patch) | |
| tree | 56dcd66563255c33a0ba846861d0dd6b698cabef | |
| parent | ab805ec316b54c96c67da9533ca1202930aa5c17 (diff) | |
| download | openwrt-df950f4cfddd6696fe72f51d4260152f08bd643f.tar.gz | |
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>
| -rw-r--r-- | include/prereq-build.mk | 2 | ||||
| -rw-r--r-- | include/prereq.mk | 2 |
2 files changed, 2 insertions, 2 deletions
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))) |