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.
This commit is contained in:
Iain Sandoe 2021-12-08 20:58:34 +00:00
parent 308d688beb
commit 3e714cc55e
3 changed files with 15 additions and 0 deletions

View File

@ -91,14 +91,18 @@ AC_DEFUN([GCC_ENABLE_PLUGINS],
# Check that we can build shared objects with -fPIC -shared # Check that we can build shared objects with -fPIC -shared
saved_LDFLAGS="$LDFLAGS" saved_LDFLAGS="$LDFLAGS"
saved_CFLAGS="$CFLAGS" saved_CFLAGS="$CFLAGS"
saved_CXXFLAGS="$CXXFLAGS"
case "${host}" in case "${host}" in
*-*-darwin*) *-*-darwin*)
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
CFLAGS="$CFLAGS -fPIC" CFLAGS="$CFLAGS -fPIC"
CXXFLAGS=`echo $CXXFLAGS | sed s/-mdynamic-no-pic//g`
CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
;; ;;
*) *)
CFLAGS="$CFLAGS -fPIC" CFLAGS="$CFLAGS -fPIC"
CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="$LDFLAGS -fPIC -shared" LDFLAGS="$LDFLAGS -fPIC -shared"
;; ;;
esac esac
@ -113,6 +117,7 @@ AC_DEFUN([GCC_ENABLE_PLUGINS],
fi fi
LDFLAGS="$saved_LDFLAGS" LDFLAGS="$saved_LDFLAGS"
CFLAGS="$saved_CFLAGS" CFLAGS="$saved_CFLAGS"
CXXFLAGS="$saved_CXXFLAGS"
# If plugin support had been requested but not available, fail. # If plugin support had been requested but not available, fail.
if test x"$enable_plugin" = x"no" ; then if test x"$enable_plugin" = x"no" ; then

5
gcc/configure vendored
View File

@ -32038,14 +32038,18 @@ fi
# Check that we can build shared objects with -fPIC -shared # Check that we can build shared objects with -fPIC -shared
saved_LDFLAGS="$LDFLAGS" saved_LDFLAGS="$LDFLAGS"
saved_CFLAGS="$CFLAGS" saved_CFLAGS="$CFLAGS"
saved_CXXFLAGS="$CXXFLAGS"
case "${host}" in case "${host}" in
*-*-darwin*) *-*-darwin*)
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
CFLAGS="$CFLAGS -fPIC" CFLAGS="$CFLAGS -fPIC"
CXXFLAGS=`echo $CXXFLAGS | sed s/-mdynamic-no-pic//g`
CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
;; ;;
*) *)
CFLAGS="$CFLAGS -fPIC" CFLAGS="$CFLAGS -fPIC"
CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="$LDFLAGS -fPIC -shared" LDFLAGS="$LDFLAGS -fPIC -shared"
;; ;;
esac esac
@ -32077,6 +32081,7 @@ rm -f core conftest.err conftest.$ac_objext \
fi fi
LDFLAGS="$saved_LDFLAGS" LDFLAGS="$saved_LDFLAGS"
CFLAGS="$saved_CFLAGS" CFLAGS="$saved_CFLAGS"
CXXFLAGS="$saved_CXXFLAGS"
# If plugin support had been requested but not available, fail. # If plugin support had been requested but not available, fail.
if test x"$enable_plugin" = x"no" ; then if test x"$enable_plugin" = x"no" ; then

5
libcc1/configure vendored
View File

@ -15141,14 +15141,18 @@ fi
# Check that we can build shared objects with -fPIC -shared # Check that we can build shared objects with -fPIC -shared
saved_LDFLAGS="$LDFLAGS" saved_LDFLAGS="$LDFLAGS"
saved_CFLAGS="$CFLAGS" saved_CFLAGS="$CFLAGS"
saved_CXXFLAGS="$CXXFLAGS"
case "${host}" in case "${host}" in
*-*-darwin*) *-*-darwin*)
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
CFLAGS="$CFLAGS -fPIC" CFLAGS="$CFLAGS -fPIC"
CXXFLAGS=`echo $CXXFLAGS | sed s/-mdynamic-no-pic//g`
CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
;; ;;
*) *)
CFLAGS="$CFLAGS -fPIC" CFLAGS="$CFLAGS -fPIC"
CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="$LDFLAGS -fPIC -shared" LDFLAGS="$LDFLAGS -fPIC -shared"
;; ;;
esac esac
@ -15180,6 +15184,7 @@ rm -f core conftest.err conftest.$ac_objext \
fi fi
LDFLAGS="$saved_LDFLAGS" LDFLAGS="$saved_LDFLAGS"
CFLAGS="$saved_CFLAGS" CFLAGS="$saved_CFLAGS"
CXXFLAGS="$saved_CXXFLAGS"
# If plugin support had been requested but not available, fail. # If plugin support had been requested but not available, fail.
if test x"$enable_plugin" = x"no" ; then if test x"$enable_plugin" = x"no" ; then