public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] configure: Account CXXFLAGS in gcc-plugin.m4.
@ 2023-08-12  1:00 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-08-12  1:00 UTC (permalink / raw)
  To: bfd-cvs, gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b8326e1c4ad9aa970ae1a0cc36e039cd7485c2b1

commit b8326e1c4ad9aa970ae1a0cc36e039cd7485c2b1
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Mon Aug 7 13:07:17 2023 +0200

    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/
            * gcc-plugin.m4: Save and process CXXFLAGS.

Diff:
---
 config/gcc-plugin.m4 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4
index 16ebe25182b..c731a6fab38 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-12  1:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-12  1:00 [binutils-gdb] configure: Account CXXFLAGS in gcc-plugin.m4 Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).