diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/gcc-plugin.m4 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 index 16ebe25..c731a6f 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 |