diff options
author | Ovidiu Predescu <ovidiu@gcc.gnu.org> | 2000-08-06 18:41:49 +0000 |
---|---|---|
committer | Ovidiu Predescu <ovidiu@gcc.gnu.org> | 2000-08-06 18:41:49 +0000 |
commit | 822c7fe253eb1092e2e29d64015876e7e2ea691d (patch) | |
tree | e37a75e0a3b339788307cedaf51bb7949c93d7a9 | |
parent | cd7324181ab0c926357153f8031abfebc1dc8659 (diff) | |
download | gcc-822c7fe253eb1092e2e29d64015876e7e2ea691d.zip gcc-822c7fe253eb1092e2e29d64015876e7e2ea691d.tar.gz gcc-822c7fe253eb1092e2e29d64015876e7e2ea691d.tar.bz2 |
Set the ld_library_path so that running programs linked against the
shared version of libobjc run correctly.
From-SVN: r35531
-rw-r--r-- | gcc/testsuite/lib/objc.exp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/testsuite/lib/objc.exp b/gcc/testsuite/lib/objc.exp index e537f78..8a9658f 100644 --- a/gcc/testsuite/lib/objc.exp +++ b/gcc/testsuite/lib/objc.exp @@ -117,8 +117,11 @@ proc objc_target_compile { source dest type options } { global gluefile wrap_flags; global OBJC_UNDER_TEST global TOOL_OPTIONS + global ld_library_path + set ld_library_path "." lappend options "libs=-lobjc" + if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } { lappend options "libs=${gluefile}" lappend options "ldflags=$wrap_flags" @@ -142,8 +145,10 @@ proc objc_target_compile { source dest type options } { set objcpath "[get_multilibs]" set libobjc_dir [lookfor_file ${objcpath} libobjc/.libs/libobjc.a] if { $libobjc_dir != "" } { - set objc_link_flags "-L[file dirname ${libobjc_dir}]" + set libobjc_dir [file dirname ${libobjc_dir}] + set objc_link_flags "-L${libobjc_dir}" lappend options "additional_flags=${objc_link_flags}" + append ld_library_path ":${libobjc_dir}" } lappend options "compiler=$OBJC_UNDER_TEST" return [target_compile $source $dest $type $options] |