summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2013-01-22 05:11:59 -0800
committerDan Nicholson <dbn.lists@gmail.com>2013-01-22 05:11:59 -0800
commit1694230365b2518797d13fdbfd4b7578ce89f00e (patch)
tree595ec4e9822c2581a47f87fd89eff08dd5214352 /check
parent7867cbd79cfe706b990bcc0e4c6846007be76e8a (diff)
parent9adfd9ebfcb8a9656999116307c15061364bf7df (diff)
downloadpkg-config-1694230365b2518797d13fdbfd4b7578ce89f00e.tar.gz
Merge branch 'flag-order-fixes'
Diffstat (limited to 'check')
-rwxr-xr-xcheck/check-duplicate-flags7
-rwxr-xr-xcheck/check-gtk21
-rwxr-xr-xcheck/check-libs6
-rwxr-xr-xcheck/check-mixed-flags10
-rwxr-xr-xcheck/check-sort-order32
-rwxr-xr-xcheck/check-whitespace2
6 files changed, 40 insertions, 38 deletions
diff --git a/check/check-duplicate-flags b/check/check-duplicate-flags
index c80f650..110da5b 100755
--- a/check/check-duplicate-flags
+++ b/check/check-duplicate-flags
@@ -4,11 +4,12 @@ set -e
. ${srcdir}/common
-RESULT="-DPATH2 -DFOO -DPATH1 -I/path/include"
+RESULT="-DPATH2 -DFOO -DPATH1 -DFOO -I/path/include"
run_test --cflags flag-dup-1 flag-dup-2
run_test --cflags flag-dup-2 flag-dup-1
-RESULT="-Wl,--whole-archive --Wl,--no-whole-archive -Xlinker -R /path/lib \
--L/path/lib -lpath2 -lpath1 -lm"
+RESULT="-L/path/lib -lpath2 -Wl,--whole-archive -lm --Wl,--no-whole-archive \
+-Xlinker -R -Xlinker /path/lib -lpath1 -Wl,--whole-archive -lm \
+--Wl,--no-whole-archive -Xlinker -R -Xlinker /path/lib"
run_test --libs flag-dup-1 flag-dup-2
run_test --libs flag-dup-2 flag-dup-1
diff --git a/check/check-gtk b/check/check-gtk
index 7ad565f..7fd01bb 100755
--- a/check/check-gtk
+++ b/check/check-gtk
@@ -16,7 +16,8 @@ PKG_CONFIG_LIBDIR=${srcdir}/gtk
RESULT="-DGSEAL_ENABLE -pthread -I/gtk/include/gtk-3.0 \
-I/gtk/include/pango-1.0 -I/gtk/include/atk-1.0 -I/gtk/include/cairo \
-I/gtk/include/pixman-1 -I/gtk/include -I/gtk/include/gdk-pixbuf-2.0 \
--I/gtk/include/glib-2.0 -I/gtk/lib/glib-2.0/include -I/gtk/include/freetype2"
+-I/gtk/include -I/gtk/include/pango-1.0 -I/gtk/include/glib-2.0 \
+-I/gtk/lib/glib-2.0/include -I/gtk/include/freetype2 -I/gtk/include"
run_test --cflags gtk+-3.0
run_test --cflags --static gtk+-3.0
@@ -26,10 +27,10 @@ run_test --cflags --static gtk+-3.0
# -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lpango-1.0 \
# -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt \
# -lglib-2.0
-RESULT="-pthread -L/gtk/lib -lgtk-3 -lgdk-3 -lpangocairo-1.0 -latk-1.0 \
--lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 \
--lpango-1.0 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lrt -lglib-2.0 \
--lfreetype -lfontconfig"
+RESULT="-L/gtk/lib -lgtk-3 -lgdk-3 -lpangocairo-1.0 -latk-1.0 -lcairo-gobject \
+-lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 \
+-lgthread-2.0 -pthread -lrt -lgmodule-2.0 -pthread -lrt -lglib-2.0 -lfreetype \
+-lfontconfig"
if [ "$list_indirect_deps" = no ]; then
run_test --libs gtk+-3.0
fi
@@ -47,11 +48,11 @@ fi
# -lpixman-1 -lXrender -lX11 -lpthread -lxcb -lXau -lpng12 -lz -lm \
# -lpango-1.0 -lfontconfig -lexpat -lfreetype -lgobject-2.0 -lffi \
# -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 -lrt
-RESULT="-pthread -L/gtk/lib -lgtk-3 -lgdk-3 -lpangocairo-1.0 -latk-1.0 \
--lcairo-gobject -lcairo -lpixman-1 -lXrender -lX11 -lpthread -lxcb -lXau \
--lgdk_pixbuf-2.0 -lpng12 -lm -lgio-2.0 -lz -lresolv -lpangoft2-1.0 \
--lpango-1.0 -lgobject-2.0 -lffi -lgthread-2.0 -lgmodule-2.0 -ldl -lglib-2.0 \
--lrt -lfontconfig -lexpat -lfreetype"
+RESULT="-L/gtk/lib -lgtk-3 -lgdk-3 -lpangocairo-1.0 -latk-1.0 -lcairo-gobject \
+-lcairo -lz -lpixman-1 -lpng12 -lz -lm -lXrender -lX11 -lpthread -lxcb -lXau \
+-lgdk_pixbuf-2.0 -lm -lpng12 -lz -lm -lgio-2.0 -lz -lresolv -lpangoft2-1.0 \
+-lpango-1.0 -lgobject-2.0 -lffi -lgthread-2.0 -pthread -lrt -lgmodule-2.0 \
+-pthread -lrt -ldl -lglib-2.0 -lrt -lfreetype -lfontconfig -lexpat -lfreetype"
if [ "$list_indirect_deps" = yes ]; then
run_test --libs gtk+-3.0
fi
diff --git a/check/check-libs b/check/check-libs
index b85dc29..767e3fd 100755
--- a/check/check-libs
+++ b/check/check-libs
@@ -18,7 +18,7 @@ run_test --libs --static simple
RESULT=""
run_test --libs fields-blank
-RESULT="-Wl,--as-needed -L/other/lib -lother"
+RESULT="-L/other/lib -Wl,--as-needed -lother"
run_test --libs other
RESULT="-lother"
@@ -39,11 +39,11 @@ RESULT="-Wl,--as-needed -lother"
run_test --libs-only-l --libs-only-other other
run_test --libs-only-other --libs-only-l other
-RESULT="-Wl,--as-needed -L/other/lib"
+RESULT="-L/other/lib -Wl,--as-needed"
run_test --libs-only-L --libs-only-other other
run_test --libs-only-other --libs-only-L other
-RESULT="-Wl,--as-needed -L/other/lib -lother"
+RESULT="-L/other/lib -Wl,--as-needed -lother"
run_test --libs-only-l --libs-only-L --libs-only-other other
run_test --libs --libs-only-l --libs-only-L --libs-only-other other
run_test --libs --libs-only-l other
diff --git a/check/check-mixed-flags b/check/check-mixed-flags
index b96c3b7..84dba21 100755
--- a/check/check-mixed-flags
+++ b/check/check-mixed-flags
@@ -4,7 +4,7 @@ set -e
. ${srcdir}/common
-RESULT="-DOTHER -I/other/include -Wl,--as-needed -L/other/lib -lother"
+RESULT="-DOTHER -I/other/include -L/other/lib -Wl,--as-needed -lother"
run_test --cflags --libs other
run_test --libs --cflags other
run_test --cflags-only-I --cflags-only-other --libs-only-l --libs-only-L \
@@ -50,11 +50,11 @@ RESULT="-DOTHER -Wl,--as-needed -lother"
run_test --cflags-only-other --libs-only-other --libs-only-l other
run_test --libs-only-l --libs-only-other --cflags-only-other other
-RESULT="-I/other/include -Wl,--as-needed -L/other/lib"
+RESULT="-I/other/include -L/other/lib -Wl,--as-needed"
run_test --cflags-only-I --libs-only-other --libs-only-L other
run_test --libs-only-L --libs-only-other --cflags-only-I other
-RESULT="-DOTHER -Wl,--as-needed -L/other/lib"
+RESULT="-DOTHER -L/other/lib -Wl,--as-needed"
run_test --cflags-only-other --libs-only-other --libs-only-L other
run_test --libs-only-L --libs-only-other --cflags-only-other other
@@ -70,10 +70,10 @@ RESULT="-DOTHER -I/other/include -Wl,--as-needed"
run_test --cflags --libs-only-other other
run_test --cflags-only-I --cflags-only-other --libs-only-other other
-RESULT="-I/other/include -Wl,--as-needed -L/other/lib -lother"
+RESULT="-I/other/include -L/other/lib -Wl,--as-needed -lother"
run_test --cflags-only-I --libs other
run_test --cflags-only-I --libs-only-l --libs-only-L --libs-only-other other
-RESULT="-DOTHER -Wl,--as-needed -L/other/lib -lother"
+RESULT="-DOTHER -L/other/lib -Wl,--as-needed -lother"
run_test --cflags-only-other --libs other
run_test --cflags-only-other --libs-only-l --libs-only-L --libs-only-other other
diff --git a/check/check-sort-order b/check/check-sort-order
index ad1bad2..77c0806 100755
--- a/check/check-sort-order
+++ b/check/check-sort-order
@@ -53,8 +53,8 @@ run_test --cflags sort-order-2-1 sort-order-1-1 sort-order-3-1
run_test --cflags sort-order-1-1 sort-order-3-1 sort-order-2-1
run_test --cflags sort-order-1-1 sort-order-2-1 sort-order-3-1
-RESULT="-Wl,-O3 -Wl,-O2 -Wl,-O1 -L/path3/lib -L/path2/lib -L/path1/lib \
--lpath3 -lpath2 -lpath1"
+RESULT="-L/path3/lib -L/path2/lib -L/path1/lib -Wl,-O3 -lpath3 -Wl,-O2 \
+-lpath2 -Wl,-O1 -lpath1"
run_test --libs sort-order-3-1
run_test --libs sort-order-3-1 sort-order-2-1
run_test --libs sort-order-2-1 sort-order-3-1
@@ -78,8 +78,8 @@ run_test --cflags sort-order-2-2 sort-order-1-2 sort-order-3-2
run_test --cflags sort-order-1-2 sort-order-3-2 sort-order-2-2
run_test --cflags sort-order-1-2 sort-order-2-2 sort-order-3-2
-RESULT="-Wl,-O3 -Wl,-O2 -Wl,-O1 -L/path3/lib -L/path2/lib -L/path1/lib \
--lpath3 -lpath2 -lpath1"
+RESULT="-L/path3/lib -L/path2/lib -L/path1/lib -Wl,-O3 -lpath3 -Wl,-O2 \
+-lpath2 -Wl,-O1 -lpath1"
run_test --libs sort-order-3-2
run_test --libs sort-order-3-2 sort-order-2-2
run_test --libs sort-order-2-2 sort-order-3-2
@@ -91,7 +91,7 @@ run_test --libs sort-order-1-2 sort-order-3-2 sort-order-2-2
run_test --libs sort-order-1-2 sort-order-2-2 sort-order-3-2
# Check package set -3
-RESULT="-DPATH3 -DPATH2 -DPATH1 -I/path3/include -I/path2/include \
+RESULT="-DPATH1 -DPATH2 -DPATH3 -I/path3/include -I/path2/include \
-I/path1/include"
run_test --cflags sort-order-1-3
run_test --cflags sort-order-1-3 sort-order-2-3
@@ -103,8 +103,8 @@ run_test --cflags sort-order-2-3 sort-order-1-3 sort-order-3-3
run_test --cflags sort-order-1-3 sort-order-3-3 sort-order-2-3
run_test --cflags sort-order-1-3 sort-order-2-3 sort-order-3-3
-RESULT="-Wl,-O3 -Wl,-O2 -Wl,-O1 -L/path3/lib -L/path2/lib -L/path1/lib \
--lpath1 -lpath2 -lpath3"
+RESULT="-L/path3/lib -L/path2/lib -L/path1/lib -Wl,-O1 -lpath1 -Wl,-O2 \
+-lpath2 -Wl,-O3 -lpath3"
run_test --libs sort-order-1-3
run_test --libs sort-order-1-3 sort-order-2-3
run_test --libs sort-order-2-3 sort-order-1-3
@@ -119,7 +119,7 @@ run_test --libs sort-order-1-3 sort-order-2-3 sort-order-3-3
PKG_CONFIG_PATH="$order2"
# Check package set -1
-RESULT="-DPATH2 -DPATH3 -DPATH1 -I/path2/include -I/path3/include \
+RESULT="-DPATH3 -DPATH2 -DPATH1 -I/path2/include -I/path3/include \
-I/path1/include"
run_test --cflags sort-order-3-1
run_test --cflags sort-order-3-1 sort-order-2-1
@@ -131,8 +131,8 @@ run_test --cflags sort-order-2-1 sort-order-1-1 sort-order-3-1
run_test --cflags sort-order-1-1 sort-order-3-1 sort-order-2-1
run_test --cflags sort-order-1-1 sort-order-2-1 sort-order-3-1
-RESULT="-Wl,-O2 -Wl,-O3 -Wl,-O1 -L/path2/lib -L/path3/lib -L/path1/lib \
--lpath3 -lpath2 -lpath1"
+RESULT="-L/path2/lib -L/path3/lib -L/path1/lib -Wl,-O3 -lpath3 -Wl,-O2 \
+-lpath2 -Wl,-O1 -lpath1"
run_test --libs sort-order-3-1
run_test --libs sort-order-3-1 sort-order-2-1
run_test --libs sort-order-2-1 sort-order-3-1
@@ -144,7 +144,7 @@ run_test --libs sort-order-1-1 sort-order-3-1 sort-order-2-1
run_test --libs sort-order-1-1 sort-order-2-1 sort-order-3-1
# Check package set -2
-RESULT="-DPATH2 -DPATH3 -DPATH1 -I/path2/include -I/path3/include \
+RESULT="-DPATH3 -DPATH2 -DPATH1 -I/path2/include -I/path3/include \
-I/path1/include"
run_test --cflags sort-order-3-2
run_test --cflags sort-order-3-2 sort-order-2-2
@@ -156,8 +156,8 @@ run_test --cflags sort-order-2-2 sort-order-1-2 sort-order-3-2
run_test --cflags sort-order-1-2 sort-order-3-2 sort-order-2-2
run_test --cflags sort-order-1-2 sort-order-2-2 sort-order-3-2
-RESULT="-Wl,-O2 -Wl,-O3 -Wl,-O1 -L/path2/lib -L/path3/lib -L/path1/lib \
--lpath3 -lpath2 -lpath1"
+RESULT="-L/path2/lib -L/path3/lib -L/path1/lib -Wl,-O3 -lpath3 -Wl,-O2 \
+-lpath2 -Wl,-O1 -lpath1"
run_test --libs sort-order-3-2
run_test --libs sort-order-3-2 sort-order-2-2
run_test --libs sort-order-2-2 sort-order-3-2
@@ -169,7 +169,7 @@ run_test --libs sort-order-1-2 sort-order-3-2 sort-order-2-2
run_test --libs sort-order-1-2 sort-order-2-2 sort-order-3-2
# Check package set -3
-RESULT="-DPATH2 -DPATH3 -DPATH1 -I/path2/include -I/path3/include \
+RESULT="-DPATH1 -DPATH2 -DPATH3 -I/path2/include -I/path3/include \
-I/path1/include"
run_test --cflags sort-order-1-3
run_test --cflags sort-order-1-3 sort-order-2-3
@@ -181,8 +181,8 @@ run_test --cflags sort-order-2-3 sort-order-1-3 sort-order-3-3
run_test --cflags sort-order-1-3 sort-order-3-3 sort-order-2-3
run_test --cflags sort-order-1-3 sort-order-2-3 sort-order-3-3
-RESULT="-Wl,-O2 -Wl,-O3 -Wl,-O1 -L/path2/lib -L/path3/lib -L/path1/lib \
--lpath1 -lpath2 -lpath3"
+RESULT="-L/path2/lib -L/path3/lib -L/path1/lib -Wl,-O1 -lpath1 -Wl,-O2 \
+-lpath2 -Wl,-O3 -lpath3"
run_test --libs sort-order-1-3
run_test --libs sort-order-1-3 sort-order-2-3
run_test --libs sort-order-2-3 sort-order-1-3
diff --git a/check/check-whitespace b/check/check-whitespace
index aa551b5..e4388ba 100755
--- a/check/check-whitespace
+++ b/check/check-whitespace
@@ -9,5 +9,5 @@ RESULT='-Dlala=misc -I/usr/white\ space/include -I$(top_builddir) -Iinclude\ dir
run_test --cflags whitespace
# expect libs from whitespace
-RESULT="-r:foo -L/usr/white\\ space/lib -lfoo\\ bar -lbar\\ baz"
+RESULT="-L/usr/white\\ space/lib -lfoo\\ bar -lbar\\ baz -r:foo"
run_test --libs whitespace