From: Dan Kegel Date: Sun, 21 Jun 2020 00:26:00 +0000 (-0700) Subject: configure: don't link shared libraries explicitly with -lc X-Git-Tag: 1.9.9-b1~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7ba1309ee495622f3940b99a4c7caac177fb099;p=thirdparty%2Fzlib-ng.git configure: don't link shared libraries explicitly with -lc 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. --- diff --git a/Makefile.in b/Makefile.in index 3b476d09..82f46acd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -51,7 +51,7 @@ RCOBJS= STRIP= RANLIB=ranlib LDCONFIG=ldconfig -LDSHAREDLIBC=-lc +LDSHAREDLIBC= EXE= SRCDIR=. diff --git a/configure b/configure index 45765902..2cc591c1 100755 --- 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=