summaryrefslogtreecommitdiffstats
path: root/libcpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog9
-rw-r--r--libcpp/Makefile.in5
-rwxr-xr-xlibcpp/configure13
-rw-r--r--libcpp/configure.ac7
4 files changed, 32 insertions, 2 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 862333e1422..b4de4f5eba5 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,12 @@
+2013-10-15 David Malcolm <dmalcolm@redhat.com>
+
+ * Makefile.in (PICFLAG): New.
+ (ALL_CFLAGS): Add PICFLAG.
+ (ALL_CXXFLAGS): Likewise.
+ * configure.ac: Add --enable-host-shared, setting up new
+ PICFLAG variable.
+ * configure: Regenerate.
+
2013-08-07 Richard Earnshaw <rearnsha@arm.com>
* configure.ac: Set need_64bit_hwint for all arm targets.
diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
index 2353c9c043b..30bf8963cd8 100644
--- a/libcpp/Makefile.in
+++ b/libcpp/Makefile.in
@@ -57,6 +57,7 @@ CCDEPMODE = @CCDEPMODE@
CXXDEPMODE = @CXXDEPMODE@
DEPDIR = @DEPDIR@
NOEXCEPTION_FLAGS = @noexception_flags@
+PICFLAG = @PICFLAG@
datarootdir = @datarootdir@
datadir = @datadir@
@@ -72,9 +73,9 @@ depcomp = $(SHELL) $(srcdir)/../depcomp
INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \
-I$(srcdir)/include
-ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS)
+ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(PICFLAG)
ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(NOEXCEPTION_FLAGS) $(INCLUDES) \
- $(CPPFLAGS)
+ $(CPPFLAGS) $(PICFLAG)
# The name of the compiler to use.
COMPILER = $(CXX)
diff --git a/libcpp/configure b/libcpp/configure
index 60ce2e569dd..782a7105ac3 100755
--- a/libcpp/configure
+++ b/libcpp/configure
@@ -592,6 +592,7 @@ ac_includes_default="\
#endif"
ac_subst_vars='LTLIBOBJS
+PICFLAG
MAINT
USED_CATALOGS
PACKAGE
@@ -701,6 +702,7 @@ with_libiconv_prefix
enable_maintainer_mode
enable_checking
enable_canonical_system_headers
+enable_host_shared
'
ac_precious_vars='build_alias
host_alias
@@ -1340,6 +1342,7 @@ Optional Features:
other strings
--enable-canonical-system-headers
enable or disable system headers canonicalization
+ --enable-host-shared build host code as shared libraries
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -7204,6 +7207,16 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
esac
+# 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
+
+
+
# Output.
ac_config_headers="$ac_config_headers config.h:config.in"
diff --git a/libcpp/configure.ac b/libcpp/configure.ac
index 799301f0722..a70603c95a6 100644
--- a/libcpp/configure.ac
+++ b/libcpp/configure.ac
@@ -220,6 +220,13 @@ case $target in
[Define to 1 if you can assemble SSE4 insns.])])
esac
+# 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)
+
# Output.
AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])
OpenPOWER on IntegriCloud