From patchwork Mon Nov 1 05:45:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhang X-Patchwork-Id: 69751 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 CE4FDB6F11 for ; Mon, 1 Nov 2010 16:46:12 +1100 (EST) Received: (qmail 1681 invoked by alias); 1 Nov 2010 05:46:10 -0000 Received: (qmail 1669 invoked by uid 22791); 1 Nov 2010 05:46:09 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Nov 2010 05:46:04 +0000 Received: (qmail 18284 invoked from network); 1 Nov 2010 05:46:01 -0000 Received: from unknown (HELO ?192.168.1.106?) (jie@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Nov 2010 05:46:01 -0000 Message-ID: <4CCE5416.1000001@codesourcery.com> Date: Mon, 01 Nov 2010 13:45:58 +0800 From: Jie Zhang User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100918 Icedove/3.1.4 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: [RFC] Fix libstdc++ test fails with emutls X-IsSubscribed: yes 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 Hi, When testing libstdc++ for mips-linux-gnu target with uClibc as the C library, I saw these tests failed because of link error: 30_threads/future/members/get.cc (test for excess errors) 30_threads/future/members/get2.cc (test for excess errors) 30_threads/future/members/valid.cc (test for excess errors) 30_threads/future/members/wait.cc (test for excess errors) 30_threads/future/members/wait_for.cc (test for excess errors) 30_threads/future/members/wait_until.cc (test for excess errors) 30_threads/packaged_task/members/get_future.cc (test for excess errors) 30_threads/packaged_task/members/invoke.cc (test for excess errors) 30_threads/packaged_task/members/invoke2.cc (test for excess errors) 30_threads/packaged_task/members/invoke3.cc (test for excess errors) 30_threads/packaged_task/members/invoke4.cc (test for excess errors) 30_threads/packaged_task/members/invoke5.cc (test for excess errors) 30_threads/packaged_task/members/reset2.cc (test for excess errors) 30_threads/promise/cons/move.cc (test for excess errors) 30_threads/promise/cons/move_assign.cc (test for excess errors) 30_threads/promise/members/get_future.cc (test for excess errors) 30_threads/promise/members/set_exception.cc (test for excess errors) 30_threads/promise/members/set_exception2.cc (test for excess errors) 30_threads/promise/members/set_value.cc (test for excess errors) 30_threads/promise/members/set_value2.cc (test for excess errors) 30_threads/promise/members/set_value3.cc (test for excess errors) 30_threads/promise/members/swap.cc (test for excess errors) 30_threads/shared_future/members/get.cc (test for excess errors) 30_threads/shared_future/members/get2.cc (test for excess errors) 30_threads/shared_future/members/valid.cc (test for excess errors) 30_threads/shared_future/members/wait.cc (test for excess errors) 30_threads/shared_future/members/wait_for.cc (test for excess errors) 30_threads/shared_future/members/wait_until.cc (test for excess errors) The link error looks like: mutex:704: undefined reference to `__emutls_v._ZSt15__once_callable' This patch should fix this error by exporting such like symbols. Is this patch OK? Regards, * config/abi/pre/gnu.ver: Export __emutls_v._ZSt11__once_call and __emutls_v._ZSt15__once_callable. Index: config/abi/pre/gnu.ver =================================================================== --- config/abi/pre/gnu.ver (revision 166125) +++ config/abi/pre/gnu.ver (working copy) @@ -992,7 +992,9 @@ _ZNKSt10lock_error4whatEv; _ZSt11__once_call; + __emutls_v._ZSt11__once_call; _ZSt15__once_callable; + __emutls_v._ZSt15__once_callable; _ZSt14__once_functor; _ZSt23__get_once_functor_lockv; __once_proxy;