]> gcc.gnu.org Git - gcc.git/commitdiff
libcody: Allow PIC [PR 98324]
authorNathan Sidwell <nathan@acm.org>
Thu, 17 Dec 2020 14:22:43 +0000 (06:22 -0800)
committerNathan Sidwell <nathan@acm.org>
Thu, 17 Dec 2020 17:56:42 +0000 (09:56 -0800)
While this doesn't fix 98324, it was an omission.  Cribbed code from
libcpp to build libcody as PIC.

libcody/
* configure.ac: Add --enable-host-shared.
* Makefile.in: Add FLAGPIC.
* configure: Regenerated.

libcody/Makefile.in
libcody/configure
libcody/configure.ac

index 4b457adc3a4fe57b3412708bba941c8ff84e4667..28ed3a22299af98121b19ceab167e3faf61b7ea3 100644 (file)
@@ -53,7 +53,7 @@ INSTALL := $(srcdir)/build-aux/install-sh
 # C++ compiler options
 CXXFLAGS := @CXXFLAGS@
 CXXINC := $(filter -I%,@CXX@)
-CXXOPTS := $(CXXFLAGS)
+CXXOPTS := $(CXXFLAGS) @PICFLAG@
 ifeq ($(notdir $(firstword $(CXX))),g++)
 # It's GCC, or pretending to be it -- so it better smell like it!
 # Code generation
index 7699e7a1b2fb9e8c4d6b0cbce3503dcd35399972..b9967a1cd8db8b872dd65adf4a2d62a8164f014c 100755 (executable)
@@ -591,6 +591,7 @@ ALOY
 DOXYGEN
 AR
 EXCEPTIONS
+PICFLAG
 CONFIG_FILES
 SUBDIRS
 configure_args
@@ -658,6 +659,7 @@ enable_maintainer_mode
 with_compiler
 with_bugurl
 enable_checking
+enable_host_shared
 enable_exceptions
 '
       ac_precious_vars='build_alias
@@ -1290,6 +1292,7 @@ Optional Features:
                           only specific categories of checks. Categories are:
                           yes,no,all,none,release. Flags are: misc,valgrind or
                           other strings
+  --enable-host-shared    build host code as shared libraries
   --enable-exceptions     enable exceptions & rtti
 
 Optional Packages:
@@ -2752,6 +2755,15 @@ else
 
 fi
 
+# Enable --enable-host-shared.
+# Check whether --enable-host-shared was given.
+if test "${enable_host_shared+set}" = set; then :
+  enableval=$enable_host_shared; PICFLAG=-fPIC
+else
+  PICFLAG=
+fi
+
+
 
 # Check whether --enable-exceptions was given.
 if test "${enable_exceptions+set}" = set; then :
index 7461dcf4b9ce6b49ec1a2e50ed605fe2eb409bb7..511fe261b459247d6a69b34ba44f64d3ec4b0e2e 100644 (file)
@@ -66,6 +66,12 @@ else
   AC_DEFINE(NMS_CHECKING, 0)
 fi
 
+# Enable --enable-host-shared.
+AC_ARG_ENABLE(host-shared,
+[AS_HELP_STRING([--enable-host-shared],
+               [build host code as shared libraries])],
+[PICFLAG=-fPIC], [PICFLAG=])
+AC_SUBST(PICFLAG)
 
 NMS_ENABLE_EXCEPTIONS
 
This page took 0.067254 seconds and 5 git commands to generate.