summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-07-03 21:28:28 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-07-03 21:28:28 +0000
commitb2d4c1ba83125269a35611b86afb0d0e8d0464aa (patch)
treef64c87aafd2daddb831909e22984e078c94fa6bc /regress/usr.bin
parent95334d4b9c945e2be188ea822dbf2ef23973cee6 (diff)
Add a regression test for the static libraries ordering issue
exposed by Xenocara on vax. Worked with src/usr.bin/pkg-config/pkg-config rev 1.27 found in OpenBSD 4.9. Fails since.
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/pkg-config/Makefile9
-rw-r--r--regress/usr.bin/pkg-config/pcdir/static-order1.pc9
-rw-r--r--regress/usr.bin/pkg-config/pcdir/static-order2.pc8
-rw-r--r--regress/usr.bin/pkg-config/pcdir/static-order3.pc8
4 files changed, 33 insertions, 1 deletions
diff --git a/regress/usr.bin/pkg-config/Makefile b/regress/usr.bin/pkg-config/Makefile
index fc6717d76a3..c0d06d14414 100644
--- a/regress/usr.bin/pkg-config/Makefile
+++ b/regress/usr.bin/pkg-config/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.27 2011/11/17 11:38:13 jasper Exp $
+# $OpenBSD: Makefile,v 1.28 2012/07/03 21:28:26 matthieu Exp $
REGRESS_TARGETS=cmp-vers1-1 \
cmp-vers1-2 \
@@ -356,6 +356,13 @@ static-libs4:
--errors-to-stdout --libs --static requires-test > ${GOT}
@diff -u ${WANT} ${GOT}
+static-order:
+ # Test Requires.private order
+ @echo "-L/usr/X11R6/lib -lstatic-order1 -lstatic-order2 -lstatic-order3" > ${WANT}
+ @PKG_CONFIG_PATH=${.CURDIR}/pcdir/ ${PKG_CONFIG} --print-errors \
+ --errors-to-stdout --static --libs static-order1 > ${GOT}
+ @diff -u ${WANT} ${GOT}
+
# Misc. tests
variable-get-1:
# Test --variable
diff --git a/regress/usr.bin/pkg-config/pcdir/static-order1.pc b/regress/usr.bin/pkg-config/pcdir/static-order1.pc
new file mode 100644
index 00000000000..28f962ae9f2
--- /dev/null
+++ b/regress/usr.bin/pkg-config/pcdir/static-order1.pc
@@ -0,0 +1,9 @@
+prefix=/usr/X11R6
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+
+Name: static-order1
+Description: static order test lib1
+Version: 1.0
+Requires.private: static-order2 static-order3
+Libs: -L${libdir} -lstatic-order1
diff --git a/regress/usr.bin/pkg-config/pcdir/static-order2.pc b/regress/usr.bin/pkg-config/pcdir/static-order2.pc
new file mode 100644
index 00000000000..d2ac2cc2082
--- /dev/null
+++ b/regress/usr.bin/pkg-config/pcdir/static-order2.pc
@@ -0,0 +1,8 @@
+prefix=/usr/X11R6
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+
+Name: static-order4
+Description: static order test lib 2
+Version: 1.0
+Libs: -L${libdir} -lstatic-order2
diff --git a/regress/usr.bin/pkg-config/pcdir/static-order3.pc b/regress/usr.bin/pkg-config/pcdir/static-order3.pc
new file mode 100644
index 00000000000..36fdd0d85cd
--- /dev/null
+++ b/regress/usr.bin/pkg-config/pcdir/static-order3.pc
@@ -0,0 +1,8 @@
+prefix=/usr/X11R6
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+
+Name: static-order3
+Description: static order test lib 3
+Version: 1.0
+Libs: -L${libdir} -lstatic-order3