This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: PATH in Dan Kegel's script crosstool.sh


Michael LeBlanc wrote:
In Dan's crosstool.sh there is

   69  # make sure the build product's binaries are in the search path
   70  PATH="${PREFIX}/bin:${PATH}"
   71  export PATH

When I run it, PREFIX becomes, for example, the following:

/somewhere/result/powerpc-mike-linux-gnualtivec/gcc-3.3-glibc-2.3.2

In bin/ under there, I find powerpc-mike-linux-gnualtivec-gcc and all
the other executables with names powerpc-mike-linux-gnualtivec-*.
Are they used by those names in the scripts and Makefiles?

Yes.


Shouldn't line 70 read like this?

PATH="${PREFIX}/${TARGET}/bin:${PATH}"

Nope.


Now "gcc" will resolve to the build's gcc.

Yes, and that would be bad. You still need gcc to resolve to the build machine's gcc. Gnu packages, at least those that use autoconf, default to searching the path for ${TARGET}-gcc when they need a cross-compiler.

I should add that I did not invent this path-setting business;
all the gcc build scripts before me did this, too.
- Dan


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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