summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2016-09-23 20:05:01 -0700
committerDan Nicholson <dbn.lists@gmail.com>2017-03-20 07:13:23 -0500
commitd5d80748936c1ddb2e32bc713f2ed51dc6f753ea (patch)
tree393ef535432227cc69aedd6c33e7d45f490f2b5a /check
parent7707d2ff337fa4bc9e7273d9eead6641a7a49208 (diff)
downloadpkg-config-d5d80748936c1ddb2e32bc713f2ed51dc6f753ea.tar.gz
Respect sysroot for -isystem and -idirafter
Treat -isystem and -idirafter as -I Cflags since they control the compiler search path. Adjust the sysroot handling so that the arguments to these options have the sysroot prefixed. However, leave them out of the system Cflags handling since these directives are explicitly trying to adjust the compiler's system header search behavior. The special-flags test case output needs adjustment since all the flags are now considered -I flags and come out in the order specified in the pc file. https://bugs.freedesktop.org/show_bug.cgi?id=97337
Diffstat (limited to 'check')
-rwxr-xr-xcheck/check-special-flags2
-rwxr-xr-xcheck/check-sysroot2
2 files changed, 2 insertions, 2 deletions
diff --git a/check/check-special-flags b/check/check-special-flags
index 35b56e6..78e6341 100755
--- a/check/check-special-flags
+++ b/check/check-special-flags
@@ -4,7 +4,7 @@ set -e
. ${srcdir}/common
-RESULT="-g -isystem /system1 -idirafter /after1 -ffoo -idirafter /after2 -isystem /system2 -I/foo -I/bar"
+RESULT="-g -ffoo -I/foo -isystem /system1 -idirafter /after1 -I/bar -idirafter /after2 -isystem /system2"
run_test --cflags special-flags
RESULT="-L/foo -L/bar -framework Foo -lsimple -framework Bar -Wl,-framework -Wl,Baz"
diff --git a/check/check-sysroot b/check/check-sysroot
index 43d0b5b..7da415f 100755
--- a/check/check-sysroot
+++ b/check/check-sysroot
@@ -31,7 +31,7 @@ run_test --cflags public-dep
RESULT="-L$root/sysroot/public-dep/lib -lpublic-dep"
run_test --libs public-dep
-RESULT="-g -isystem /system1 -idirafter /after1 -ffoo -idirafter /after2 -isystem /system2 -I$root/sysroot/foo -I$root/sysroot/bar"
+RESULT="-g -ffoo -I$root/sysroot/foo -isystem $root/sysroot/system1 -idirafter $root/sysroot/after1 -I$root/sysroot/bar -idirafter $root/sysroot/after2 -isystem $root/sysroot/system2"
run_test --cflags special-flags
RESULT="-L$root/sysroot/foo -L$root/sysroot/bar -framework Foo -lsimple -framework Bar -Wl,-framework -Wl,Baz"