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: Pre defined #defines for different cross compilers ?


Anton Erasmus wrote:
It is quite likely that I am misunderstanding how autoconf works. If I want to compile code that runs on an embedded ARM. Say my
compiler is hosted under cygwin. If I run configure on my host,
it will configure the makefile etc. as if the code was going to run on
the host ? Is it possible with autoconf to say do:
./configure ARM-FLASH

To tell configure you want to cross-compile a package, you override CC and the like before running configure. For instance:

            CC=$TARGET-gcc CFLAGS="$CCFLAGS" CXX=$TARGET-g++ CXXFLAGS="$CCFLAGS" \
                ac_cv_func_mmap_fixed_mapped=yes \
                ./configure --build=pentium-unknown-linux \
                    --host=$TARGET --prefix=/usr

where TARGET is e.g. arm-linux, and the cross-compiler arm-linux-gcc is on your PATH.
Sometimes you have to say --target=$TARGET instead of --host=$TARGET;
it varies from package to package.

The above is probably quite similar to building a canadian-cross gcc toolset.
The how-tos I have regarding this subject is quite old. Can the standard gcc
configure be used to configure for a canadian cross ? I particularly would like
to be able to build a cygwin hosted ARM, PPC etc cross compiler on a
linux host. Using cygwin as the host has been a bit of a hit and miss afair.

Heh. Probably, but you'll probably run into lots of little issues that need to be worked around. It's probably easier to get the "standard" build script for a cross-compiler working on cygwin first. I've been intending to get my crosstool script running on cygwin. If you try that, and have trouble, maybe I can help. - 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]