public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org, Simon Marchi <simon.marchi@ericsson.com>
Subject: Re: [PATCH 0/6] [C++] Drop -fpermissive hack, enable -Werror
Date: Thu, 19 Nov 2015 15:14:00 -0000	[thread overview]
Message-ID: <564DE744.8030104@redhat.com> (raw)
In-Reply-To: <867fle1b5z.fsf@gmail.com>

On 11/19/2015 11:27 AM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
> 
>> I was planning on committing it as soon as I got positive
>> reviews, which seems like I have now.  :-)  Do you see a reason to
>> hold it for now?
> 
> No, I don't.  Looks we still need --enable-build-with-cxx to turn C++
> mode on.

Yeah, my plan here was to "lock" (*) ports to C++ mode one by one, as soon
as they build in C++ mode.  Actually, I think a negative/reverse list is even
better.  This allows keeping track of ports/hosts people really still care
about, and, gives us an easy defined stopping point (when the list is clear).
What would you think of this approach?

I should probably move this to a separate thread, push this to a branch on
sourceware.org (to collect a better initial set of still-needs-conversion-work
hosts, with community help) and announce the intent on the gdb@ list, for
wider visibility/discussion.

(*) - For "locked" ports, one can still force C mode meanwhile
with --enable-build-with-cxx=no, until all ports are converted and we
decide to drop C mode.

---
From b60a477edf5b58a950a9ddf2d1520f95874a1089 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Thu, 19 Nov 2015 14:40:04 +0000
Subject: [PATCH] Default to building in C++ mode

... except on hosts/targets that haven't been converted yet.

gdb/ChangeLog:
2015-11-19  Pedro Alves  <palves@redhat.com>

	* build-with-cxx.m4 (GDB_AC_BUILD_WITH_CXX): Default to yes unless
	building on some hosts.
	* configure: Renegerate.

gdb/gdbserver/ChangeLog:
2015-11-19  Pedro Alves  <palves@redhat.com>

	* configure: Renegerate.
---
 gdb/build-with-cxx.m4   | 18 ++++++++++++++++--
 gdb/configure           | 17 +++++++++++++++--
 gdb/gdbserver/configure | 17 +++++++++++++++--
 3 files changed, 46 insertions(+), 6 deletions(-)

diff --git a/gdb/build-with-cxx.m4 b/gdb/build-with-cxx.m4
index b6284fd..03ff54d 100644
--- a/gdb/build-with-cxx.m4
+++ b/gdb/build-with-cxx.m4
@@ -21,6 +21,21 @@ dnl allowing a user to build with a C++ compiler.
 
 AC_DEFUN([GDB_AC_BUILD_WITH_CXX],
 [
+  # The "doesn't support C++ yet" hall of shame.
+  case $host in
+    *-*aix* | \
+    *-*go32* | \
+    *-*darwin* | \
+    *-*solaris* | \
+    *-*nto* | \
+    *-*bsd* | \
+    xtensa*-*-linux* | \
+    null)
+      enable_build_with_cxx=no ;;
+    *)
+      enable_build_with_cxx=yes ;;
+  esac
+
   AC_ARG_ENABLE(build-with-cxx,
   AS_HELP_STRING([--enable-build-with-cxx], [build with C++ compiler instead of C compiler]),
     [case $enableval in
@@ -28,8 +43,7 @@ AC_DEFUN([GDB_AC_BUILD_WITH_CXX],
 	  ;;
       *)
 	  AC_MSG_ERROR([bad value $enableval for --enable-build-with-cxx]) ;;
-    esac],
-    [enable_build_with_cxx=no])
+    esac])
 
   if test "$enable_build_with_cxx" = "yes"; then
     COMPILER='$(CXX)'
diff --git a/gdb/configure b/gdb/configure
index 249a399..fce2154 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -5001,6 +5001,21 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
 # See if we are building with C++, and substitute COMPILER.
 
+  # The "doesn't support C++ yet" hall of shame.
+  case $host in
+    *-*aix* | \
+    *-*go32* | \
+    *-*darwin* | \
+    *-*solaris* | \
+    *-*nto* | \
+    *-*bsd* | \
+    xtensa*-*-linux* | \
+    null)
+      enable_build_with_cxx=no ;;
+    *)
+      enable_build_with_cxx=yes ;;
+  esac
+
   # Check whether --enable-build-with-cxx was given.
 if test "${enable_build_with_cxx+set}" = set; then :
   enableval=$enable_build_with_cxx; case $enableval in
@@ -5009,8 +5024,6 @@ if test "${enable_build_with_cxx+set}" = set; then :
       *)
 	  as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
     esac
-else
-  enable_build_with_cxx=no
 fi
 
 
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 87dfda0..9b2018c 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -4813,6 +4813,21 @@ fi
 
 # See if we are building with C++, and substitute COMPILER.
 
+  # The "doesn't support C++ yet" hall of shame.
+  case $host in
+    *-*aix* | \
+    *-*go32* | \
+    *-*darwin* | \
+    *-*solaris* | \
+    *-*nto* | \
+    *-*bsd* | \
+    xtensa*-*-linux* | \
+    null)
+      enable_build_with_cxx=no ;;
+    *)
+      enable_build_with_cxx=yes ;;
+  esac
+
   # Check whether --enable-build-with-cxx was given.
 if test "${enable_build_with_cxx+set}" = set; then :
   enableval=$enable_build_with_cxx; case $enableval in
@@ -4821,8 +4836,6 @@ if test "${enable_build_with_cxx+set}" = set; then :
       *)
 	  as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
     esac
-else
-  enable_build_with_cxx=no
 fi
 
 
-- 
1.9.3


  reply	other threads:[~2015-11-19 15:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 16:40 Pedro Alves
2015-11-18 16:40 ` [PATCH 5/6] [C++] Drop -fpermissive hack Pedro Alves
2015-11-18 16:40 ` [PATCH 3/6] [C++] s390: Fix enum gdb_syscall conversion Pedro Alves
2015-11-18 16:40 ` [PATCH 1/6] [C++] remote.c: Avoid enum arithmetic Pedro Alves
2015-11-18 16:40 ` [PATCH 2/6] [C++] linux-thread-db.c: dladdr cast Pedro Alves
2015-11-18 16:40 ` [PATCH 4/6] [C++] breakpoint.c: "no memory" software watchpoints and enum casts Pedro Alves
2015-11-18 16:48 ` [PATCH 0/6] [C++] Drop -fpermissive hack, enable -Werror Simon Marchi
2015-11-18 16:49 ` [PATCH 6/6] [C++] Default to -Werror in C++ mode too Pedro Alves
2015-11-18 17:44 ` [PATCH 0/6] [C++] Drop -fpermissive hack, enable -Werror Yao Qi
2015-11-18 17:53   ` Pedro Alves
2015-11-19 11:28     ` Yao Qi
2015-11-19 15:14       ` Pedro Alves [this message]
2015-11-20  9:46         ` Yao Qi
2015-11-20 11:21           ` Pedro Alves
2015-11-24 11:01             ` Yao Qi
2015-11-24 13:17               ` Pedro Alves
2015-11-24 14:37                 ` Joel Brobecker
2015-11-24 13:19             ` Pedro Alves
2015-11-19 15:17       ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=564DE744.8030104@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    --cc=simon.marchi@ericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).