OSDN Git Service

* gcc.exp (gcc_target_compile): Put braces around
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / lib / treelang.exp
index 6d37773..dfce3d8 100644 (file)
 # Having this file here magically tells dejagnu that the treelang
 # directory is worthy of testing
 
-# This file is basically treelang.exp with treelang replaced with treelang.
+# This file is basically gcc.exp with gcc replaced with treelang.
 
 # This file is loaded by the tool init file (eg: unix.exp).  It provides
-# default definitions for treelang_start, etc. and other supporting cast members.
+# default definitions for treelang_start, etc. and other supporting cast
+# members.
 
-# These globals are used by treelang_start if no compiler arguments are provided.
-# They are also used by the various testsuites to define the environment:
-# where to find stdio.h, libc.a, etc.
+# These globals are used by treelang_start if no compiler arguments are
+# provided.  They are also used by the various testsuites to define the
+# environment: where to find stdio.h, libc.a, etc.
 
 load_lib libgloss.exp
 load_lib prune.exp
 load_lib gcc-defs.exp
+load_lib target-libpath.exp
 
 #
 # TREELANG_UNDER_TEST is the compiler under test.
@@ -141,7 +143,7 @@ proc treelang_target_compile { source dest type options } {
     global treelang_libgcc_s_path
 
     set ld_library_path ".:${treelang_libgcc_s_path}"
-    lappend options "libs=-ltreelang"
+    set_ld_library_path_env_vars
 
     if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
        lappend options "libs=${gluefile}"
@@ -151,7 +153,7 @@ proc treelang_target_compile { source dest type options } {
     # TOOL_OPTIONS must come first, so that it doesn't override testcase
     # specific options.
     if [info exists TOOL_OPTIONS] {
-       set options [concat "additional_flags=$TOOL_OPTIONS" $options];
+       set options [concat "{additional_flags=$TOOL_OPTIONS}" $options];
     }
 
     # If we have built libtreelang along with the compiler (which usually