diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2003-05-16 05:04:34 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2003-05-16 05:04:34 +0000 |
commit | b765d4e375fe9067743c493c97f22879597e901c (patch) | |
tree | 998d522b4db166ed45468d96d4ee99b45524b56a /ld/testsuite/lib/ld-lib.exp | |
parent | ccd066678e93f9800d7442aaaedec4b657f89231 (diff) | |
download | gdb-b765d4e375fe9067743c493c97f22879597e901c.zip gdb-b765d4e375fe9067743c493c97f22879597e901c.tar.gz gdb-b765d4e375fe9067743c493c97f22879597e901c.tar.bz2 |
2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
* config/default.exp (gcc_ld_flag): New. Make the newly built
linker available to gcc.
* lib/ld-lib.exp (default_ld_simple_link): Pass $gcc_ld_flag
to gcc.
* ld-elfvers/vers.exp: Use "ld_simple_link $CC" to build shared
libraries.
* ld-elfvsb/elfvsb.exp: Likewise.
* ld-elfweak/elfweak.exp: Likewise.
* ld-shared/shared.exp: Likewise.
* ld-elfvers/vers.exp: Use "-Wl,-rpath,." to build shared
libraries.
* ld-elfvsb/elfvsb.exp: Likewise.
* ld-elfvsb/elfvsb.exp: Remove xfail for powerpc-*-linux*.
* ld-elfweak/elfweak.exp: Use PIC for shared libraries.
Diffstat (limited to 'ld/testsuite/lib/ld-lib.exp')
-rw-r--r-- | ld/testsuite/lib/ld-lib.exp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index 82ae093..89a7481 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -154,6 +154,7 @@ proc default_ld_link { ld target objects } { proc default_ld_simple_link { ld target objects } { global host_triplet global link_output + global gcc_ld_flag if { [which $ld] == 0 } then { perror "$ld does not exist" @@ -166,6 +167,13 @@ proc default_ld_simple_link { ld target objects } { set flags "" } + # If we are compiling with gcc, we want to add gcc_ld_flag to + # flags. Rather than determine this in some complex way, we guess + # based on the name of the compiler. + if {[string match "*gcc*" $ld] || [string match "*++*" $ld]} then { + set flags "$gcc_ld_flag $flags" + } + verbose -log "$ld $flags -o $target $objects" catch "exec $ld $flags -o $target $objects" link_output |