From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2832 invoked by alias); 11 Oct 2010 21:33:54 -0000 Received: (qmail 2820 invoked by uid 22791); 11 Oct 2010 21:33:53 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Oct 2010 21:33:48 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9BLXlkX022757 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 11 Oct 2010 17:33:47 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9BLXjEJ024359 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 11 Oct 2010 17:33:46 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o9BLXi5x015816 for ; Mon, 11 Oct 2010 23:33:44 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o9BLXiqm015814 for gdb-patches@sourceware.org; Mon, 11 Oct 2010 23:33:44 +0200 Date: Mon, 11 Oct 2010 21:33:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] testsuite: gdb compile failed, gcc: -soname: linker input file unused because linking not done Message-ID: <20101011213343.GA3249@host1.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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: 2010-10/txt/msg00188.txt.bz2 Hi, at least on RHEL/CentOS-5 (gcc-4.1) several testcases get skipped: Running gdb/testsuite/gdb.base/break-interp.exp ... gdb compile failed, gcc: -soname: linker input file unused because linking not done gcc: break-interp.so: linker input file unused because linking not done It works with recent GCCs. I will check it in as obvious if not replied. Most of these are from my patches. There is one unrelated No regressions on {x86_64,x86_64-m32,i686}-fedora14snapshot-linux-gnu. Thanks, Jan gdb/testsuite/ 2010-10-11 Jan Kratochvil * gdb.base/break-interp.exp: Use ldlags for linking flags. * gdb.base/prelink.exp: Likewise. * gdb.base/solib-nodir.exp: Likewise. * lib/gdb.exp (gdb_compile) <*-*-openbsd*> (gdb_compile) : Use ldlags for linking flags. * lib/prelink-support.exp (build_executable_own_libs): Likewise. --- a/gdb/testsuite/gdb.base/break-interp.exp +++ b/gdb/testsuite/gdb.base/break-interp.exp @@ -35,7 +35,7 @@ if [get_compiler_info ${binfile_lib}] { # Use -soname so that the new library gets copied by build_executable_own_libs. -if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug additional_flags=-Wl,-soname,${test}.so]] != ""} { +if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]] != ""} { return -1 } @@ -613,7 +613,7 @@ foreach ldprelink {NO YES} { set pf_prefix $old_binprefix lappend pf_prefix "$binname:" - set opts "additional_flags=-Wl,$binfile_lib,-rpath,[file dirname $binfile_lib]" + set opts "ldflags=-Wl,$binfile_lib,-rpath,[file dirname $binfile_lib]" if {$binsepdebug != "NO"} { lappend opts {debug} } --- a/gdb/testsuite/gdb.base/prelink.exp +++ b/gdb/testsuite/gdb.base/prelink.exp @@ -44,7 +44,7 @@ set libfile ${objdir}/${subdir}/${testfile}.so # Use -soname so that the new library gets copied by build_executable_own_libs. -if { [gdb_compile_shlib "${srcdir}/${subdir}/${libsrcfile}" "${libfile}" [list debug "additional_flags=-Wl,-soname,[file tail ${libfile}]"]] != ""} { +if { [gdb_compile_shlib "${srcdir}/${subdir}/${libsrcfile}" "${libfile}" [list debug "ldflags=-Wl,-soname,[file tail ${libfile}]"]] != ""} { # If creating the shared library fails, maybe we don't have the right tools return -1 } @@ -52,7 +52,7 @@ if { [gdb_compile_shlib "${srcdir}/${subdir}/${libsrcfile}" "${libfile}" [list d set srcfile ${testfile}.c set executable ${testfile}t set binfile ${objdir}/${subdir}/${executable} -set prelink_args [build_executable_own_libs ${testfile}.exp $executable $srcfile [list debug "additional_flags=-Wl,${libfile},-rpath,[file dirname ${libfile}]"]] +set prelink_args [build_executable_own_libs ${testfile}.exp $executable $srcfile [list debug "ldflags=-Wl,${libfile},-rpath,[file dirname ${libfile}]"]] if {$prelink_args == ""} { return -1 } --- a/gdb/testsuite/gdb.base/solib-nodir.exp +++ b/gdb/testsuite/gdb.base/solib-nodir.exp @@ -32,7 +32,7 @@ set binfile ${objdir}/${subdir}/${executable} # build the first test case if { [get_compiler_info unused] - || [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" [list debug additional_flags=-Wl,-soname,${binlibfilebase}]] != "" + || [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" [list debug ldflags=-Wl,-soname,${binlibfilebase}]] != "" || [gdb_gnu_strip_debug $binlibfile] || [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" || [gdb_compile "${objfile} ${binlibfile}" "${binfile}" executable {}] != "" } { --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2010,7 +2010,7 @@ proc gdb_compile {source dest type options} { || [istarget hppa*-*-hpux*])} { # Do not need anything. } elseif { [istarget *-*-openbsd*] } { - lappend new_options "additional_flags=-Wl,-rpath,${outdir}" + lappend new_options "ldflags=-Wl,-rpath,${outdir}" } elseif { [istarget arm*-*-symbianelf*] } { if { $shlib_load } { lappend new_options "libs=-ldl" @@ -2019,7 +2019,7 @@ proc gdb_compile {source dest type options} { if { $shlib_load } { lappend new_options "libs=-ldl" } - lappend new_options "additional_flags=-Wl,-rpath,\\\$ORIGIN" + lappend new_options "ldflags=-Wl,-rpath,\\\$ORIGIN" } } set options $new_options --- a/gdb/testsuite/lib/prelink-support.exp +++ b/gdb/testsuite/lib/prelink-support.exp @@ -164,7 +164,7 @@ proc build_executable_own_libs {testname executable sources options {interp ""} # Do not lappend it so that "-rpath $dir" overrides any possible "-rpath"s # specified by the caller to be able to link it for ldd" above. - set options [linsert $options 0 "additional_flags=-Wl,--dynamic-linker,$interp,-rpath,$dir"] + set options [linsert $options 0 "ldflags=-Wl,--dynamic-linker,$interp,-rpath,$dir"] if {[build_executable $testname $executable $sources $options] == -1} { return ""