public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r9-9449] intl: Add --enable-host-shared support [PR100096]
@ 2021-04-20 23:34 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2021-04-20 23:34 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e173d85243b7732aa3ef29ebf7ecc6a54d21320c

commit r9-9449-ge173d85243b7732aa3ef29ebf7ecc6a54d21320c
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Apr 16 18:32:27 2021 +0200

    intl: Add --enable-host-shared support [PR100096]
    
    As mentioned in the PR, building gcc with jit enabled and
    --enable-host-shared doesn't work on NetBSD/i?86, as libgccjit.so.0
    has text relocations.
    The r0-125846-g459260ecf8b420b029601a664cdb21c185268ecb changes
    added --enable-host-shared support to various libraries, but didn't
    add it to intl/ subdirectory; on Linux it isn't really needed, because
    all: all-no
    all-no: #nothing
    but on other OSes intl/libintl.a is built.
    
    The following patch makes sure it is built with -fPIC when
    --enable-host-shared is used.
    
    2021-04-16  Jakub Jelinek  <jakub@redhat.com>
    
            PR jit/100096
            * configure.ac: Add --enable-host-shared support.
            * Makefile.in: Update copyright.  Add @PICFLAG@ to CFLAGS.
            * configure: Regenerated.
    
    (cherry picked from commit a11f31102706e33f66b60367d6863613ab3bd051)

Diff:
---
 intl/Makefile.in  |  4 ++--
 intl/configure    | 12 ++++++++++++
 intl/configure.ac |  6 ++++++
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/intl/Makefile.in b/intl/Makefile.in
index 3dd0b7fe8fd..32154e6c89d 100644
--- a/intl/Makefile.in
+++ b/intl/Makefile.in
@@ -1,5 +1,5 @@
 # Makefile for directory with message catalog handling library of GNU gettext
-# Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
+# Copyright (C) 1995-2021 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU Library General Public License as published
@@ -45,7 +45,7 @@ RANLIB = @RANLIB@
 YACC = @INTLBISON@ -y -d
 YFLAGS = --name-prefix=__gettext
 CPPFLAGS = @CPPFLAGS@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ @PICFLAG@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
 DEFS = -DHAVE_CONFIG_H
diff --git a/intl/configure b/intl/configure
index 2f35993148e..0991eac0bdc 100755
--- a/intl/configure
+++ b/intl/configure
@@ -622,6 +622,7 @@ ac_unique_file="gettext.c"
 ac_header_list=
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+PICFLAG
 INCINTL
 LIBINTL_DEP
 MAINT
@@ -722,6 +723,7 @@ with_libiconv_prefix
 with_included_gettext
 with_libintl_prefix
 enable_maintainer_mode
+enable_host_shared
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1346,6 +1348,7 @@ Optional Features:
   --disable-nls           do not use Native Language Support
   --disable-rpath         do not hardcode runtime library paths
   --enable-maintainer-mode enable rules only needed by maintainers
+  --enable-host-shared    build host code as shared libraries
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -6757,6 +6760,15 @@ case $USE_INCLUDED_LIBINTL in
     ;;
 esac
 
+# Check whether --enable-host-shared was given.
+if test "${enable_host_shared+set}" = set; then :
+  enableval=$enable_host_shared; PICFLAG=-fPIC
+else
+  PICFLAG=
+fi
+
+
+
 ac_config_files="$ac_config_files Makefile config.intl"
 
 cat >confcache <<\_ACEOF
diff --git a/intl/configure.ac b/intl/configure.ac
index 48832b98f1a..708ae65c551 100644
--- a/intl/configure.ac
+++ b/intl/configure.ac
@@ -47,5 +47,11 @@ case $USE_INCLUDED_LIBINTL in
     ;;
 esac
 
+AC_ARG_ENABLE(host-shared,
+[AS_HELP_STRING([--enable-host-shared],
+		[build host code as shared libraries])],
+[PICFLAG=-fPIC], [PICFLAG=])
+AC_SUBST(PICFLAG)
+
 AC_CONFIG_FILES(Makefile config.intl)
 AC_OUTPUT


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-20 23:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 23:34 [gcc r9-9449] intl: Add --enable-host-shared support [PR100096] Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).