Skip to content

BUG: fix GCC 10 major version comparison - #16468

Merged
seberg merged 1 commit into
numpy:masterfrom
scivision:gcc10
Jun 4, 2020
Merged

seberg merged 1 commit into
numpy:masterfrom
scivision:gcc10

Conversation

@scivision

@scivision scivision commented Jun 1, 2020 •

Copy link
Copy Markdown
Contributor

The comparison of GCC major version used a string
comparison, which is known to break when comparing
single vs. double version numbers. This fix
compares the integer of the major GCC version.

Before this fix, GCC/Gfortran 10 would get inappropriate
flag "-mno-cygwin" applied, which was removed in GCC 4
and makes GCC error out.

@bashtage

bashtage commented Jun 1, 2020

Copy link
Copy Markdown
Contributor

Definitely a bug. I found this as well when working on #13816 when I was using GCC 10.0.1 from the most recent mingw. Can the entire branch that adds "-mno-cygwin" can be removed now since I can't imagine anyone using GCC < 4.

@scivision

scivision commented Jun 1, 2020 •

Copy link
Copy Markdown
Contributor Author

Wow thanks for your work on Clang-CL. I think it's important to have more compiler options like clang-cl.

Comment thread numpy/distutils/fcompiler/gnu.py Resolved
The comparison of GCC major version used a string
comparison, which is known to break when comparing
single vs. double version numbers. This fix
compares the integer of the major GCC version.

Before this fix, GCC/Gfortran 10 would get inappropriate
flag "-mno-cygwin" applied, which was removed in GCC 4
and makes GCC error out.
@seberg

seberg commented Jun 4, 2020

Copy link
Copy Markdown
Member

With LooseVersion, this now looks obviously right to me. Merging, thanks everyone!

@seberg
seberg merged commit abce2a0 into numpy:master Jun 4, 2020
@scivision
scivision deleted the gcc10 branch June 4, 2020 19:03
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jun 8, 2020
lpsinger added a commit to nasa/radbelt that referenced this pull request Sep 6, 2022
This should fix the Windows build by working around
numpy/numpy#16468.
lpsinger added a commit to lpsinger/radbelt that referenced this pull request Sep 7, 2022
lpsinger added a commit to lpsinger/radbelt that referenced this pull request Sep 7, 2022
lpsinger added a commit to nasa/radbelt that referenced this pull request Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants