From: Jason Merrill <jason@redhat.com>
To: gcc-patches List <gcc-patches@gcc.gnu.org>,
Alexandre Oliva <aoliva@redhat.com>
Subject: RFA: PATCH to use -std=c++98 in stage 1 of bootstrap
Date: Wed, 20 May 2015 17:27:00 -0000 [thread overview]
Message-ID: <555CC048.8070209@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
I want to explicitly pass -std=c++98 to the compiler used in building
stage 1. Does this seem like the right way to do that?
Tested x86_64-pc-linux-gnu.
[-- Attachment #2: s1-98.patch --]
[-- Type: text/x-patch, Size: 1855 bytes --]
commit 97e77ef17e558cdb6d26d440e691fea710e2a2dc
Author: Jason Merrill <jason@redhat.com>
Date: Mon May 18 23:58:41 2015 -0400
* configure.ac: Add -std=c++98 to stage1_cxxflags.
* Makefile.in (STAGE1_CXXFLAGS): And substitute it.
* configure: Regenerate.
diff --git a/Makefile.in b/Makefile.in
index c221a0b..c59671a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -489,6 +489,7 @@ STAGEfeedback_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
# overrideable (for a bootstrap build stage1 also builds gcc.info).
STAGE1_CFLAGS = @stage1_cflags@
+STAGE1_CXXFLAGS = @stage1_cxxflags@
STAGE1_CHECKING = @stage1_checking@
STAGE1_LANGUAGES = @stage1_languages@
# * We force-disable intermodule optimizations, even if
diff --git a/configure b/configure
index d804329..37079fb 100755
--- a/configure
+++ b/configure
@@ -559,6 +559,7 @@ compare_exclusions
host_shared
stage2_werror_flag
stage1_checking
+stage1_cxxflags
stage1_cflags
MAINT
MAINTAINER_MODE_FALSE
@@ -14755,6 +14756,13 @@ case $build in
*) stage1_cflags="-g -J" ;;
esac ;;
esac
+stage1_cxxflags="$stage1_cflags"
+if test "$GCC" = yes; then
+ # Build stage 1 in C++98 mode to ensure that a C++98 compiler can still
+ # start the bootstrap.
+ stage1_cxxflags="$stage1_cxxflags -std=c++98"
+fi
+
diff --git a/configure.ac b/configure.ac
index 4da04b7..2bf3245 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3476,8 +3476,15 @@ case $build in
*) stage1_cflags="-g -J" ;;
esac ;;
esac
+stage1_cxxflags="$stage1_cflags"
+if test "$GCC" = yes; then
+ # Build stage 1 in C++98 mode to ensure that a C++98 compiler can still
+ # start the bootstrap.
+ stage1_cxxflags="$stage1_cxxflags -std=c++98"
+fi
AC_SUBST(stage1_cflags)
+AC_SUBST(stage1_cxxflags)
# Enable --enable-checking in stage1 of the compiler.
AC_ARG_ENABLE(stage1-checking,
next reply other threads:[~2015-05-20 17:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 17:27 Jason Merrill [this message]
2015-05-20 22:16 ` Alexandre Oliva
2015-05-21 15:11 ` Jason Merrill
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=555CC048.8070209@redhat.com \
--to=jason@redhat.com \
--cc=aoliva@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/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).