This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [testsuite] clean up GCC_EXEC_PREFIX use for PR38526


On Tue, Mar 31, 2009 at 9:15 AM, Janis Johnson <janis187@us.ibm.com> wrote:
> On Mon, 2009-03-30 at 22:27 -0400, Hans-Peter Nilsson wrote:
>> On Mon, 30 Mar 2009, John David Anglin wrote:
>>
>> > > Will commit the following as per your approval on IRC, after
>> > > testing cross to crisv32-axis-linux-gnu and native
>> > > x86_64-unknown-linux-gnu:
>> >
>> > Unfortunately, this change re-introduces the problem compiling the
>> > compat generator on darwin:
>> > http://gcc.gnu.org/ml/gcc-testresults/2009-03/msg02935.html
>> >
>> > Executing on build: gcc -g -O2 -o /Users/dave/gnu/gcc/objdir/gcc/testsuite/g++/g
>> > ++.dg-struct-layout-1_generate.exe /Users/dave/gnu/gcc/gcc/gcc/testsuite/g++.dg/
>> > compat/struct-layout-1_generate.c /Users/dave/gnu/gcc/gcc/gcc/testsuite/g++.dg/c
>> > ompat/../../gcc.dg/compat/generate-random.c /Users/dave/gnu/gcc/gcc/gcc/testsuit
>> > e/g++.dg/compat/../../gcc.dg/compat/generate-random_r.c ? ?(timeout = 300)
>> > gcc: error trying to exec 'cc1': execvp: No such file or directory
>> > gcc: error trying to exec 'cc1': execvp: No such file or directory
>> > gcc: error trying to exec 'cc1': execvp: No such file or directory
>>
>> Looks pretty trivial, given the "re-introduction" patch.
>> (Everything looks trivial if it's misunderstood correctly. :)
>>
>> Does this help? ?I haven't tested it by any means whatsoever.
>
> I think the problem on Darwin is that the unsetenv had no effect,
> so this won't help.
>
>> gcc/testsuite:
>>
>> ? ? ? * lib/target-libpath.exp (restore_ld_library_path_env_vars):
>> ? ? ? Unsetenv GCC_EXEC_PREFIX also if TEST_GCC_EXEC_PREFIX exists.
>>
>> Index: target-libpath.exp
>> ===================================================================
>> --- target-libpath.exp ? ? ? ?(revision 145328)
>> +++ target-libpath.exp ? ? ? ?(working copy)
>> @@ -219,7 +219,8 @@
>>
>> ? ?if { $orig_gcc_exec_prefix_saved } {
>> ? ? ?setenv GCC_EXEC_PREFIX "$orig_gcc_exec_prefix"
>> - ?} elseif [info exists env(GCC_EXEC_PREFIX)] {
>> + ?} elseif { [info exists env(GCC_EXEC_PREFIX)] \
>> + ? ? ? ? ?|| [info exists TEST_GCC_EXEC_PREFIX] } {
>> ? ? ?unsetenv GCC_EXEC_PREFIX
>> ? ?}
>
> If GCC_EXEC_PREFIX was set when we started running the tests, then
> we want to use that again for the host compiler. ?If the testsuite
> set GCC_EXEC_PREFIX then we want to unset it. ?The check for
> TEST_GCC_EXEC_PREFIX would be redundant because it will have been
> used to set GCC_EXEC_PREFIX.
>
> David, does it work to replace the unsetenv with this?
>
> ?setenv GCC_EXEC_PREFIX ""
>

I got the same problem with AVX emulator on Fedora 10/x86-64:

Executing on build: gcc -g -O2 -o
/export/build/gnu/gcc-avx/build-x86_64-linux/gcc/testsuite/g++/g++.dg-struct-layout-1_generate.exe
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/g++.dg/compat/../../gcc.dg/compat/generate-random.c
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/g++.dg/compat/../../gcc.dg/compat/generate-random_r.c
   (timeout = 300)
In file included from
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c:26:^M
/usr/include/limits.h:125:26: error: no include path in which to
search for limits.h^M
In file included from
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c:27:^M
/usr/include/stdio.h:34:21: error: stddef.h: No such file or directory^M
...

Why do we have to set GCC_EXEC_PREFIX for HOSTCC? I have


[hjl@gnu-16 gcc]$ cat site.exp
## these variables are automatically generated by make ##
# Do not edit here. If you wish to override these values
# add them to the last section
set rootme "/export/build/gnu/gcc-avx/build-x86_64-linux/gcc"
set srcdir "/net/gnu-13/export/gnu/src/gcc/gcc/gcc"
set host_triplet x86_64-unknown-linux-gnu
set build_triplet x86_64-unknown-linux-gnu
set target_triplet x86_64-unknown-linux-gnu
set target_alias x86_64-unknown-linux-gnu
set libiconv ""
set CFLAGS ""
set CXXFLAGS ""
set HOSTCC "gcc"
set HOSTCFLAGS "-g -O2"
set TEST_GCC_EXEC_PREFIX "/usr/gcc-4.5-avx/lib/gcc/"
set TESTING_IN_BUILD_TREE 1
set HAVE_LIBSTDCXX_V3 1
set tmpdir /export/build/gnu/gcc-avx/build-x86_64-linux/gcc/testsuite
set srcdir "${srcdir}/testsuite"
## All variables above are generated by configure. Do Not Edit ##
[hjl@gnu-16 gcc]$

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]