[LLVMdev] llvm/test: suffix or operands invalid for `push'

Joachim Durchholz jo at durchholz.org
Mon Mar 3 02:49:37 PST 2008


Hi all,

I found enough to explain the behaviour that I encountered. If I'm
correct, the bugs are just in the dejagnu-based test machinery, not in
LLVM itself.
There seem to be two issues:


Issue 1 is that the CC, CFLAGS, CXX, and CXXFLAGS settings are not
reflected in the site.exp file. I had
 CC=gcc-4.2
 CFLAGS="-m32 -Wl,-melf_i386"
 CXX=g++-4.2
 CXXFLAGS=$CFLAGS
 ARCH=i686-pc-linux-gnu
 ./configure --prefix=$HOME --target=$ARCH --host=$ARCH --build=$ARCH
but site.exp still has
  set gccpath "gcc"
  set gxxpath "g++"
and no mention of -m32 or -Wl,elf_i386 (these options are required to
force a 64-bit GNU toolchain into 32-bit mode).

I don't know where these options are lost; I did a little looking around
in the configure scripts, but didn't find any obvious problems and
decided to leave this kind of issue to the autoconf experts :-)


Issue 2 is that the RUN: lines in the dejagnu tests ignore $CC, $CXX,
$CFLAGS and $CXXFLAGS when calling gcc, g++, or as (and possibly ld). In
most cases things will happen to not fail, but the assembler choked on
32-bit opcodes when running in default mode (which is 64 bits on an
amd64 machine, of course).

If I'm correct, this is a bug in the tests, not in LLVM.
Proposed bug fix would then be to replace in all test case files
(hopefully I got the dejagnu macro syntax right):
  gcc -> %gccpath
  g++ -> %gxxpath
  as -> %gccpath (don't call 'as' directly, gcc knows how to call it!)
  ld -> %gccpath (just as with 'as')


Can anybody confirm or correct these findings?

Regards,
Jo




More information about the llvm-dev mailing list