* bootstrap.exp: Detect if plugins are enabled. Skip the static
link test and add -ldl to the remaining tests if they are.
This commit is contained in:
parent
1ed06042db
commit
ed94852035
|
@ -1,3 +1,8 @@
|
||||||
|
2009-10-16 Rafael Avila de Espindola <espindola@google.com>
|
||||||
|
|
||||||
|
* bootstrap.exp: Detect if plugins are enabled. Skip the static
|
||||||
|
link test and add -ldl to the remaining tests if they are.
|
||||||
|
|
||||||
2009-10-14 Joseph Myers <joseph@codesourcery.com>
|
2009-10-14 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* ld-scripts/phdrs3.d: Allow colon in name of linker binary.
|
* ld-scripts/phdrs3.d: Allow colon in name of linker binary.
|
||||||
|
|
|
@ -30,6 +30,16 @@ if ![isnative] {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Determine if plugin support is present.
|
||||||
|
remote_exec host "$nm --help" "" "/dev/null" "plugin-support"
|
||||||
|
set tmp [file_contents "plugin-support"]
|
||||||
|
regexp ".*\(--plugin\).*\n" $tmp foo plugins
|
||||||
|
if [info exists plugins] then {
|
||||||
|
set plugins "yes"
|
||||||
|
} else {
|
||||||
|
set plugins "no"
|
||||||
|
}
|
||||||
|
|
||||||
# Bootstrap ld. First link the object files together using -r, in
|
# Bootstrap ld. First link the object files together using -r, in
|
||||||
# order to test -r. Then link the result into an executable, ld1, to
|
# order to test -r. Then link the result into an executable, ld1, to
|
||||||
# really test -r. Use ld1 to link a fresh ld, ld2. Use ld2 to link a
|
# really test -r. Use ld1 to link a fresh ld, ld2. Use ld2 to link a
|
||||||
|
@ -61,8 +71,15 @@ foreach flags {"" "strip" "--static" "--traditional-format"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Plugin support requires linking with a dynamic library which
|
||||||
|
# means that these
|
||||||
|
if { $flags == "--static" && $plugins == "yes" } then {
|
||||||
|
untested $testname
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
# If we only have a shared libbfd, we probably can't run the
|
# If we only have a shared libbfd, we probably can't run the
|
||||||
# --static test.
|
# --static test.will fail.
|
||||||
if { $flags == "--static" && ! [string match "*libbfd.a*" $BFDLIB] } then {
|
if { $flags == "--static" && ! [string match "*libbfd.a*" $BFDLIB] } then {
|
||||||
untested $testname
|
untested $testname
|
||||||
continue
|
continue
|
||||||
|
@ -91,6 +108,11 @@ foreach flags {"" "strip" "--static" "--traditional-format"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Plugin support requires linking with libdl.
|
||||||
|
if { $plugins == "yes" } {
|
||||||
|
set extralibs "$extralibs -ldl"
|
||||||
|
}
|
||||||
|
|
||||||
# On Irix 5, linking with --static only works if all the files are
|
# On Irix 5, linking with --static only works if all the files are
|
||||||
# compiled using -non_shared.
|
# compiled using -non_shared.
|
||||||
if {"$flags" == "--static"} {
|
if {"$flags" == "--static"} {
|
||||||
|
|
Loading…
Reference in New Issue