Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update bootstrap req to C++14 #3294

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

thesamesam
Copy link
Contributor

@thesamesam thesamesam commented Dec 5, 2024

We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after support was stable in GCC 4.8.

It is now 8 years since C++14 was the default mode in GCC 6 (and 9 years since support was complete in GCC 5), and we have a few bits of optional C++14 code in the compiler, so it seems a good time to update the bootstrap requirement again.

The big benefit of the change is the greater constexpr power, but C++14 also added variable templates, generic lambdas, lambda init-capture, binary literals, and numeric literal digit separators.

C++14 was feature-complete in GCC 5, and became the default in GCC 6. 5.4.0 bootstraps trunk correctly; trunk stage1 built with 5.3.0 breaks in eh_data_format_name due to PR69995.

gcc/ChangeLog:

* doc/install.texi (Prerequisites): Update to C++14.

ChangeLog:

* configure.ac: Update requirement to C++14.
* configure: Regenerate.

This cherry-picks r15-4719-ga9ec1bc06bd3cc so the GCC 5 bot is happy when we actually use C++14 features (see #3278).

@thesamesam
Copy link
Contributor Author

The warnings changes are harmless (most of them are texi offsets).

@thesamesam thesamesam marked this pull request as ready for review December 5, 2024 18:22
@tschwinge
Copy link
Member

Thanks. Per "Some checks were not successful", "Details", please update the .github/*log*_warnings files, and then this is good to go.

@tschwinge tschwinge self-requested a review December 6, 2024 06:54
@thesamesam thesamesam force-pushed the cherry-pick-baseline-inc branch from 02bf1e9 to 70d9122 Compare December 6, 2024 11:38
@thesamesam
Copy link
Contributor Author

Should I update the ChangeLog in the cherry-pick, or do a followup for updating the expected warnings?

@tschwinge
Copy link
Member

Should I update the ChangeLog in the cherry-pick, or do a followup for updating the expected warnings?

You mean "[...] update the [.github/*log*_warnings files] in [...]"? Do as you like, no strong preference.

(Over here, we don't maintain the ChangeLog files.)

@thesamesam thesamesam force-pushed the cherry-pick-baseline-inc branch 3 times, most recently from da7b633 to 57ac30a Compare December 6, 2024 14:20
@tschwinge
Copy link
Member

Actually, it makes more sense here to put the .github/*log*_warnings files updates into a separate commit, given these are authored by you vs. Jason for the actual changes.

Comment on lines +1459 to +1468
# When bootstrapping with GCC, build stage 1 in C++14 mode to ensure that a
# C++14 compiler can still start the bootstrap. Otherwise, if building GCC,
# require C++14 (or higher).
if test "$enable_bootstrap:$GXX" = "yes:yes"; then
CXX="$CXX -std=c++11"
CXX="$CXX -std=c++14"
elif test "$have_compiler" = yes; then
AX_CXX_COMPILE_STDCXX(11)
AX_CXX_COMPILE_STDCXX(14)

if test "${build}" != "${host}"; then
AX_CXX_COMPILE_STDCXX(11, [], [], [_FOR_BUILD])
AX_CXX_COMPILE_STDCXX(14, [], [], [_FOR_BUILD])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I'm not sure I understand this bit - is that change upstream already? is it gccrs specific?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream already, see the last paragraph of #3294 (comment):

This cherry-picks r15-4719-ga9ec1bc06bd3cc so the GCC 5 bot is happy when we actually use C++14 features (see #3278).

@tschwinge
Copy link
Member

@thesamesam, via #3295 "ci: Update expected warnings list for 32 bits build", .github/alpine_32bit_log_warnings has been updated, so you'll want to rebase on top of that.

@thesamesam thesamesam force-pushed the cherry-pick-baseline-inc branch 2 times, most recently from dc44010 to c7ab81b Compare December 10, 2024 01:58
jicama and others added 2 commits December 10, 2024 02:12
We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after
support was stable in GCC 4.8.

It is now 8 years since C++14 was the default mode in GCC 6 (and 9 years
since support was complete in GCC 5), and we have a few bits of optional
C++14 code in the compiler, so it seems a good time to update the bootstrap
requirement again.

The big benefit of the change is the greater constexpr power, but C++14 also
added variable templates, generic lambdas, lambda init-capture, binary
literals, and numeric literal digit separators.

C++14 was feature-complete in GCC 5, and became the default in GCC 6.  5.4.0
bootstraps trunk correctly; trunk stage1 built with 5.3.0 breaks in
eh_data_format_name due to PR69995.

gcc/ChangeLog:

	* doc/install.texi (Prerequisites): Update to C++14.

ChangeLog:

	* configure.ac: Update requirement to C++14.
	* configure: Regenerate.
ChangeLog:
	* .github/glibcxx_ubuntu64b_log_expected_warnings: Update.
	* .github/log_expected_warnings: Update.
@thesamesam thesamesam force-pushed the cherry-pick-baseline-inc branch from c7ab81b to 78b1e6f Compare December 10, 2024 02:13
@tschwinge tschwinge added this pull request to the merge queue Dec 10, 2024
Merged via the queue into Rust-GCC:master with commit 55a9d8d Dec 10, 2024
13 checks passed
@thesamesam thesamesam deleted the cherry-pick-baseline-inc branch December 10, 2024 14:36
@thesamesam
Copy link
Contributor Author

Thanks all, and sorry for forgetting this originally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants