kumquat-buildroot/toolchain
Yann E. MORIN 61cb120ee5 toolchain/wrapper: extend paranoid check to -isystem
Some packages, like libbsd, use -isystem flags to provide so-called
overrides to the system include files. In this particular case, this
is used in a .pc file, then used by antoher package; pkgconf does not
mangle this path; and eventually that other package ends up using
/usr/include/bsd to search for headers.

Our current toolchain wrapper is limited to looking for -I and -L, so
the paranoid check does not kick in.

Furthermore, as noticed by Arnout, there might be a bunch of other
so-unsafe options: -isysroot, -imultilib, -iquote, -idirafter, -iprefix,
-iwithprefix, -iwithprefixbefore; even -B and --sysroot are unsafe.

Extend the paranoid check to be able to check any arbitrary number of
potentially unsafe options:

  - add a list of options to check for, each with their length,
  - iterate over this list until we find a matching unsafe option.

Compared to previously, the list of options include -I and -L (which we
already had) extended with -idirafter, -iquote and -isystem, but leaving
all the others noticed by Arnout away, until we have a reason for
handling them.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-18 16:09:23 +02:00
..
toolchain toolchain/toolchain-buildroot: migrate to virtual package infrastructure 2014-06-14 19:10:13 +02:00
toolchain-buildroot arch: remove support for sh64 2016-09-08 22:15:15 +02:00
toolchain-external toolchain-external: fix potential entire root filesystem removal 2016-09-15 11:59:07 +02:00
Config.in bfin: change default to bf532, internal toolchain !bf6xx 2016-08-27 23:07:11 +02:00
helpers.mk toolchain/helpers: add fortran check 2016-07-03 16:58:11 +02:00
toolchain-common.in linux-headers: allow specifying 4.8 as kernel header version 2016-09-12 22:57:53 +02:00
toolchain-wrapper.c toolchain/wrapper: extend paranoid check to -isystem 2016-09-18 16:09:23 +02:00
toolchain-wrapper.mk toolchain/wrapper: fix potential bug in foreach loop 2015-10-25 23:01:48 +01:00
toolchain.mk toolchain: use the <PKG>_TARGET_FINALIZE_HOOKS 2016-07-18 23:30:46 +02:00