aboutsummaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorGravatar Carlos Santos <unixmania@gmail.com>2019-09-24 08:46:11 -0300
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-09-25 22:07:24 +0200
commit6136765b23abd9faba610dd54ed276a777811575 (patch)
treee3fc2ac455af77d920357f967eb7279a3fcb3afa /toolchain
parentcf64b689a61c5506f6dfd3c60559639046ef8edd (diff)
downloadbuildroot-6136765b23abd9faba610dd54ed276a777811575.tar.gz
buildroot-6136765b23abd9faba610dd54ed276a777811575.tar.bz2
toolchain: generate check-headers program under $(BUILD_DIR)
Some installations mount /tmp with the 'noexec' option, which prevents running the program generated there to check the kernel headers. Avoid the problem by generating the program under $(BUILD_DIR), passed as the first argument to check-kernel-headers.sh. We could globally export a TMPDIR environment variable with some path under $(BUILD_DIR) but such solution would be too intrusive, depriving the user from the freedom to set TMPDIR at his will (or needs). Fixes: https://bugs.busybox.net/show_bug.cgi?id=12241 Signed-off-by: Carlos Santos <unixmania@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/helpers.mk9
-rw-r--r--toolchain/toolchain-external/pkg-toolchain-external.mk1
2 files changed, 5 insertions, 5 deletions
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 86d945a5b1..6a4f7223c8 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -158,13 +158,12 @@ copy_toolchain_sysroot = \
# Check the specified kernel headers version actually matches the
# version in the toolchain.
#
-# $1: sysroot directory
-# $2: kernel version string, in the form: X.Y
+# $1: build directory
+# $2: sysroot directory
+# $3: kernel version string, in the form: X.Y
#
check_kernel_headers_version = \
- if ! support/scripts/check-kernel-headers.sh $(1) $(2); then \
- exit 1; \
- fi
+ support/scripts/check-kernel-headers.sh $(1) $(2) $(3)
#
# Check the specific gcc version actually matches the version in the
diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
index c3ddff263f..c00211d59c 100644
--- a/toolchain/toolchain-external/pkg-toolchain-external.mk
+++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
@@ -531,6 +531,7 @@ define $(2)_CONFIGURE_CMDS
$$(Q)$$(call check_unusable_toolchain,$$(TOOLCHAIN_EXTERNAL_CC))
$$(Q)SYSROOT_DIR="$$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC))" ; \
$$(call check_kernel_headers_version,\
+ $$(BUILD_DIR)\
$$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC)),\
$$(call qstrip,$$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))); \
$$(call check_gcc_version,$$(TOOLCHAIN_EXTERNAL_CC),\