From: Bruno Haible Date: Tue, 2 Jan 2018 17:35:17 +0000 (+0100) Subject: Don't use -lc explicitly when linking with libtool. X-Git-Tag: v0.20~444 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7913e33dd19b1a3effeed58d6c83cf723def2113;p=thirdparty%2Fgettext.git Don't use -lc explicitly when linking with libtool. libtool has logic that determines whether it should add -lc, and this logic works fine on all modern platforms. Reported by Michael Forney at . * gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Don't set LTLIBC. * gettext-runtime/intl/Makefile.in (libintl.la, libgnuintl.la): Don't use LTLIBC. --- diff --git a/gettext-runtime/intl/Makefile.in b/gettext-runtime/intl/Makefile.in index 1422bcc22..63a5c8763 100644 --- a/gettext-runtime/intl/Makefile.in +++ b/gettext-runtime/intl/Makefile.in @@ -1,5 +1,5 @@ # Makefile for directory with message catalog handling library of GNU gettext -# Copyright (C) 1995-1998, 2000-2007, 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 1995-1998, 2000-2007, 2009-2018 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by @@ -227,7 +227,7 @@ libintl.a libgnuintl.a: $(OBJECTS) libintl.la libgnuintl.la: $(OBJECTS) $(OBJECTS_RES_@WOE32@) $(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=link \ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ - $(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) @LTLIBTHREAD@ @LTLIBC@ \ + $(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) @LTLIBTHREAD@ \ $(OBJECTS_RES_@WOE32@) \ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ -rpath $(libdir) \ diff --git a/gettext-runtime/m4/intl.m4 b/gettext-runtime/m4/intl.m4 index 646c5b5ae..61cd9f631 100644 --- a/gettext-runtime/m4/intl.m4 +++ b/gettext-runtime/m4/intl.m4 @@ -1,5 +1,5 @@ -# intl.m4 serial 30 (gettext-0.19.9) -dnl Copyright (C) 1995-2014, 2016-2017 Free Software Foundation, Inc. +# intl.m4 serial 31 (gettext-0.19.9) +dnl Copyright (C) 1995-2014, 2016-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -136,18 +136,6 @@ AC_DEFUN([AM_INTL_SUBDIR], AC_CHECK_TOOL([WINDRES], [windres]) fi - dnl Determine whether when creating a library, "-lc" should be passed to - dnl libtool or not. On many platforms, it is required for the libtool option - dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool - dnl in the *.la files - makes it impossible to create multithreaded programs, - dnl because libtool also reorders the -lc to come before the -pthread, and - dnl this disables pthread_create() . - case "$host_os" in - hpux*) LTLIBC="" ;; - *) LTLIBC="-lc" ;; - esac - AC_SUBST([LTLIBC]) - dnl Rename some macros and functions used for locking. AH_BOTTOM([ #define __libc_lock_t gl_lock_t