Commit 6c1e7e26 by Nathan Sidwell Committed by Nathan Sidwell

testsuite_flags.in: Add --build-cc option.

	* 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.

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