From 822c7fe253eb1092e2e29d64015876e7e2ea691d Mon Sep 17 00:00:00 2001 From: Ovidiu Predescu Date: Sun, 6 Aug 2000 18:41:49 +0000 Subject: [PATCH] Set the ld_library_path so that running programs linked against the shared version of libobjc run correctly. From-SVN: r35531 --- gcc/testsuite/lib/objc.exp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/lib/objc.exp b/gcc/testsuite/lib/objc.exp index e537f785ac1..8a9658f57ef 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] -- 2.30.2