Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 11 Sep 2014 10:35:32 +0300
From: Sergey Dmitrouk <sdmitrouk@...esssoftek.com>
To: <musl@...ts.openwall.com>
Subject: [PATCH] Make musl math depend less on libgcc builtins

Hello,

Building musl with Clang against compiler-rt causes some of libc-test/math
tests to fail on ARM.  All failures are related to wrong floating point
exceptions.  Comparing GCC's builtins with their implementation in
compiler-rt revealed important difference: compiler-rt builtins assume that
input is always correct, while GCC builtins raise exceptions for invalid
arguments or overflows/underflows.

It looks like musl implicitly depends on GCC-like builtins.  To fix that I
added explicit checks in functions that failed to pass all tests.  With these
changes musl works in the same way independently whether it's built by Clang
against compiler-rt or by GCC against libgcc.

Please find the attached patch.  It's only one as breaking it into pieces
won't be very helpful.

There is also separate patch for swapped arguments in error message of
libc-test.

Best regards,
Sergey

View attachment "0001-Raise-some-fenv-exceptions-explicitly.patch" of type "text/plain" (11106 bytes)

View attachment "0001-Fix-order-of-jn-arguments-in-error-message.patch" of type "text/plain" (1332 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.