]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
intl: Add special hack for GCC.
authorBruno Haible <bruno@clisp.org>
Tue, 21 Jun 2022 01:46:34 +0000 (03:46 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 21 Jun 2022 01:46:34 +0000 (03:46 +0200)
Based on the commit
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=4a1493f0603262a7dc1114d9827353e9810e63dc
by Jakub Jelinek <jakub@redhat.com>.

* gettext-runtime/intl/configure.ac: Accept option --enable-host-shared.
Set PICFLAG.
* gettext-runtime/intl/Makefile.am (AM_CFLAGS): Add the PICFLAG.
* gnulib-local/modules/gettext-runtime-intl-misc (Makefile.am): Add the PICFLAG
to AM_CFLAGS.

gettext-runtime/intl/Makefile.am
gettext-runtime/intl/configure.ac
gnulib-local/modules/gettext-runtime-intl-misc

index c33c7b7858e3162004d50cd9c8d71e7c0c2756f3..d62a90e0cd197496b57a58449b29aa08c95a6117 100644 (file)
@@ -1,6 +1,6 @@
 ## Makefile for the gettext-runtime/intl and gettext-tools/intl subdirectories
 ## of GNU gettext.
-## Copyright (C) 1995-1998, 2000-2007, 2009-2021 Free Software Foundation, Inc.
+## Copyright (C) 1995-1998, 2000-2007, 2009-2022 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
@@ -58,6 +58,9 @@ if WOE32DLL
 AM_LDFLAGS = -Wl,--export-all-symbols
 endif
 
+# Support building libintl.a with -fPIC (needed by GCC).
+AM_CFLAGS += @PICFLAG@
+
 
 # Library include file and code.
 
index 171714cb7b4f1f659307b0d3b41a2e04bb9c43d7..7ce50c527c7dc01e6ab3b247b7cc7ab50d846e0f 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the gettext-runtime directory of GNU gettext
-dnl Copyright (C) 1995-2016, 2018-2021 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2016, 2018-2022 Free Software Foundation, Inc.
 dnl
 dnl This program is free software: you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
@@ -78,6 +78,14 @@ case "$host_os" in
 esac
 AM_CONDITIONAL([WINDOWS_NATIVE], [test $is_windows_native = yes])
 
+dnl Support building libintl.a with -fPIC (needed by GCC).
+dnl <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100096>
+AC_ARG_ENABLE([host-shared],
+  [AS_HELP_STRING([--enable-host-shared], [special hack for GCC])],
+  [PICFLAG='-fPIC'],
+  [PICFLAG=])
+AC_SUBST([PICFLAG])
+
 dnl Checks for libraries.
 
 dnl These are the only lines required to internationalize the package.
index 1c9f3c758726d8f8f89c1b643feed3b0492b81c5..671b5f6e9c557016152b8df04f74a1fa018606b3 100644 (file)
@@ -17,6 +17,9 @@ AM_CPPFLAGS += \
   -Dset_relocation_prefix=libintl_set_relocation_prefix \
   -DDEPENDS_ON_LIBICONV=1
 
+# Support building libintl.a with -fPIC (needed by GCC).
+AM_CFLAGS += @PICFLAG@
+
 Include:
 
 License: