cross compiler [on cygwin, targeting arm-linux]
Dave Korn
dave.korn@artimi.com
Wed Oct 19 19:09:00 GMT 2005
Dan Kegel wrote:
> Paul McDonald wrote:
>> I'm new to Linux, but I've started a new project in college and
>> Cygwin is the environment we're using. The first task I've been
>> given is to build a cross compiler for Cygwin host to ARM-Linux
>> target. To be perfectly honest that's way above my head at the
>> moment, I'm a mechanical engineer by education so all this
>> programming stuff makes me nervous. Your website has been very
>> informative (those bits that I understand at least) but I've been
>> asked to build the compiler from scratch. The embedded system we're
>> using has an Intel Xscale PXA225 processor, application compatible
>> with an SA1110 I think. Do you know of any resources, web or
>> otherwise, where I could find a walkthrough to do this. I've only
>> been using Cygwin about a week so I'm talkin' really basic
>> walkthrough, nothing taken for granted. Any help or advice you could
>> offer would be much appreciated.
>
> Definitely just run crosstool to build the compiler from scratch.
> Doing it by hand is cruel and unusual punishment.
No, it isn't, it is in fact very very simple indeed. I did this exact
same thing myself a little while ago, and it was made trivially easy by the
fact that I could use the prebuilt libs and headers from Compulab's
downloadable cross-toolchain to avoid all the usual juggling with bootstrap
and full compilers.
Alas it's the end of my working day now so I don't have time to write up
the procedure, but it was easy and there were no complications. In essence,
it was just a matter of unpacking Compulab's 3.3.2 based toolchain
armgx-linux-compiler-3.3.3.zip (yes, I know; they have misnamed the file) to
get the embedded cross-3.3.2.tar.gz, extracting that into my cygwin
installation in a directory I chose to call /usr/local/arm/old-3.3.2,
thereby getting /usr/local/arm/old-3.3.2/3.3.2/ with the existing toolchain,
and configuring the gcc build with:
/repository/tools/gcc-3.3.3/configure --host=i686-pc-cygwin
--target=arm-linux --disable-shared --with-gnu-as --with-gnu-ld
--enable-multilib --prefix=/artimi/swtools/windows --enable-languages=c
--disable-threads
--with-headers=/usr/local/arm/old-3.3.2/3.3.2/arm-linux/sys-include
--with-libs=/usr/local/arm/old-3.3.2/3.3.2/arm-linux/lib -v
Actually, I'm not sure now if I pointed --with-includes at
..../3.3.2/arm-linux/sys-include or at ...../3.3.2/arm-linux/include. I
think I may have actually ended up having to copy the contents of both those
directories one into the other and then used that one, because I think (but
can't quite tell from my saved build logs) that files from both are
required. That's probably the easiest way to do it, anyway.
cheers,
DaveK
--
Can't think of a witty .sigline today....
------
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