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)


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

--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


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