<p dir="auto">After moving to numpy 1.10.0 b2 in Fedora rawhide, we're seeing bad gfortran flags when building scipy:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Fortran f77 compiler: /usr/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fPIC -O2 -march=x86-64 -DMS_WIN64 -mtune=generic -msse2
Fortran f90 compiler: /usr/bin/gfortran -Wall -g -fno-second-underscore -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fPIC -O2 -march=x86-64 -DMS_WIN64 -mtune=generic -msse2
Fortran fix compiler: /usr/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fPIC -O2 -march=x86-64 -DMS_WIN64 -mtune=generic -msse2"><pre class="notranslate"><code class="notranslate">Fortran f77 compiler: /usr/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fPIC -O2 -march=x86-64 -DMS_WIN64 -mtune=generic -msse2
Fortran f90 compiler: /usr/bin/gfortran -Wall -g -fno-second-underscore -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fPIC -O2 -march=x86-64 -DMS_WIN64 -mtune=generic -msse2
Fortran fix compiler: /usr/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fPIC -O2 -march=x86-64 -DMS_WIN64 -mtune=generic -msse2
</code></pre></div>
<p dir="auto">It appears to be tacking on the "-march=x86-64 -DMS_WIN64 -mtune=generic -msse2" options from the mingw settings to the fortran compiler flags.</p>
<p dir="auto">numpy.distutils adds a <code class="notranslate">-ffpe-summary</code> command line option to gfortran, but it's apparently not supported by all versions of the compiler.</p>
<p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="111954493" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/5380" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/5380/hovercard" href="https://github.com/scipy/scipy/issues/5380">scipy/scipy#5380</a></p>
<p dir="auto">Apparently this was added in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/numpy/numpy/commit/b354c005ccfe961e793ec4567e9cf6bbdca1b5f2/hovercard" href="https://github.com/numpy/numpy/commit/b354c005ccfe961e793ec4567e9cf6bbdca1b5f2"><tt>b354c00</tt></a> --- seems to affect also non-windows platforms.</p>