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

Rework configure #3476

Merged
merged 4 commits into from Nov 1, 2021
Merged

Rework configure #3476

merged 4 commits into from Nov 1, 2021

Conversation

@lephilousophe
Copy link
Member

@lephilousophe lephilousophe commented Oct 31, 2021

This series of commit remove several outdated checks and flags from the configure script.

First we move the C++11 test before everything else to make sure the compiler does support C++11, else version check is kind of useless.
Then, the checks for old version of GCC (<2.95, <3, <4.3) are all removed as the first bits of C++11 were included in GCC 4.3 (cf. https://gcc.gnu.org/projects/cxx-status.html#cxx11).
Next, I remove the variable HAVE_GCC3 is deleted as it not used anymore.
Finally, there is some try to rework the __STRICT_ANSI__ handling as GCC 11 doesn't support anymore to undefine __STRICT_ANSI__ without enabling GNU extensions. In addition, the pedantic handling is moved at the same place as it's directly related to standards.
This should help with Switch toolchain which uses a GCC11.

@orgads adding back mingw to the list of gnu11 platforms could help with both mingw32 and mingw-w64.

Before moving this PR out of draft I would like to do a build with all buildbot platforms.

@lephilousophe lephilousophe requested a review from sev- Oct 31, 2021
@orgads
Copy link
Contributor

@orgads orgads commented Oct 31, 2021

Looks good, and builds on MSYS2/MinGW64 without warnings.

Loading

@@ -2144,63 +2154,56 @@ echo "$cxx_version"
if test "$cxx_verc_fail" = yes ; then
echo
echo "The version of your compiler is not supported at this time"
echo "Please ensure you are using GCC >= 2.95"
Copy link
Member

@sev- sev- Nov 1, 2021

Choose a reason for hiding this comment

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

I would add something like "it is too low"

Loading

Copy link
Member

@eriktorbjorn eriktorbjorn Nov 1, 2021

Choose a reason for hiding this comment

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

Or perhaps "too old"?

Loading

Copy link
Member Author

@lephilousophe lephilousophe Nov 1, 2021

Choose a reason for hiding this comment

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

This check will now fail not because version is bad but because compiler is not recognized.
We support GCC, clang and ICC. If it's not one of them, and not some special SGI compiler, we will end up here.
That's why I removed this sentence.

Loading

As C++11 is mandatory now, just ensure we've got a proper compiler
C++11 mandatory support expects a recent compiler.
Version parsing is still present to allow adding back tests for more
recent checks.
@lephilousophe lephilousophe marked this pull request as ready for review Nov 1, 2021
@lephilousophe
Copy link
Member Author

@lephilousophe lephilousophe commented Nov 1, 2021

I tested the changes on a buildbot and it works.

Loading

@sev-
Copy link
Member

@sev- sev- commented Nov 1, 2021

Great, merging.

Loading

@sev- sev- merged commit fcca692 into scummvm:master Nov 1, 2021
8 checks passed
Loading
configure Show resolved Hide resolved
Loading
@lephilousophe lephilousophe deleted the rework-configure branch Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants