From: Markus Deuling <deuling@de.ibm.com>
To: GDB Patches <gdb-patches@sourceware.org>
Cc: Ulrich Weigand <uweigand@de.ibm.com>
Subject: [rfc] testsuite/lib/gdb.exp: Enable additional linker flags in gdb_compile_shlib
Date: Wed, 16 May 2007 08:12:00 -0000 [thread overview]
Message-ID: <464ABCA4.9040109@de.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 766 bytes --]
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
[-- Attachment #2: diff-fix-shlib-linker-opt --]
[-- Type: text/plain, Size: 573 bytes --]
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-*" {
next reply other threads:[~2007-05-16 8:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-16 8:12 Markus Deuling [this message]
2007-05-16 9:28 ` Pedro Alves
2007-05-16 9:38 ` Markus Deuling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=464ABCA4.9040109@de.ibm.com \
--to=deuling@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox