mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-12 04:47:17 +04:00
build: detect the host triplet once per build
The top-level Makefile calls itself for prereq and for the build, and every call runs config.guess again. config.guess runs the host C compiler three times, which takes about 40 ms. Take GNU_HOST_NAME from the environment in recursive calls, as for REVISION and SOURCE_DATE_EPOCH. Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
1 parent
177325ba1a
commit
e3a89c4e4b
1 file changed
+4
-1
+4
-1
@@ -22,7 +22,10 @@ export SOURCE_DATE_EPOCH
|
||||
export GIT_CONFIG_PARAMETERS='core.autocrlf=false'
|
||||
export GIT_ASKPASS:=/bin/true
|
||||
export MAKE_JOBSERVER=$(filter --jobserver%,$(MAKEFLAGS))
|
||||
export GNU_HOST_NAME:=$(shell $(TOPDIR)/scripts/config.guess)
|
||||
ifneq ($(filter-out 0,$(MAKELEVEL))$(origin GNU_HOST_NAME),$(MAKELEVEL)environment)
|
||||
GNU_HOST_NAME:=$(shell $(TOPDIR)/scripts/config.guess)
|
||||
endif
|
||||
export GNU_HOST_NAME
|
||||
export HOST_OS:=$(shell uname)
|
||||
export HOST_ARCH:=$(shell uname -m)
|
||||
|
||||
|
||||
Reference in new issue
Block a user