problem with compiling for sh3eb
Robert P. J. Day
rpjday@mindspring.com
Mon Apr 4 15:11:00 GMT 2005
On Sat, 2 Apr 2005, Arno Schuring wrote:
>
> > >
> > > The linux-libc-headers package gives you a subdirectory tree
> > > containing (among others):
> > >
> > > include/linux
> > > include/asm-$ARCH
> > > include/scsi
> > >
> > > You should copy at least the linux/ subdir into where gcc
> > > expects to find its headers (preferably $SYS-ROOT/usr/include)
> > > and copy asm-$ARCH to include/asm. So far, I have never needed
> > > the other subdirectories.
> >
> > oh, i didn't realize that. so, from the perspective of a config
> > file, i can just install those sanitized headers relative to where
> > they'd normally be found relative to ${GCC_DIR} and things should
> > work? cool. i'll give that a shot this morning.
>
> Uhm... just to make sure: I did write "where gcc expects to find the
> target's system headers", didn't I? They're not meant to replace
> gcc's internal headers. They should be placed in the same location
> where glibc places its include/ directory (and, for that matter,
> where crosstool copies the kernel headers).
looks like i will need to try this trick after all. as the rationale,
i managed to build the sh3eb toolchain using the following parts and
using gcc-3.4.3 as the host compiler (as i reported yesterday):
binutils-2.15.96
gcc-4.1-20050327
glibc-20050402
linux-2.6.8.1
now, just for fun, i wanted to see if i could do the build using gcc4
as the host compiler so i just moved gcc out of the way and linked gcc
-> gcc4.0, then tried again to get:
make ARCH=sh oldconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
HOSTCC scripts/basic/docproc
SHIPPED scripts/kconfig/zconf.tab.h
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/mconf.o
scripts/kconfig/mconf.c:91: error: static declaration of
âcurrent_menuâ follows non-static declaration
scripts/kconfig/lkc.h:63: error: previous declaration of
âcurrent_menuâ was heremake[1]: *** [scripts/kconfig/mconf.o]
Error 1
make: *** [oldconfig] Error 2
a quick check of the kernel source shows the above error in 2.6.8.1
but (apparently) not in 2.6.11.6 so if i move up to the new kernel,
i'll avoid that error but, of cours, run into the original error. so
it's on to sanitized headers, and i'm still a bit fuzzy on that.
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
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.
rday
-------------- next part --------------
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list