mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 22:26:31 +00:00
Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y
Some host packages need a recent gcc version. Add symbols to Config.in to specify the HOSTCC version. The values are passed through the environment, and this environment is generated in a new support script. Also update the documentation to mention the new symbols. [Thomas: simplify by using only make logic instead of an external shell script.] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
449803965c
commit
12825f7af5
24
Config.in
24
Config.in
@ -18,6 +18,30 @@ config BR2_EXTERNAL
|
|||||||
string
|
string
|
||||||
option env="BR2_EXTERNAL"
|
option env="BR2_EXTERNAL"
|
||||||
|
|
||||||
|
# Hidden config symbols for packages to check system gcc version
|
||||||
|
config BR2_HOST_GCC_VERSION
|
||||||
|
string
|
||||||
|
option env="HOST_GCC_VERSION"
|
||||||
|
|
||||||
|
config BR2_HOST_GCC_AT_LEAST_4_7
|
||||||
|
bool
|
||||||
|
default y if BR2_HOST_GCC_VERSION = "4 7"
|
||||||
|
|
||||||
|
config BR2_HOST_GCC_AT_LEAST_4_8
|
||||||
|
bool
|
||||||
|
default y if BR2_HOST_GCC_VERSION = "4 8"
|
||||||
|
select BR2_HOST_GCC_AT_LEAST_4_7
|
||||||
|
|
||||||
|
config BR2_HOST_GCC_AT_LEAST_4_9
|
||||||
|
bool
|
||||||
|
default y if BR2_HOST_GCC_VERSION = "4 9"
|
||||||
|
select BR2_HOST_GCC_AT_LEAST_4_8
|
||||||
|
|
||||||
|
config BR2_HOST_GCC_AT_LEAST_5
|
||||||
|
bool
|
||||||
|
default y if BR2_HOST_GCC_VERSION = "5"
|
||||||
|
select BR2_HOST_GCC_AT_LEAST_4_9
|
||||||
|
|
||||||
# Hidden boolean selected by packages in need of Java in order to build
|
# Hidden boolean selected by packages in need of Java in order to build
|
||||||
# (example: xbmc)
|
# (example: xbmc)
|
||||||
config BR2_NEEDS_HOST_JAVA
|
config BR2_NEEDS_HOST_JAVA
|
||||||
|
9
Makefile
9
Makefile
@ -293,6 +293,14 @@ HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranli
|
|||||||
export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD
|
export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD
|
||||||
export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
|
export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
|
||||||
|
|
||||||
|
HOSTCC_VERSION := $(shell $(HOSTCC_NOCCACHE) --version | \
|
||||||
|
sed -n -r 's/^.* ([0-9]*)\.([0-9]*)\.([0-9]*)[ ]*.*/\1 \2/p')
|
||||||
|
|
||||||
|
# For gcc >= 5.x, we only need the major version.
|
||||||
|
ifneq ($(firstword $(HOSTCC_VERSION)),4)
|
||||||
|
HOSTCC_VERSION := $(firstword $(HOSTCC_VERSION))
|
||||||
|
endif
|
||||||
|
|
||||||
# Make sure pkg-config doesn't look outside the buildroot tree
|
# Make sure pkg-config doesn't look outside the buildroot tree
|
||||||
HOST_PKG_CONFIG_PATH := $(PKG_CONFIG_PATH)
|
HOST_PKG_CONFIG_PATH := $(PKG_CONFIG_PATH)
|
||||||
unexport PKG_CONFIG_PATH
|
unexport PKG_CONFIG_PATH
|
||||||
@ -724,6 +732,7 @@ COMMON_CONFIG_ENV = \
|
|||||||
KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
|
KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
|
||||||
BR2_CONFIG=$(BR2_CONFIG) \
|
BR2_CONFIG=$(BR2_CONFIG) \
|
||||||
BR2_EXTERNAL=$(BR2_EXTERNAL) \
|
BR2_EXTERNAL=$(BR2_EXTERNAL) \
|
||||||
|
HOST_GCC_VERSION="$(HOSTCC_VERSION)" \
|
||||||
SKIP_LEGACY=
|
SKIP_LEGACY=
|
||||||
|
|
||||||
xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
|
xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
|
||||||
|
@ -283,6 +283,13 @@ use in the comment.
|
|||||||
** Comment string: +gcc >= X.Y+ and/or `gcc <= X.Y` (replace
|
** Comment string: +gcc >= X.Y+ and/or `gcc <= X.Y` (replace
|
||||||
+X.Y+ with the proper version)
|
+X.Y+ with the proper version)
|
||||||
|
|
||||||
|
* Host GCC version
|
||||||
|
** Dependency symbol: +BR2_HOST_GCC_AT_LEAST_X_Y+, (replace
|
||||||
|
+X_Y+ with the proper version, see +Config.in+)
|
||||||
|
** Comment string: no comment to be added
|
||||||
|
** Note that it is usually not the package itself that has a minimum
|
||||||
|
host GCC version, but rather a host-package on which it depends.
|
||||||
|
|
||||||
* C library
|
* C library
|
||||||
** Dependency symbol: +BR2_TOOLCHAIN_USES_GLIBC+,
|
** Dependency symbol: +BR2_TOOLCHAIN_USES_GLIBC+,
|
||||||
+BR2_TOOLCHAIN_USES_MUSL+, +BR2_TOOLCHAIN_USES_UCLIBC+
|
+BR2_TOOLCHAIN_USES_MUSL+, +BR2_TOOLCHAIN_USES_UCLIBC+
|
||||||
|
Loading…
x
Reference in New Issue
Block a user