]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Don't use -lc explicitly when linking with libtool.
authorBruno Haible <bruno@clisp.org>
Tue, 2 Jan 2018 17:35:17 +0000 (18:35 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 2 Jan 2018 17:35:17 +0000 (18:35 +0100)
libtool has logic that determines whether it should add -lc, and this logic
works fine on all modern platforms.

Reported by Michael Forney <mforney@mforney.org>
at <https://savannah.gnu.org/bugs/?40192>.

* 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.

gettext-runtime/intl/Makefile.in
gettext-runtime/m4/intl.m4

index 1422bcc22bd5596bcb124d98fa7460f90760d407..63a5c87638599fe9d1a2dbc51fc872b522f3742b 100644 (file)
@@ -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) \
index 646c5b5aec10be1c6423159bd665051b54c48253..61cd9f63106c932f5d3c9457f3a466702baf6973 100644 (file)
@@ -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() <http://docs.hp.com/en/1896/pthreads.html>.
-  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