binutils/2.23: add patch to warn about unsafe library paths
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 10 Dec 2014 22:53:48 +0000 (23:53 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 10 Dec 2014 23:05:52 +0000 (00:05 +0100)
commitb5997f852e7ec434125d16ce4985fcf04ac08e6f
treebad9d792b39e2adeb7da011516f13bbc0b1586a0
parent48bc113e3f1abbe77ff96b76b2d34e40db7a0206
binutils/2.23: add patch to warn about unsafe library paths

This commit adds a patch to binutils borrowed from CodeSourcery/Yocto
that warns about unsafe library paths (i.e /usr/lib, /usr/local/lib,
etc.). The patch was adapted to binutils 2.23, 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 --error-poison-system-directories, we are
not sure this option in LDFLAGS 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/binutils/2.23.2/600-poison-system-directories.patch [new file with mode: 0644]