summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Config.in20
-rw-r--r--package/Makefile.in4
2 files changed, 24 insertions, 0 deletions
diff --git a/Config.in b/Config.in
index 1aa1080b38..3374e0fe2c 100644
--- a/Config.in
+++ b/Config.in
@@ -569,6 +569,26 @@ config BR2_GLOBAL_PATCH_DIR
Otherwise, if the directory <global-patch-dir>/<packagename> exists,
then all *.patch files in the directory will be applied.
+menu "Advanced"
+
+config BR2_COMPILER_PARANOID_UNSAFE_PATH
+ bool "paranoid check of library/header paths"
+ help
+ By default, when this option is disabled, when the Buildroot
+ cross-compiler will encounter an unsafe library or header
+ path (such as /usr/include, or /usr/lib), the compiler will
+ display a warning.
+
+ By enabling this option, this warning is turned into an
+ error, which will completely abort the build when such
+ unsafe paths are encountered.
+
+ Note that this mechanism is available for both the internal
+ toolchain (through gcc and binutils patches) and external
+ toolchain backends (through the external toolchain wrapper).
+
+endmenu
+
endmenu
source "toolchain/Config.in"
diff --git a/package/Makefile.in b/package/Makefile.in
index 36ecf0b6cd..f60b08dde4 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -398,6 +398,10 @@ else
SHARED_STATIC_LIBS_OPTS = --enable-static --enable-shared
endif
+ifeq ($(BR2_COMPILER_PARANOID_UNSAFE_PATH),y)
+export BR_COMPILER_PARANOID_UNSAFE_PATH=enabled
+endif
+
include package/pkg-download.mk
include package/pkg-autotools.mk
include package/pkg-cmake.mk
OpenPOWER on IntegriCloud