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


On Tue, Apr 19, 2011 at 9:47 AM, Federico Terraneo <fede.tft@hotmail.it> wrote:
>
> 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

Thanks Federico, that works great :-)  I'd seen those listed in the configure
options so should have given them a try.  I did expect that setting the prefix
would point the configure system at the correct tools though...

> If anyone knows a cleaner way to do so, let me know

Indeed!  It may be that the configure script needs a tweak to use the prefix if
one is set (and if there's no explicit alternative given as above).  I'm still
learning about all of this GCC configuration and building malarkey,
but I'll have
a look at modifying the script when I get a bit of spare time.

Cheers,

David P.


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