From: Bruno Haible Date: Tue, 21 Jun 2022 01:46:34 +0000 (+0200) Subject: intl: Add special hack for GCC. X-Git-Tag: v0.22~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdc2bd236a6a62b477c1fca4205df10b0e64266b;p=thirdparty%2Fgettext.git 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 . * 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. --- diff --git a/gettext-runtime/intl/Makefile.am b/gettext-runtime/intl/Makefile.am index c33c7b785..d62a90e0c 100644 --- a/gettext-runtime/intl/Makefile.am +++ b/gettext-runtime/intl/Makefile.am @@ -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. diff --git a/gettext-runtime/intl/configure.ac b/gettext-runtime/intl/configure.ac index 171714cb7..7ce50c527 100644 --- a/gettext-runtime/intl/configure.ac +++ b/gettext-runtime/intl/configure.ac @@ -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 +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. diff --git a/gnulib-local/modules/gettext-runtime-intl-misc b/gnulib-local/modules/gettext-runtime-intl-misc index 1c9f3c758..671b5f6e9 100644 --- a/gnulib-local/modules/gettext-runtime-intl-misc +++ b/gnulib-local/modules/gettext-runtime-intl-misc @@ -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: