While working on the long double 128 bits with Jakub, it was pointed out that
some of the libmath work in libstdc++ is incorrect. 

In particular, platforms like ppc32 are doing some bogus exports. Mostly, this
is because on certain platforms, 

sizeof(double) == sizeof(long double)

and so, there is no need or desire for an underlying "C" math library call that
works on long double. And there is certainly no need for a libstdc++ wrapper
function that takes the existing double version, adds and l, and then casts the
long double to double, and calls the double function.

It's too late to fix this stuff up for so.6, but for so.7 we should correct the
problem.

Here's the pathology: baseline_symbols containing:

FUNC:acosl@@GLIBCXX_3.4.3
FUNC:asinl@@GLIBCXX_3.4.3
FUNC:atan2l@@GLIBCXX_3.4
FUNC:atanl@@GLIBCXX_3.4.3
FUNC:ceill@@GLIBCXX_3.4.3
FUNC:coshl@@GLIBCXX_3.4
FUNC:cosl@@GLIBCXX_3.4
FUNC:expl@@GLIBCXX_3.4
FUNC:floorl@@GLIBCXX_3.4.3
FUNC:fmodl@@GLIBCXX_3.4.3
FUNC:frexpl@@GLIBCXX_3.4.3
FUNC:hypotl@@GLIBCXX_3.4
FUNC:ldexpl@@GLIBCXX_3.4.3
FUNC:log10l@@GLIBCXX_3.4
FUNC:logl@@GLIBCXX_3.4
FUNC:modfl@@GLIBCXX_3.4.3
FUNC:powl@@GLIBCXX_3.4
FUNC:sinhl@@GLIBCXX_3.4
FUNC:sinl@@GLIBCXX_3.4
FUNC:sqrtl@@GLIBCXX_3.4
FUNC:tanhl@@GLIBCXX_3.4
FUNC:tanl@@GLIBCXX_3.4

>From the looks of things, this means:
%find . -type f -name baseline_symbols.txt | xargs grep acosl
./powerpc64-linux-gnu/baseline_symbols.txt:FUNC:acosl@@GLIBCXX_3.4.3
./powerpc64-linux-gnu/32/baseline_symbols.txt:FUNC:acosl@@GLIBCXX_3.4.3
./hppa-linux-gnu/baseline_symbols.txt:FUNC:acosl@@GLIBCXX_3.4.3
./alpha-linux-gnu/baseline_symbols.txt:FUNC:acosl@@GLIBCXX_3.4.3
./s390x-linux-gnu/baseline_symbols.txt:FUNC:acosl@@GLIBCXX_3.4.3
./mips-linux-gnu/baseline_symbols.txt:FUNC:acosl@@GLIBCXX_3.4.3
./powerpc-linux-gnu/baseline_symbols.txt:FUNC:acosl@@GLIBCXX_3.4.3
./sparc-linux-gnu/baseline_symbols.txt:FUNC:acosl@@GLIBCXX_3.4.3
./s390-linux-gnu/baseline_symbols.txt:FUNC:acosl@@GLIBCXX_3.4.3


-- 
           Summary: double vs. long double libmath export confusion
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bkoz at gcc dot gnu dot org
  GCC host triplet: powerpc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26926

Reply via email to