Discussion:
Slackware 11 compiler distribution question - cross compiler
(too old to reply)
George
2007-08-04 01:08:58 UTC
Permalink
Hi,
I have a few compiler questions. I have slackware 11.0 and would like to
be able to do some cross-compiler builds for PPC and ColdFire. Does
anyone know if the slackware 11 distribution for GCC supports
cross-compiling?

2. How can I determine what processors the compiler supports?

3. If PPC and ColdFire processors are not supported by default can
anyone suggest where I can get the files needed to upgrade my GNU
compiler to support these processors.

Any help would be appreciated.

Thanks
D Herring
2007-08-04 01:54:05 UTC
Permalink
Post by George
Hi,
I have a few compiler questions. I have slackware 11.0 and would like to
be able to do some cross-compiler builds for PPC and ColdFire. Does
anyone know if the slackware 11 distribution for GCC supports
cross-compiling?
2. How can I determine what processors the compiler supports?
3. If PPC and ColdFire processors are not supported by default can
anyone suggest where I can get the files needed to upgrade my GNU
compiler to support these processors.
I think you'll need to find a package somewhere or build your own
cross compiler. Granted I didn't test 11's compiler, but gcc 4.1.2
on Slackware 12 complains.
Post by George
gcc -mcpu=powerpc test.c
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
test.c:1: error: bad value (powerpc) for -mtune= switch

(This would work on a PPC enabled compiler)
http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/RS_002f6000-and-PowerPC-Options.html

Building a cross compiler is a little slow and tedious, but doable.
Here are the main instructions:
http://gcc.gnu.org/install/index.html

The key step is to specify the target architecture. See
http://gcc.gnu.org/install/configure.html
Especially the section entitled "Cross-Compiler-Specific Options"

There's a ColdFire-specific build note available:
http://gcc.gnu.org/install/specific.html#m68k-x-x

Good luck,
Daniel
Eef Hartman
2007-08-04 10:44:05 UTC
Permalink
Post by George
Hi,
I have a few compiler questions. I have slackware 11.0 and would like to
be able to do some cross-compiler builds for PPC and ColdFire. Does
anyone know if the slackware 11 distribution for GCC supports
cross-compiling?
No, it does not. If you do gcc -dumpmachine you will see that it will
compile for target i486-slackware-linux ONLY.
Post by George
2. How can I determine what processors the compiler supports?
See above, or look (on the source CD's) to the arguments of the build
scripts. The "gcc -dumpspecs" also gives a lot of info about the
specifications the compiler is build with.
Post by George
3. If PPC and ColdFire processors are not supported by default can
anyone suggest where I can get the files needed to upgrade my GNU
compiler to support these processors.
I _think_, but didn't check, that the sources ON those source CD's are
the full gcc source, so you will have to modify the build scripts to
allow for (architecture) targets TO those machines too.
That is: which arguments it will allow to the -march option.
--
********************************************************************
** Eef Hartman, Delft University of Technology, dept. EWI/TW **
** e-mail: ***@math.tudelft.nl, fax: +31-15-278 7295 **
** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
********************************************************************
George
2007-08-05 17:53:43 UTC
Permalink
Post by George
Hi,
I have a few compiler questions. I have slackware 11.0 and would like to
be able to do some cross-compiler builds for PPC and ColdFire. Does
anyone know if the slackware 11 distribution for GCC supports
cross-compiling?
2. How can I determine what processors the compiler supports?
3. If PPC and ColdFire processors are not supported by default can
anyone suggest where I can get the files needed to upgrade my GNU
compiler to support these processors.
Any help would be appreciated.
Thanks
Both replies have been very helpful, thanks!

Continue reading on narkive:
Loading...