From patchwork Sat Jun 12 10:59:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [patch/libstdc++-v3] export long double versions of "C" math library on more platforms Date: Sat, 12 Jun 2010 00:59:40 -0000 From: Matthias Klose X-Patchwork-Id: 55390 Message-Id: <4C13689C.5090608@ubuntu.com> To: GCC Patches , "libstdc++@gcc.gnu.org" Cc: "Joseph S. Myers" , Aurelien Jarno When libstdc++-v3 is built on a system running glibc-2.11 or newer, a libstdc++.so.6 is built not exporting anymore the long double versions of "C" math library. For hppa-linux this is already taken care of. The missing symbols were observed on arm-linux-gnueabi and mips*-linux-gnu builds. Joseph S. Myers mentioned on #gcc that more platforms which did export these in the past should export these as well. It's not clear if the old ARM ABI should export these as well. If the patch is accepted, it should go to the active branches as well. Matthias 2010-06-12 Matthias Klose * src/compatibility.cc: Export long double versions of "C" math library for arm-linux-gnueabi, m68k-linux-gnu (ColdFire), mips*-linux-gnu (o32 ABI), sh*-linux-gnu (not 32 bit). Index: libstdc++-v3/src/compatibility.cc =================================================================== --- libstdc++-v3/src/compatibility.cc (revision 160481) +++ libstdc++-v3/src/compatibility.cc (working copy) @@ -410,7 +410,11 @@ // gcc-4.1.0 // Long double versions of "C" math functions. #if defined (_GLIBCXX_LONG_DOUBLE_COMPAT) \ - || (defined (__hppa__) && defined (__linux__)) + || (defined (__arm__) && defined (__linux__) && defined (__ARM_EABI__)) \ + || (defined (__hppa__) && defined (__linux__)) \ + || (defined (__m68k__) && defined (__mcoldfire__) && defined (__linux__)) \ + || (defined (__mips__) && defined (_ABIO32) && defined (__linux__)) \ + || (defined (__sh__) && defined (__linux__) && __SIZEOF_SIZE_T__ == 4) \ #define _GLIBCXX_MATHL_WRAPPER(name, argdecl, args, ver) \ extern "C" double \