re PR testsuite/36443 (HOSTCC doesn't work with installed gcc)

PR testsuite/36443
	* gcc.dg/compat/struct-layout-1.exp: Temporarily unset
	GCC_EXEC_PREFIX from environment when running $HOSTCC.
	* g++.dg/compat/struct-layout-1.exp: Likewise.

From-SVN: r136698
This commit is contained in:
Jakub Jelinek 2008-06-12 13:17:05 +02:00 committed by Jakub Jelinek
parent c34938a8aa
commit b5a6bf2e7e
3 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2008-06-12 Jakub Jelinek <jakub@redhat.com>
PR testsuite/36443
* gcc.dg/compat/struct-layout-1.exp: Temporarily unset
GCC_EXEC_PREFIX from environment when running $HOSTCC.
* g++.dg/compat/struct-layout-1.exp: Likewise.
2008-06-12 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36345

View File

@ -128,8 +128,19 @@ set generator_src "$generator_src $srcdir/$subdir/../../gcc.dg/compat/generate-r
set generator_src "$generator_src $srcdir/$subdir/../../gcc.dg/compat/generate-random_r.c"
set generator_cmd "-o $generator $generator_src"
# Temporarily unset GCC_EXEC_PREFIX from environment, as that might
# confuse the $HOSTCC.
if [info exists env(GCC_EXEC_PREFIX)] {
set orig_gcc_exec_prefix "$env(GCC_EXEC_PREFIX)"
set orig_gcc_exec_prefix_saved 1
unsetenv GCC_EXEC_PREFIX
}
set status [remote_exec host "$HOSTCC $HOSTCFLAGS $generator_cmd"]
set status [lindex $status 0]
if { $orig_gcc_exec_prefix_saved } {
set orig_gcc_exec_prefix_saved 0
setenv GCC_EXEC_PREFIX "$orig_gcc_exec_prefix"
}
if { $status == 0 } then {
file delete -force $tstobjdir
file mkdir $tstobjdir

View File

@ -90,8 +90,19 @@ set generator_src "$generator_src $srcdir/$subdir/generate-random.c"
set generator_src "$generator_src $srcdir/$subdir/generate-random_r.c"
set generator_cmd "-o $generator $skip_dfp $generator_src"
# Temporarily unset GCC_EXEC_PREFIX from environment, as that might
# confuse the $HOSTCC.
if [info exists env(GCC_EXEC_PREFIX)] {
set orig_gcc_exec_prefix "$env(GCC_EXEC_PREFIX)"
set orig_gcc_exec_prefix_saved 1
unsetenv GCC_EXEC_PREFIX
}
set status [remote_exec host "$HOSTCC $HOSTCFLAGS $generator_cmd"]
set status [lindex $status 0]
if { $orig_gcc_exec_prefix_saved } {
set orig_gcc_exec_prefix_saved 0
setenv GCC_EXEC_PREFIX "$orig_gcc_exec_prefix"
}
if { $status == 0 } then {
file delete -force $tstobjdir
file mkdir $tstobjdir