[uClibc] SH4 linux header file fixes

Carl SHAW carl.shaw at st.com
Wed Aug 18 14:54:19 UTC 2004


On Wed, 2004-08-18 at 14:50, Paul Mundt wrote:
> On Wed, Aug 18, 2004 at 11:54:32AM +0100, Carl SHAW wrote:
> > Here is a patch for extra/scripts/fix-includes.sh so asm is correctly
> > linked to asm-sh rather than the non-existent asm-sh4 for the sh4 arch.
> > 
> > --- fix_includes.sh.orig        2004-08-18 11:49:50.490742704 +0100
> > +++ fix_includes.sh     2004-08-18 11:53:17.231313360 +0100
> > @@ -134,6 +134,10 @@
> >         set -x;
> >         ln -fs $KERNEL_SOURCE/include/asm-cris include/asm;
> >         set +x;
> > +    elif [ "$TARGET_ARCH" = "sh4" ]; then
> > +       set -x;
> > +       ln -fs $KERNEL_SOURCE/include/asm-sh include/asm;
> > +       set +x;
> >      elif [ "$HAS_MMU" != "y" ]; then
> >             if [ -d $KERNEL_SOURCE/include/asm-${TARGET_ARCH}nommu ] ;
> > then
> >                 set -x;
> > 
> Why would you build with TARGET_ARCH=sh4? To get the desired behaviour,
> you should have TARGET_ARCH set to sh and have CONFIG_SH4 set. Note that
> the top-level Rules.mak assumes this as well.
> 
> The only place where sh4 comes in useful is if we're interested in
> setting up the include/asm-sh/cpu symlink for the desired processor
> family.. but this can be just as easily determined from CONFIG_SH2/3/4,
> and is only a 2.6 issue.
> 

My mistake - you're right - I'm debugging the whole toolchain and the
toolchain make (the other patch) was setting the asm link incorrectly in
the headers directory as it uses ARCH=sh4.  The uClibc configuration
_does_ get its local include link correct for the reasons you give and
this patch _is_ unnecessary.

I'm not familiar with the SH2 and SH3 (I'm working with an SH4 ST40
processor), but is there any reason why the uClibc toolchains only have
the ARCH=sh4 option?

Regards,

Carl




More information about the uClibc mailing list