gcc/4.8: add patch to warn about unsafe header paths
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 10 Dec 2014 22:53:52 +0000 (23:53 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 10 Dec 2014 23:05:52 +0000 (00:05 +0100)
commit2097bb4c71d9ec982b4a222e7a32f598f7a748cd
treea087c52716c879d105388cb0aab75594ab5be6ef
parentfc3fa082e0308d8eda8a486e3a395a38f5219665
gcc/4.8: add patch to warn about unsafe header paths

This commit adds a patch to gcc borrowed from CodeSourcery/Yocto that
warns about unsafe include paths (i.e /usr/include,
/usr/local/include, etc.). The patch was adapted to gcc 4.8.3, and
modified to support the BR_COMPILER_PARANOID_UNSAFE_PATH environment
variable to error out instead of just warn when unsafe paths are
used. Even though erroring out can be chosen by passing
-Werror=poison-system-directories, we are not sure this option in
CFLAGS will always be passed, so having an environment variable
guarantees it will always be passed, and also allows to have an
identical behavior to the external toolchain wrapper.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Romain Naour <romain.naour@openwide.fr>
package/gcc/4.8.3/910-gcc-poison-system-directories.patch [new file with mode: 0644]