From patchwork Sat Jun 12 10:59:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 55390 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id F41EDB7D8B for ; Sat, 12 Jun 2010 20:59:58 +1000 (EST) Received: (qmail 17086 invoked by alias); 12 Jun 2010 10:59:56 -0000 Received: (qmail 17067 invoked by uid 22791); 12 Jun 2010 10:59:56 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from einhorn.in-berlin.de (HELO einhorn.in-berlin.de) (192.109.42.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 12 Jun 2010 10:59:51 +0000 X-Envelope-From: doko@ubuntu.com Received: from [10.16.195.219] ([217.237.166.206]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id o5CAxeGB022705; Sat, 12 Jun 2010 12:59:41 +0200 Message-ID: <4C13689C.5090608@ubuntu.com> Date: Sat, 12 Jun 2010 12:59:40 +0200 From: Matthias Klose User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: GCC Patches , "libstdc++@gcc.gnu.org" CC: "Joseph S. Myers" , Aurelien Jarno Subject: [patch/libstdc++-v3] export long double versions of "C" math library on more platforms Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 \