]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
configure: don't link shared libraries explicitly with -lc
authorDan Kegel <dank@kegel.com>
Sun, 21 Jun 2020 00:26:00 +0000 (17:26 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 17 Jul 2020 13:34:32 +0000 (15:34 +0200)
The -lc was introduced by d6231142d2b883a8c3b253fa34992b5cdb4ac2fe :
which said in part
"Changes in 1.2.3.2 (3 September 2006)
...
- Rig configure --shared to build both shared and static [Teredesai, Truta]"

It's not clear why it was needed.  On powerpc, linking -lc explicitly
causes __moddi3 and __stack_chk_fail_local to swap location in the
binary.
If we want configure and cmake to generate identical shared libraries,
either we need to link -lc explicitly in both configure and cmake,
or in neither.   Occam's Razor suggests omitting it from configure
rather than adding it to cmake.

Makefile.in
configure

index 3b476d096cb1d67fe9897d4c602c7ce04c707d9e..82f46acd9407d341994cbd88b896ed32c48792f3 100644 (file)
@@ -51,7 +51,7 @@ RCOBJS=
 STRIP=
 RANLIB=ranlib
 LDCONFIG=ldconfig
-LDSHAREDLIBC=-lc
+LDSHAREDLIBC=
 EXE=
 
 SRCDIR=.
index 457659027dbee6e001fe26cc4aa901a1c860c47e..2cc591c115191c09932d4d5b0efbbf71f120225b 100755 (executable)
--- a/configure
+++ b/configure
@@ -69,7 +69,7 @@ fi
 # set defaults before processing command line options
 LDCONFIG=${LDCONFIG-"ldconfig"}
 LDFLAGS=${LDFLAGS}
-LDSHAREDLIBC="${LDSHAREDLIBC--lc}"
+LDSHAREDLIBC="${LDSHAREDLIBC}"
 DEFFILE=
 RC=
 RCFLAGS=