aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2021-12-08 20:58:34 +0000
committerIain Sandoe <iain@sandoe.co.uk>2021-12-15 14:49:59 +0000
commit3e714cc55efe5e402a7db6703dbfd70baa53dfbe (patch)
tree4de3eeae1a8d67cbc017e18e9eb84a3fc2d1c22d
parent308d688bebdd1f29cb82c7d0e09b43e57c581659 (diff)
downloadgcc-3e714cc55efe5e402a7db6703dbfd70baa53dfbe.zip
gcc-3e714cc55efe5e402a7db6703dbfd70baa53dfbe.tar.gz
gcc-3e714cc55efe5e402a7db6703dbfd70baa53dfbe.tar.bz2
configure: Account CXXFLAGS in gcc-plugin.m4.
We now use a C++ compiler so that we need to process CXXFLAGS as well as CFLAGS in the gcc-plugin config fragment. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> config/ChangeLog: * gcc-plugin.m4: Save and process CXXFLAGS. gcc/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate.
-rw-r--r--config/gcc-plugin.m45
-rwxr-xr-xgcc/configure5
-rwxr-xr-xlibcc1/configure5
3 files changed, 15 insertions, 0 deletions
diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4
index 8f27871..7ee342f 100644
--- a/config/gcc-plugin.m4
+++ b/config/gcc-plugin.m4
@@ -91,14 +91,18 @@ AC_DEFUN([GCC_ENABLE_PLUGINS],
# Check that we can build shared objects with -fPIC -shared
saved_LDFLAGS="$LDFLAGS"
saved_CFLAGS="$CFLAGS"
+ saved_CXXFLAGS="$CXXFLAGS"
case "${host}" in
*-*-darwin*)
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
CFLAGS="$CFLAGS -fPIC"
+ CXXFLAGS=`echo $CXXFLAGS | sed s/-mdynamic-no-pic//g`
+ CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
;;
*)
CFLAGS="$CFLAGS -fPIC"
+ CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="$LDFLAGS -fPIC -shared"
;;
esac
@@ -113,6 +117,7 @@ AC_DEFUN([GCC_ENABLE_PLUGINS],
fi
LDFLAGS="$saved_LDFLAGS"
CFLAGS="$saved_CFLAGS"
+ CXXFLAGS="$saved_CXXFLAGS"
# If plugin support had been requested but not available, fail.
if test x"$enable_plugin" = x"no" ; then
diff --git a/gcc/configure b/gcc/configure
index de20e5d..5470987 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -32038,14 +32038,18 @@ fi
# Check that we can build shared objects with -fPIC -shared
saved_LDFLAGS="$LDFLAGS"
saved_CFLAGS="$CFLAGS"
+ saved_CXXFLAGS="$CXXFLAGS"
case "${host}" in
*-*-darwin*)
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
CFLAGS="$CFLAGS -fPIC"
+ CXXFLAGS=`echo $CXXFLAGS | sed s/-mdynamic-no-pic//g`
+ CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
;;
*)
CFLAGS="$CFLAGS -fPIC"
+ CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="$LDFLAGS -fPIC -shared"
;;
esac
@@ -32077,6 +32081,7 @@ rm -f core conftest.err conftest.$ac_objext \
fi
LDFLAGS="$saved_LDFLAGS"
CFLAGS="$saved_CFLAGS"
+ CXXFLAGS="$saved_CXXFLAGS"
# If plugin support had been requested but not available, fail.
if test x"$enable_plugin" = x"no" ; then
diff --git a/libcc1/configure b/libcc1/configure
index b198b0b..01cfb28 100755
--- a/libcc1/configure
+++ b/libcc1/configure
@@ -15141,14 +15141,18 @@ fi
# Check that we can build shared objects with -fPIC -shared
saved_LDFLAGS="$LDFLAGS"
saved_CFLAGS="$CFLAGS"
+ saved_CXXFLAGS="$CXXFLAGS"
case "${host}" in
*-*-darwin*)
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
CFLAGS="$CFLAGS -fPIC"
+ CXXFLAGS=`echo $CXXFLAGS | sed s/-mdynamic-no-pic//g`
+ CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
;;
*)
CFLAGS="$CFLAGS -fPIC"
+ CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="$LDFLAGS -fPIC -shared"
;;
esac
@@ -15180,6 +15184,7 @@ rm -f core conftest.err conftest.$ac_objext \
fi
LDFLAGS="$saved_LDFLAGS"
CFLAGS="$saved_CFLAGS"
+ CXXFLAGS="$saved_CXXFLAGS"
# If plugin support had been requested but not available, fail.
if test x"$enable_plugin" = x"no" ; then