This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: cross compile and checking for C compiler default output file name
- From: Josef Wolf <jw at raven dot inka dot de>
- To: newlib at sourceware dot org
- Date: Fri, 15 Jan 2010 16:12:41 +0100
- Subject: Re: cross compile and checking for C compiler default output file name
- References: <20100114131953.GA30625@raven.wolf.lan> <818ccfc41001142003q7dff3750mfb87f3bcb69f12b9@mail.gmail.com> <20100115064524.GC30625@raven.wolf.lan> <818ccfc41001150215t3dcbb48dx621cd85b68984dd2@mail.gmail.com>
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?