This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: Problem trying to configure / build when using "--program-prefix" option


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/19/2011 12:06 AM, David Paterson wrote:
> Hi all,
> 
> I'm running into a strange problem when using the "--program-prefix"
> option during configuration.  I've built Newlib successfully before
> without it, and now want to "personalise" the cross toolchain I'm
> working on.
> 
> I'm configuring with :-
> 
> ../newlib-1.19.0/configure --target=sparc-elf --disable-shared --disable-nls \
> --disable-werror --disable-newlib-supplied-syscalls --enable-interwork \
> --enable-multilib --with-gnu-as --with-gnu-ld --prefix=/usr/local/SparcTools \
> --program-prefix="test-elf-"
> 
> and during the config I'm seeing the following messages :-
> 
> checking for sparc-elf-cc... no
> checking for sparc-elf-gcc... no
> checking for sparc-elf-c++... no
> checking for sparc-elf-g++... no
> checking for sparc-elf-cxx... no
> checking for sparc-elf-gxx... no
> checking for sparc-elf-gcc... no
> checking for sparc-elf-gcj... no
> etc. for several more tool names...
> 
> Then, when I try to build (make all) I get :-
> 
> /bin/sh: sparc-elf-cc: command not found
> 
> Which of course is correct, since there isn't any "sparc-elf-" tools, as they're
> all named "test-elf-gcc" and the like.  GCC and Binutils all seem to be happy
> with the program prefix option, and create their outputs as expected.

I ran into the same problem and found a workaround, which consists in
passing those options to the configure:
CC_FOR_TARGET=<your compiler prefix>-gcc
CXX_FOR_TARGET=<your compiler prefix>-g++
GCC_FOR_TARGET=<your compiler prefix>-gcc
AR_FOR_TARGET=<your compiler prefix>-ar
AS_FOR_TARGET=<your compiler prefix>-as
LD_FOR_TARGET=<your compiler prefix>-ld
NM_FOR_TARGET=<your compiler prefix>-nm
RANLIB_FOR_TARGET=<your compiler prefix>-ranlib

The full command line I'm using to call newlib's configure is this:
./newlib-1.18.0/configure --target=arm-eabi
- --prefix=/opt/arm-miosix-eabi --enable-interwork --enable-multilib
- --with-float=soft --disable-newlib-io-pos-args --disable-newlib-mb
- --enable-newlib-multithread CC_FOR_TARGET=arm-miosix-eabi-gcc
CXX_FOR_TARGET=arm-miosix-eabi-g++ GCC_FOR_TARGET=arm-miosix-eabi-gcc
AR_FOR_TARGET=arm-miosix-eabi-ar AS_FOR_TARGET=arm-miosix-eabi-as
LD_FOR_TARGET=arm-miosix-eabi-ld NM_FOR_TARGET=arm-miosix-eabi-nm
RANLIB_FOR_TARGET=arm-miosix-eabi-ranlib

If anyone knows a cleaner way to do so, let me know
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNrUw0AAoJECkLFtN5Xr9feoAIAJgwUDcgsaQZ23j4ek6gl17p
5stpvgRcIj0aKfSk6hpLxRYvsPPsFVKU+vlYXllvmuyfLaID1JoEn8/qfWLdPcRD
SFuj1Q/IX8sSYeATvAQvy+i62R6Z8O8Z+zr8lkash3xizlY9DJJEpNkqdNzxw1hV
EWNbTRA7/bycPkXtfQCARfoHSldYOwVEt6qDXnAoXK8h4HNOJkg0gpybtd0kZnRH
05zc6BXEJ8xO8FcuRpScyDOAtJvvRlx2IM6ou0ew37EbZ2UQoAmeeQL5rxSl+2h6
wqRHh3+DnrAQb8qEZxPke5ed63uPuobCeEvMUX4ajDyiCPePT9S+CUoVJDbP/+0=
=jnNO
-----END PGP SIGNATURE-----


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