mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-29 14:54:05 +08:00
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
This commit is contained in:
parent
8b3cc88233
commit
6c1e7e268e
@ -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
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user