intl: Add special hack for GCC.

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.
This commit is contained in:
Bruno Haible 2022-06-21 03:46:34 +02:00
parent 6f048e30a8
commit fdc2bd236a
3 changed files with 16 additions and 2 deletions

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

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

View 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: