On Thu, 27 Aug 2020 22:34:23 -0400
George Koehler <[email protected]> wrote:

> babl and mednafen are passing -fno-unsafe-math-optimizations to clang;
> this flag implies -ftrapping-math, which seems to be broken in the
> PowerPC backend.  Another name for -ftrapping-math is
> -ffp-exception-behavior=strict

I want to correct the record: -ftrapping-math is not exactly the same
as -ffp-exception-behavior=strict.

When you pass -fno-unsafe-math-optimizations to clang, it passes
-ffp-exception-behavior=strict to the internal cc1.  The strict
flag enables at least -ftrapping-math and -frounding-math.  The
problem with mednafen on powerpc64 is in -frounding-math, not
-ftrapping-math.

I confirm that deleting -fno-unsafe-math-optimizations fixes the builds
of babl and mednafen on macppc.  I am waiting for my macppc to build
clang with a backport of llvm 11's
https://github.com/llvm/llvm-project/commit/d4ce862

Reply via email to