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: newbie questions remain regarding crosstool with an arm920t target (arm_920TDI)


Hi Dan;

  Thank you for your reply.

  I do appreciate being given a fish or two but you also gave me a fishing 
pole :-)

  Thank you for providing succinct and useful answers to my confusion 
surrounding the toolchain naming and the interpretation thereof.

  Changing "920t" to "arm920t" in arm920.dat unfortunately did not solve the 
problem as the following excerpt from demo.sh shows.  Looking at the arm 
regular expressions shows that I can only specify an arm9 or an arm9tdmi 
target rather than an arm920t.  Do I need to get a patch from somewhere?  I 
know I don't have the nomenclature down pat yet, but I think I was told that 
arm9 instruction set might work ok for this board.  This I have to confirm.

**************************************************************************************************
++ cat arm920t.dat
++ cat gcc3.3-glibc2.3.2.dat
+ eval 'KERNELCONFIG=$PWD/arm.config' TARGET=arm-920t-linux-gnu 
'GCC_EXTRA_CONFIG="--with-cpu=arm920t' '--e
nable-cxx-flags=-mcpu=arm920t"' 'TARGET_CFLAGS="-O"' 
BINUTILS_DIR=binutils-2.14.90.0.5 BINUTILS_URL=http://
www.kernel.org/pub/linux/devel/binutils GCC_DIR=gcc-3.3 LINUX_DIR=linux-2.4.21 
GLIBC_DIR=glibc-2.3.2 GLIBCT
HREADS_FILENAME=glibc-linuxthreads-2.3.2 sh all.sh --notest
++ KERNELCONFIG=/tuba_local/crosstool/crosstool-0.24/arm.config
++ TARGET=arm-920t-linux-gnu
++ GCC_EXTRA_CONFIG=--with-cpu=arm920t --enable-cxx-flags=-mcpu=arm920t
...
...output deleted for brevity...
...
Unknown cpu used with --with-cpu=arm920t
Configure in 
/tuba_local/crosstool/crosstool-0.24/build/arm-920t-linux-gnu/gcc-3.3-glibc-2.3.2/build-gcc-co
re/gcc failed, exiting.
**************************************************************************************************

Thanks,
Ken

On Friday 17 October 2003 10:47, Dan Kegel wrote:
> Wolcott, Ken (MED, Compuware) wrote:
> >>TARGET=arm-920t-linux-gnu
> >>GCC_EXTRA_CONFIG="--with-cpu=920t --enable-cxx-flags=-mcpu=920t"
> >
> > ...
> > Unknown cpu used with --with-cpu=920t
> > Configure in
> > /tuba_local/crosstool/crosstool-0.24/build/arm-920t-linux-gnu/gcc-3.2.3-g
> >libc-2.3.2/build-gcc-core/gcc failed, exiting.
>
> At this point, one pulls out the trusty
>    find / -type f | xargs grep "Unknown cpu used with"
>
> :-)
>
> and quickly sees that gcc/config.gcc says something like:
>
> arm*-*-*)
>          case "x$with_cpu" in ...
>
>                  # Distinguish cores, and major variants
>                  # arm7m doesn't exist, but D & I don't affect code
>                  xarm[236789] | xarm250 | xarm[67][01]0 \
>
>                  | xarm7m | xarm7dm | xarm7dmi | xarm[79]tdmi \
>                  | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
>                  | xxscale \
>                  | xstrongarm | xstrongarm110 | xstrongarm1100)
>
>                          target_cpu_default2="TARGET_CPU_$with_cpu"
>                          ;;
>
>                  *) echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
>                     exit 1
>
> So --with-cpu wants something that starts with arm.
>
> >   Looking at Karim Yaghmour's Building Embedded Linux Systems book, it
> > looks like we need to go back to gcc 2.95.3 as a base.
>
> I wouldn't know... any arm experts here?  (You could also try asking on
> Karim's etux list, or the arm-linux list, or the real gcc list.)  I kind of
> expect the current tools can do it, but that's just a hope.
>
> >   I'm confused still about how are target architectures/machines
> > differentiated/specified.  What/where is the difference between arm and
> > alpha (for example) other than in alpha.dat and arm.dat
> > (alpha-unknown-linux-gnu vs arm-unknown-linux-gnu)?
>
> Nowhere -- the whole idea of crosstool is to simplify things so you
> only need to give the target info in one place.  It propagates outwards
> from the .dat file via the environment variables the .dat file sets
> and which are read by crosstool.sh.
>
> > How do differentiate between arm-9dtmi-linux-gnu
> > (which apparently works) and arm-920t-linux-gnu (which does not work)?  I
> > don't think providing an arm-unknown-linux-gnu toolchain will suffice,
> > don't I need to specify the target architecture more precisely?
>
> Better ask the ARM experts.  A generic arm toolchain might work,
> depending on whether arm_920tdi is a subset or not...
>
> >   second question: I had asked earlier about statically linking gcc.  I
> > think I may have misunderstood the problem I need to solve.  I see now a
> > distinction in concept between a gcc cross compiler toolchain which
> > itself is statically linked and the target executeables that a gcc cross
> > compiler toolchain generates which may or may not be statically linked. 
> > Talking with one developer I'm supporting seems to possibly support the
> > need to have both the toolchain and the targets statically linked.  So
> > there's still some unresolved ambiguity both here (the requirements) and
> > in concept (how does one do this?)
>
> To get a statically linked toolchain, the trick is to add
>    LDFLAGS="-static"
> to the 'make' command that builds the final gcc (in crosstool.sh), I think.
>
> To get statically linked target executables, you add -static to the
> commandline when you link the executables.
>
> >   third question: it seems as though I am still subscribed to the
> > crossgcc mailing list in digest mode, I've tried unsubscribing and
> > resubscribing, but it looks like I'm still in digest mode.
>
> Now you're asking a HARD question! :-)
> - 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]