mirror of
https://github.com/hzyitc/openwrt-redmi-ax3000
synced 2025-10-30 07:50:32 +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:
committed by
Hauke Mehrtens
parent
ab805ec316
commit
df950f4cfd
@ -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) $< $@
|
||||
|
||||
@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user