OSDN Git Service

* scripts/testsuite_flags.in: Add --build-cc option.
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Apr 2007 07:38:33 +0000 (07:38 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Apr 2007 07:38:33 +0000 (07:38 +0000)
* testsuite/lib/libstdc++.exp (libstdc++_init): Set cc.  Fix typo
in previous change.
(v3_target_compile_as_c): Use cc.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124058 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/scripts/testsuite_flags.in
libstdc++-v3/testsuite/lib/libstdc++.exp

index 497b9d7..c0f3659 100644 (file)
@@ -1,3 +1,10 @@
+2007-04-23  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * scripts/testsuite_flags.in: Add --build-cc option.
+       * testsuite/lib/libstdc++.exp (libstdc++_init): Set cc.  Fix typo
+       in previous change.
+       (v3_target_compile_as_c): Use cc.
+
 2007-04-22  Mark Mitchell  <mark@codesourcery.com>
 
        * testsuite/lib/libstdc++.exp (libstdc++_init): Use the same flags
index 13984fa..13bd68b 100755 (executable)
@@ -15,6 +15,7 @@ Usage:
     testsuite_flags --install-includes
                    --build-includes
                    --build-cxx
+                   --build-cc
                    --install-cxx
                    --cxxflags
                    --cxxpchflags
@@ -47,6 +48,11 @@ case ${query} in
       CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/g++ ,'`
       echo ${CXX}
       ;;
+    --build-cc)
+      CC_build="@CC@"
+      CC="$CC_build"
+      echo ${CC}
+      ;;
     --cxxflags)
       CXXFLAGS_save="-g -O2 -D_GLIBCXX_ASSERT"
       CXXFLAGS_config='@SECTION_FLAGS@ -fmessage-length=0 
index f00bb84..85f2566 100644 (file)
@@ -83,7 +83,7 @@ proc libstdc++_init { testfile } {
     global env
     global v3-sharedlib 
     global srcdir blddir objdir tool_root_dir
-    global cxx cxxflags cxxldflags
+    global cc cxx cxxflags cxxldflags
     global includes
     global gluefile wrap_flags
     global ld_library_path
@@ -175,6 +175,7 @@ proc libstdc++_init { testfile } {
     set cxx [transform "g++"]
     set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0" 
     set cxxldflags ""
+    set cc [transform "gcc"]
     # Locate testsuite_hooks.h and other testsuite headers.
     set includes "-I${srcdir}/util"
     # Adapt the defaults for special circumstances.
@@ -198,10 +199,10 @@ proc libstdc++_init { testfile } {
            # Create the directory containing the file.
            set dir [file dirname $dst]
            remote_exec host "mkdir" [list "-p" "$dir"]
-           # Download teh file.
+           # Download the file.
            set result [remote_download host $src $dst]
            if { $result == "" } {
-               verbose -log "Unable to download ${srcdir}/${f} to host."
+               verbose -log "Unable to download ${srcdir}/${src} to host."
                return "untested"
            }
        }
@@ -210,12 +211,14 @@ proc libstdc++_init { testfile } {
         # If we find a testsuite_flags file, we're testing in the build dir.
        set cxx [exec sh $flags_file --build-cxx]
        set cxxflags [exec sh $flags_file --cxxflags]
-        set cxxldflags [exec sh $flags_file --cxxldflags]
+       set cxxldflags [exec sh $flags_file --cxxldflags]
+       set cc [exec sh $flags_file --build-cc]
        set includes [exec sh $flags_file --build-includes]
     }
 
     # Always use MO files built by this test harness.
     set cxxflags "$cxxflags -DLOCALEDIR=\".\""
+    set ccflags "$cxxflags -DLOCALEDIR=\".\""
 
     # If a PCH file is available, use it.  We must delay performing
     # this check until $cxx and such have been initialized because we
@@ -376,6 +379,7 @@ proc v3_target_compile_as_c { source dest type options } {
     global includes
     global flags_file
     global blddir
+    global cc
 
     if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
         lappend options "libs=${gluefile}"
@@ -383,7 +387,6 @@ proc v3_target_compile_as_c { source dest type options } {
     }
 
     set tname [target_info name]
-    set cc [board_info $tname compiler]
     set cc_final $cc
     set cxxlibglossflags [libgloss_link_flags]
     set cc_final [concat $cc_final $cxxlibglossflags]