From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15814 invoked by alias); 16 May 2007 08:12:40 -0000 Received: (qmail 15806 invoked by uid 22791); 16 May 2007 08:12:39 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate8.de.ibm.com (HELO mtagate8.de.ibm.com) (195.212.29.157) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 16 May 2007 08:12:37 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.13.8/8.13.8) with ESMTP id l4G8CY1O129716 for ; Wed, 16 May 2007 08:12:34 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l4G8CYH34124722 for ; Wed, 16 May 2007 10:12:34 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l4G8CY5p007232 for ; Wed, 16 May 2007 10:12:34 +0200 Received: from [9.152.248.44] (dyn-9-152-248-44.boeblingen.de.ibm.com [9.152.248.44]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l4G8CX0S007221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 May 2007 10:12:34 +0200 Message-ID: <464ABCA4.9040109@de.ibm.com> Date: Wed, 16 May 2007 08:12:00 -0000 From: Markus Deuling User-Agent: Thunderbird 1.5.0.10 (X11/20070301) MIME-Version: 1.0 To: GDB Patches CC: Ulrich Weigand Subject: [rfc] testsuite/lib/gdb.exp: Enable additional linker flags in gdb_compile_shlib Content-Type: multipart/mixed; boundary="------------060507050505010309020800" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00271.txt.bz2 This is a multi-part message in MIME format. --------------060507050505010309020800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 766 Hi, I try to build a shared library using gdb_compile_shlib. The build is done in two steps (compile and link). The testcase I work on adds set lib_flags "$lib_flags additional_flags=-Wl,-Bsymbolic" as an option to gdb_compile_shlib. The compile run quits with gcc: -Bsymbolic: linker input file unused because linking not done because the linker option is given to the compile run, too. This patch removes any linker options for the first compile run. This makes it possible to add additional linker flags to gdb_compile_shlib. Testsuite showed no regression. Is that ok to commit? ChangeLog: * lib/gdb.exp (gdb_compile_shlib): Remove linker options for first compile run. -- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com --------------060507050505010309020800 Content-Type: text/plain; name="diff-fix-shlib-linker-opt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diff-fix-shlib-linker-opt" Content-length: 573 diff -urN src/gdb/testsuite/lib/gdb.exp dev/gdb/testsuite/lib/gdb.exp --- src/gdb/testsuite/lib/gdb.exp 2007-04-02 05:53:41.000000000 +0200 +++ dev/gdb/testsuite/lib/gdb.exp 2007-05-16 09:56:44.000000000 +0200 @@ -1608,7 +1608,14 @@ # first. proc gdb_compile_shlib {sources dest options} { - set obj_options $options + + # Remove linker options from obj_options. + set obj_options "" + foreach obj $options { + if ![regexp {.*-Wl,*} $obj --] { + lappend obj_options $obj + } + } switch -glob [test_compiler_info] { "xlc-*" { --------------060507050505010309020800--