This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: Binutils 2.17 fails `make check` on mipsel-linux-gnu


Hi Stuart,

: Under both Debian/MIPS Etch and Gentoo/MIPS, with vanilla binutils
: sources

Do you mean the vanilla 2.17 release sources ? If so, then have you tried the current mainline development sources ?

I have a sneaking suspicion, that the tests in question, are not run
when binutils is cross-compiled.

Some of the tests are specific to native toolchains and will not be run when testing a cross-toolchain. Grep for "isnative" in the testsuite control scripts (all ending in ".exp") to find such tests.


Also I noticed that the original test failures that you reported were with the binutils testsuite, whereas the ones you reported in your follow-up email were from the linker testsuite. Have you resolved the binutils testsuite problems ?

gcc -LBUILDDIR/./ld -BBUILDDIR/ld/tmpdir/ld/ -L/usr/mipsel-unknown-linux-gnu/lib -L/usr/local/lib -L/lib -L/usr/lib  -o tmpdir/vnp -Wl,-rpath,tmpdir tmpdir/mainnp.o tmpdir/vnp.so
tmpdir/vnp >tmpdir/vnp.out
child killed: illegal instruction

This looks worrying. It also looks like a compiler problem. If an illegal instruction is encountered then either the program being executed has been compiled for the wrong type of processor, or else execution has jumped off into a random piece of memory. So my first suggestion would be check the compiler that you are using to build the binutils, and if possible try a different compiler. (Or a newer version of the compiler, or even an older version).


	These above snippets were taken from the Cobalt build log... i.e.
running on a proper MIPS4 CPU.  I've tried running the test cases by
hand, but haven't had much luck (largely because I'm unsure which
commands belong to which testcase... the output is a little confusing to
me).

It should just be a case of cutting the relevant command lines out of the log and running them by hand. Often you can leave out the command lines to build the object files because they will be left in the testsuite's temporary build directory. For example the log line shown above can probably be repeated by running:


  % cd <ld-build-directory>
  % gcc -L<builddir>/ld -B<builddir>/ld/tmpdir/ld \
    -L/usr/mipsel-unknown-linux-gnu -L/usr/local/lib \
    -L/lib -o tmpdir/vpn.so -Wl,-rpath,tmpdir \
    tmpdir/mainnp.o tmpdir/vnp.so

I would recommend adding "-v" to the gcc command line in order to see the exact way that it invokes the linker.

If you are able to reproduce the problem, it would really help if you could investigate some more and maybe find out where this "illegal instruction" error is coming from.

Cheers
  Nick




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