diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-03-13 15:54:50 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-03-15 20:32:10 +0100 |
commit | 6de7406d54057d6eb9600fdafea5f57d7f2ef448 (patch) | |
tree | 192208b3b7bb743e17f96ad5f1628df765bddcc9 /tools | |
parent | a5c30efeb1ec0365e3e9ec3499d50a03012ea927 (diff) | |
download | upstream-6de7406d54057d6eb9600fdafea5f57d7f2ef448.tar.gz upstream-6de7406d54057d6eb9600fdafea5f57d7f2ef448.tar.bz2 upstream-6de7406d54057d6eb9600fdafea5f57d7f2ef448.zip |
pkgconf: always retain -I and -L flags
The pkgconf fork filters -I and -L flag values from .pc files which match
pkgconf's builtin system directory value.
During configure, pkgconf derives the default system include and library
search path values from exec_prefix, which is set to staging_dir/host in
the host tool build phase.
Due to that, pkgconf will drop all -I and -L flags pointing to
staging_dir/host/include or staging_dir/host/lib, unless invoked with
--keep-system-cflags and --keep-system-libs respectively, breaking our
kernel libelf discovery / stack validation workarounds.
In order to inhibit the filtering, add --keep-system-cflags and
--keep-system-libs to our pkg-config shell wrapper.
Fixes: GH#2832
Fixes: 867298cf47 ("tools/pkg-config: Replace with pkgconf")
Ref: https://lists.infradead.org/pipermail/openwrt-devel/2020-March/022182.html
Ref: https://git.openwrt.org/fe43969336201f2cc7d103b68fd6e65989bee184
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Acked-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/pkgconf/files/pkg-config | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/pkgconf/files/pkg-config b/tools/pkgconf/files/pkg-config index fa1faccc6c..2c6fd08b4a 100755 --- a/tools/pkgconf/files/pkg-config +++ b/tools/pkgconf/files/pkg-config @@ -1,6 +1,8 @@ #!/bin/sh pkg-config.real \ +--keep-system-cflags \ +--keep-system-libs \ --define-variable=prefix="${STAGING_PREFIX}" \ --define-variable=exec_prefix="${STAGING_PREFIX}" \ --define-variable=bindir="${STAGING_PREFIX}/bin" "$@" |