Commit 822c7fe2 by Ovidiu Predescu

Set the ld_library_path so that running programs linked against the

shared version of libobjc run correctly.

From-SVN: r35531
parent cd732418
...@@ -117,8 +117,11 @@ proc objc_target_compile { source dest type options } { ...@@ -117,8 +117,11 @@ proc objc_target_compile { source dest type options } {
global gluefile wrap_flags; global gluefile wrap_flags;
global OBJC_UNDER_TEST global OBJC_UNDER_TEST
global TOOL_OPTIONS global TOOL_OPTIONS
global ld_library_path
set ld_library_path "."
lappend options "libs=-lobjc" lappend options "libs=-lobjc"
if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } { if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
lappend options "libs=${gluefile}" lappend options "libs=${gluefile}"
lappend options "ldflags=$wrap_flags" lappend options "ldflags=$wrap_flags"
...@@ -142,8 +145,10 @@ proc objc_target_compile { source dest type options } { ...@@ -142,8 +145,10 @@ proc objc_target_compile { source dest type options } {
set objcpath "[get_multilibs]" set objcpath "[get_multilibs]"
set libobjc_dir [lookfor_file ${objcpath} libobjc/.libs/libobjc.a] set libobjc_dir [lookfor_file ${objcpath} libobjc/.libs/libobjc.a]
if { $libobjc_dir != "" } { 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}" lappend options "additional_flags=${objc_link_flags}"
append ld_library_path ":${libobjc_dir}"
} }
lappend options "compiler=$OBJC_UNDER_TEST" lappend options "compiler=$OBJC_UNDER_TEST"
return [target_compile $source $dest $type $options] return [target_compile $source $dest $type $options]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment