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: newlib does not pick up the right cross-compiling gcc


On 02/05/2010 10:47 AM, Josef Wolf wrote:
[ Sorry for not following up to the original thread, but I already deleted
   before I noticed that I have the same problem ]

Ralf Corsepius wrote:
This means you don't have powerpc-unknown-eabi-gcc installed rsp. don't have
it in $PATH.

To build newlib separately from gcc (which is what you do) you need your
target's<target>-gcc in $PATH

I have the gcc for the target (m68k-unknown-elf in my case) target installed and I give both, --target=m68k-unknown-elf and --host=m68k-unknown-elf options to configure, but still the native gcc is picked for compiling newlib.

Even worse: if I explicitly specify the cross compiler with

CC=/path/to/cross/bin/m68k-unknown-gcc /path/to/src/configure<more_options>

A piece of advice: It's not a good idea to set "CC", "CFLAGS", "CXXFLAGS", "AS", "LIBS" etc. when starting to get into building newlib, gcc or gcc+newlib, because crossbuilding typically involves build-, host- and target- compilation.


I.e. these environment variable might not be doing what think they are doing - If you know what they are doing, then there is nothing wrong in setting then.

then configure complains that the compiler can not create executables. Which
is no surprise: the cross compiler is not meant to create executables for the
build machine.

I have posted this problem to this list a while ago, but nobody seems to have
an idea what might cause the problem.

Well, your report was against newlib-1.15.0 -- An outdated and discontinued version, probably nobody wants to look back into :-)


Anyway, let me ask you a counter question: Why do you want to run "newlib/configure" ?

The standard way to build newlib is to run the toplevel
"configure --target=<target>" in a separate build directory or to build newlib one-tree style with gcc.



Ralf



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