cross compile and checking for C compiler default output file name

Josef Wolf jw@raven.inka.de
Fri Jan 15 15:20:00 GMT 2010


On Fri, Jan 15, 2010 at 03:15:40PM +0500, Ahsan Khawaja wrote:
> In my case it used cross compiler automatically but for checking GCC
> compiler it used host compiler. You can check config.log file to see whether
> it is using cross compiler or not.

So now I call it like this:

  CC= CPP= /crossgcc/src/newlib-1.15.0/configure \
  --prefix=/usr/local/crossgcc --enable-install-libbfd --enable-languages=c \
  --enable-targets=m68k-ieee --with-gnu-ld --with-gnu-as --with-newlib \
  --with-stabs --enable-commonbfdlib --nfp --gas -v --target=m68k-coff

and I get a different error:

  configure:2356: checking for suffix of executables
  configure:2358: m68k-coff-gcc \
    -B/crossgcc/build/newlib/m68k-coff/m68000/newlib/ \
    -isystem /crossgcc/build/newlib/m68k-coff/m68000/newlib/targ-include \
    -isystem /crossgcc/src/newlib-1.15.0/newlib/libc/include \
    -m68000 -o conftest   -nostdlib -e main conftest.c  >&5
  m68k-coff-gcc: conftest.c: No such file or directory
  m68k-coff-gcc: no input files
  configure:2361: $? = 1
  configure:2379: error: cannot compute suffix of executables: cannot compile
  and link
  See `config.log' for more details.

I still fail to understand why newlib needs to know the default executable
name. After all, newlib is a library, so what on earth has it to do with
executables? What is this test good for and how is it supposed to work?



More information about the Newlib mailing list