[MacPorts] #48637: python25 @2.5.6_5: clang: error: unknown argument: '-mno-fused-madd'
MacPorts
noreply at macports.org
Sun Nov 12 14:57:21 UTC 2017
#48637: python25 @2.5.6_5: clang: error: unknown argument: '-mno-fused-madd'
------------------------+----------------------
Reporter: fhgwright | Owner: larryv
Type: defect | Status: accepted
Priority: Normal | Milestone:
Component: ports | Version: 2.3.3
Resolution: | Keywords:
Port: python25 |
------------------------+----------------------
Changes (by ryandesign):
* cc: ryandesign (added)
Comment:
The problem is that the `-mno-fused-madd` flag is unknown to clang, and as
of clang 3.4 from Xcode 5.1, clang considers unknown flags to be an error.
Here's the commit that fixed that upstream bug:
https://github.com/python/cpython/commit/1b4e45bab940d385386e9442de5f5fbc7983dd50
It just removed `-Wno-long-double -no-cpp-precomp -mno-fused-madd` from
`$BASECFLAGS` for python 2.6 and later.
MacPorts already removed `-Wno-long-double -no-cpp-precomp` from
`$BASECFLAGS` in [2675b181e576879eb901c6e5c125a2e8494a92b4/macports-ports]
for python24 and [2c612b374253451055485ad1ad2b640c8aab17be/macports-ports]
for python25, apparently for the benefit of gcc 4.2 on Snow Leopard.
It looks like we discovered way back in #2029 that `-mno-fused-madd` is a
PowerPC-only option, and removed it only for non-PowerPC systems in
[1f2207ac14f5a209fcb73354eb0f6594b5f7817f/macports-ports] for python23,
and we have the same patch in python24. That patch was never added to
python25 however.
What does the option do? Here's a description from [http://www.network-
theory.co.uk/docs/gccintro/gccintro_68.html An Introduction to GCC]:
> The POWER/PowerPC processors include a combined "multiply and add"
instruction a * x + b, which performs the two operations simultaneously
for speed--this is referred to as a ''fused'' multiply and add, and is
used by GCC by default. Due to differences in the way intermediate values
are rounded, the result of a fused instruction may not be exactly the same
as performing the two operations separately. In cases where strict IEEE
arithmetic is required, the use of the combined instructions can be
disabled with the option `-mno-fused-madd`.
So on the theory that this option may do something important for PowerPC
systems, I'll fix the issue by doing for python25 what we already do for
python24 and did for python23 before it was deleted and keep the option
for PowerPC systems.
--
Ticket URL: <https://trac.macports.org/ticket/48637#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list