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: problem with compiling for sh3eb



  reading what arno wrote above and his reference to "SYSROOT", it
seems that all i need to do is replace the normally
downloaded/patched/configured kernel source tree with the subset (in
exactly the same place) of the sanitized headers.

in my case, the output shows me that

SYSROOT=/home/rpjday/build/crosstool/sh3eb-unknown-linux-gnu/
 gcc-4.1-20050327-glibc-20050402/sh3eb-unknown-linux-gnu

This is probably the crosstool build path, though I'm not sure. I'll explain below.



underneath which i have the four software subdirectories:


  binutils-2.15.96
  gcc-4.1-20050327
  glibc-20050402
  linux-2.6.8.1

so ... *where* do the sanitized headers go?  i'm assuming i would put
them in place of linux-2.6.11.6/include, and then i could omit the
entire download/patch/configure kernel source step, right?  am i
getting close to understanding this?  thanks for your patience.

Yes, you're right, the headers replace the entire download/patch kernel step. Using the same approach crosstool does, you should unpack the headers in that very same dir. But you still need to copy the relevant include files into the destination dir, or at least tell crosstool how to.


Crosstool uses two separate trees while building. One is $BUILD_DIR, which is probably ./build/<target>/and-some-more. This tree is used by crosstool to prepare the sources, patch and compile. The second tree is $PREFIX/<target>/and-some-more, which you specify yourself. This tree stores the final toolchain including target libraries and headers. Eventually, the headers you want to use should be copied to $PREFIX/<target>/and-some-more/include/{linux,asm}

Crosstool does the following (from the linux kernel source dir):

mkdir -p $HEADERDIR
cp -r include/linux $HEADERDIR
cp -r include/asm-${ARCH} $HEADERDIR/asm
cp -r include/asm-generic $HEADERDIR/asm-generic
(the asm-generic is not provided by the sanitized headers, apparently it's unneeded)


That same thing is what you should do when you have unpacked the sanitized headers. Pick out the correct asm-$ARCH dir and copy into $HEADERDIR (which is conveniently defined by crosstool).


Regarding my reference to SYSROOT: --with-sysroot= is meant to replace the --with-headers and --with-libs parameters to gcc configure. I'm not sure what the rationale behind this is, but I have adopted the same approach (I believe it was something about --with-* old-style forcing gcc to copy the libs and headers into its own tree, while sys-root just tells gcc where the libs can be found without needing to copy it). Crosstool uses it by default for newer toolchain combos, I have seen.




rday

Good luck!


Arno

_________________________________________________________________
Play online games with your friends with MSN Messenger http://messenger.msn.nl/



------ 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]