From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [ptxdist] [PATCH v2 2/2] xmlstarlet: fix linking when libssl is built without zlib
Date: Sun, 3 Mar 2019 19:32:36 +0100 [thread overview]
Message-ID: <20190303183236.18138-3-rhi@pengutronix.de> (raw)
In-Reply-To: <20190303183236.18138-1-rhi@pengutronix.de>
Adapt the already existing patch and its description to prevent a
[...]/arm-v7a-linux-gnueabihf/bin/ld: cannot find -lz
error message when building openssl without zlib support.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
...gainst-shared-instead-of-static-lib.patch} | 38 ++++++++++---------
patches/xmlstarlet-1.0.1/series | 4 +-
2 files changed, 23 insertions(+), 19 deletions(-)
rename patches/xmlstarlet-1.0.1/{0004-xmlstarlet-fix-linking.patch => 0004-xmlstarlet-link-against-shared-instead-of-static-lib.patch} (72%)
diff --git a/patches/xmlstarlet-1.0.1/0004-xmlstarlet-fix-linking.patch b/patches/xmlstarlet-1.0.1/0004-xmlstarlet-link-against-shared-instead-of-static-lib.patch
similarity index 72%
rename from patches/xmlstarlet-1.0.1/0004-xmlstarlet-fix-linking.patch
rename to patches/xmlstarlet-1.0.1/0004-xmlstarlet-link-against-shared-instead-of-static-lib.patch
index 90aa47567..fb77ecd6d 100644
--- a/patches/xmlstarlet-1.0.1/0004-xmlstarlet-fix-linking.patch
+++ b/patches/xmlstarlet-1.0.1/0004-xmlstarlet-link-against-shared-instead-of-static-lib.patch
@@ -1,24 +1,28 @@
From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Mon, 11 Jan 2010 16:03:22 +0100
-Subject: [PATCH] xmlstarlet: fix linking
+Date: Fri, 1 Mar 2019 15:11:36 +0100
+Subject: [PATCH] xmlstarlet: link against shared instead of static libs
-xmlstarlet links libexslt statically. The configure script does not check for
-the dependencies. This fails if libexslt links agains libgcrypt.
+xmlstarlet links against libxml2 and libexslt statically. The configure
+script does not check for the dependencies. This fails if libexslt links
+agains libgcrypt or if libxml2 does _not_ link against zlib (then zlib
+may not be available at all).
-This patch changes the configure script, so that all libs are linked
-dynamically. The linker does the rest.
+This patch changes the configure script so that all libs are linked
+dynamically. The linker can infer their respective dependencies from the
+ELF header in the .so files.
-For ptxdist this is ok. We install the libs already.
-Not for upstream.
+For ptxdist this is ok. We install the libs already. Not for upstream.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Forwarded: not-needed
+[rhi: also remove now unneeded -l flags and adapt patch description]
+Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
configure.in | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/configure.in b/configure.in
-index 856a451cac7f..713d2b34dd32 100644
+index 856a451cac7f..e1c99ba07c81 100644
--- a/configure.in
+++ b/configure.in
@@ -31,7 +31,7 @@ AC_ARG_WITH(libxml-prefix,
@@ -26,7 +30,7 @@ index 856a451cac7f..713d2b34dd32 100644
LIBXML_PREFIX=$withval
LIBXML_CFLAGS="-I$withval/include/libxml2 -I$withval/include/libxml"
- LIBXML_LIBS="$withval/lib/libxml2.a -lz -lm -lpthread -ldl"
-+ LIBXML_LIBS="$withval/lib/libxml2.so -lz -lm -lpthread -ldl"
++ LIBXML_LIBS="$withval/lib/libxml2.so"
)
AC_ARG_WITH(libxml-include-prefix,
@@ -35,14 +39,14 @@ index 856a451cac7f..713d2b34dd32 100644
AC_ARG_WITH(libxml-libs-prefix,
[ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs],
- LIBXML_LIBS="$withval/libxml2.a -lz -lm -lpthread -ldl"
-+ LIBXML_LIBS="$withval/libxml2.so -lz -lm -lpthread -ldl"
++ LIBXML_LIBS="$withval/libxml2.so"
)
AC_ARG_WITH(libxml-src,
[ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)],
LIBXML_SRC="$withval"
- LIBXML_LIBS="$withval/.libs/libxml2.a -lz -lm -lpthread"
-+ LIBXML_LIBS="$withval/.libs/libxml2.so -lz -lm -lpthread"
++ LIBXML_LIBS="$withval/.libs/libxml2.so"
LIBXML_CFLAGS="-I$withval/include/libxml2 -I$withval/include/libxml -I$withval/include"
)
@@ -51,7 +55,7 @@ index 856a451cac7f..713d2b34dd32 100644
LIBXSLT_PREFIX=$withval
LIBXSLT_CFLAGS="-I$withval/include/libxslt -I$withval/include/libexslt"
- LIBXSLT_LIBS="$withval/lib/libxslt.a $withval/lib/libexslt.a -lz -lm -lpthread"
-+ LIBXSLT_LIBS="$withval/lib/libxslt.so $withval/lib/libexslt.so -lz -lm -lpthread"
++ LIBXSLT_LIBS="$withval/lib/libxslt.so $withval/lib/libexslt.so"
)
AC_ARG_WITH(libxslt-include-prefix,
@@ -60,14 +64,14 @@ index 856a451cac7f..713d2b34dd32 100644
AC_ARG_WITH(libxslt-libs-prefix,
[ --with-libxslt-libs-prefix=[PFX] Specify location of libxslt libs],
- LIBXSLT_LIBS="$withval/libxslt.a $withval/libexslt.a -lz -lm -lpthread"
-+ LIBXSLT_LIBS="$withval/libxslt.so $withval/libexslt.so -lz -lm -lpthread"
++ LIBXSLT_LIBS="$withval/libxslt.so $withval/libexslt.so"
)
AC_ARG_WITH(libxslt-src,
[ --with-libxslt-src=[DIR] For libxslt thats not installed yet (sets all three above)],
LIBXSLT_SRC="$withval"
- LIBXSLT_LIBS="$withval/libxslt/.libs/libxslt.a $withval/libexslt/.libs/libexslt.a -lz -lm -lpthread"
-+ LIBXSLT_LIBS="$withval/libxslt/.libs/libxslt.so $withval/libexslt/.libs/libexslt.so -lz -lm -lpthread"
++ LIBXSLT_LIBS="$withval/libxslt/.libs/libxslt.so $withval/libexslt/.libs/libexslt.so"
LIBXSLT_CFLAGS="-I$withval/libxslt -I$withval/libexslt -I$withval"
)
@@ -76,7 +80,7 @@ index 856a451cac7f..713d2b34dd32 100644
if test "x$LIBXML_LIBS" = "x"
then
- LIBXML_LIBS="${LIBXML_PREFIX}/lib/libxml2.a -lz -lm -lpthread -ldl"
-+ LIBXML_LIBS="${LIBXML_PREFIX}/lib/libxml2.so -lz -lm -lpthread -ldl"
++ LIBXML_LIBS="${LIBXML_PREFIX}/lib/libxml2.so"
fi
dnl
@@ -85,7 +89,7 @@ index 856a451cac7f..713d2b34dd32 100644
if test "x$LIBXSLT_LIBS" = "x"
then
- LIBXSLT_LIBS="${LIBXSLT_PREFIX}/lib/libxslt.a ${LIBXSLT_PREFIX}/lib/libexslt.a -lz -lm -lpthread"
-+ LIBXSLT_LIBS="${LIBXSLT_PREFIX}/lib/libxslt.so ${LIBXSLT_PREFIX}/lib/libexslt.so -lz -lm -lpthread"
++ LIBXSLT_LIBS="${LIBXSLT_PREFIX}/lib/libxslt.so ${LIBXSLT_PREFIX}/lib/libexslt.so"
fi
dnl
diff --git a/patches/xmlstarlet-1.0.1/series b/patches/xmlstarlet-1.0.1/series
index c6360809b..c6606cb04 100644
--- a/patches/xmlstarlet-1.0.1/series
+++ b/patches/xmlstarlet-1.0.1/series
@@ -3,5 +3,5 @@
0001-xmlstarlet-use-debug-functions-only-if-libxml2-has-d.patch
0002-xmlstarlet-fix-semicolon-in-wrong-place.patch
0003-xmlstarlet-bail-out-if-no-dtd-parsing-support-in-lib.patch
-0004-xmlstarlet-fix-linking.patch
-# 5ce4c70ec2f7f73bf4105b9adcc9682e - git-ptx-patches magic
+0004-xmlstarlet-link-against-shared-instead-of-static-lib.patch
+# 338410071307078bc0758338bee4bf1c - git-ptx-patches magic
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
prev parent reply other threads:[~2019-03-03 18:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 13:31 [ptxdist] [PATCH] xmlstarlet: depend on zlib Roland Hieber
2019-03-03 18:32 ` [ptxdist] [PATCH v2 0/2] xmlstarlet: address zlib linking errors Roland Hieber
2019-03-03 18:32 ` [ptxdist] [PATCH v2 1/2] xmlstarlet: convert old patch series with git-ptx-patches Roland Hieber
2019-03-03 18:32 ` Roland Hieber [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190303183236.18138-3-rhi@pengutronix.de \
--to=rhi@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox