more objc.exp fixes
Ovidiu Predescu
ovidiu@cup.hp.com
Sun Aug 6 11:42:00 GMT 2000
Hi,
The following patch to gcc/testsuite/lib/objc.exp sets up the ld_library_path
so that the environment is setup correctly when running programs linked against
a shared version of the libobjc library.
Regards,
Ovidiu
Sun Aug 6 11:41:51 2000 Ovidiu Predescu <ovidiu@cup.hp.com>
* lib/objc.exp (objc_target_compile): Set the ld_library_path so
that running programs linked against the shared version of libobjc
run correctly.
Index: gcc/testsuite/lib/objc.exp
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/lib/objc.exp,v
retrieving revision 1.4
diff -u -r1.4 objc.exp
--- objc.exp 2000/08/02 22:24:35 1.4
+++ objc.exp 2000/08/06 18:35:54
@@ -117,8 +117,11 @@
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 @@
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]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00000.pgp
Type: text/x-diff
Size: 1963 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20000806/c80a95d3/attachment.bin>
More information about the Gcc-patches
mailing list