From b2d4c1ba83125269a35611b86afb0d0e8d0464aa Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Tue, 3 Jul 2012 21:28:28 +0000 Subject: 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. --- regress/usr.bin/pkg-config/Makefile | 9 ++++++++- regress/usr.bin/pkg-config/pcdir/static-order1.pc | 9 +++++++++ regress/usr.bin/pkg-config/pcdir/static-order2.pc | 8 ++++++++ regress/usr.bin/pkg-config/pcdir/static-order3.pc | 8 ++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 regress/usr.bin/pkg-config/pcdir/static-order1.pc create mode 100644 regress/usr.bin/pkg-config/pcdir/static-order2.pc create mode 100644 regress/usr.bin/pkg-config/pcdir/static-order3.pc (limited to 'regress/usr.bin') 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 -- cgit v1.2.3