This is the mail archive of the gcc@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]

"make check--target-libstdc++-v3" failing for cross-compiler


I'm trying to write a shell script that builds and tests a cross-toolchain
consisting of the latest versions of binutils, gcc, and glibc.
As of a week or so ago, the script can build everything and run
the c-torture tests; see http://kegel.com/crosstool
As of yesterday, with a little patch (see my post yesterday to gcc-patches),
the script can also run g++'s dg.exp and old-deja.exp tests.
Now it's on to libstdc++.

"make check-target-libstdc++-v3" is failing because it's trying to
compile the testcases with the command 'g++'.  It does call
runtest.exp's transform routine to get the correct name for g++,
but that returns immediately with an untransformed name
because $target_triplet matches $host_triplet:

    if [string match $target_triplet $host_triplet] {
        return $name
    }

In my case, when running that test case, runtest.exp prints out
Target is powerpc-750-linux-gnu
Host   is powerpc-750-linux-gnu
Build  is i686-host_pc-linux-gnu

That's correct from the point of view of the library code being
tested, I guess, but since I only have an x86 -> ppc cross
compiler, the compiler has to run on x86, and there the compiler
is definitely named ${TARGET}-g++, not just plain g++.

If I comment out the three lines shown above, transform returns
the proper name for g++, and the harness gets past this problem.

I slowly go insane whenever I try to tackle problems involving
target triplets.  Can anyone suggest a way around this?  I could
stick in an ultimo kludgy hack that would disable those lines
of code when testing libstdc++, but that would surely bring
down the wrath of the gods upon me.

I am slowly getting the impression that nobody has ever
used the libstdc++ tests on a cross-compiler...
- Dan

--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


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