GCC-4.0.2 on Cygwin
Jim Tison
jtison@ntplx.net
Sun Oct 9 15:23:00 GMT 2005
I don't know enough about the Motorola 68000 targets to tell you whether
the CSN (they're usually triplets) you're using is right. I had the same
problems building for an s390 derivative before I'd defined the complete
*triplet* fully in all the configury/libtool places. _Usually_, the
script works expect a three-part CSN, and I saw quite a few places
downline where behavior with less than a three-part CSN would be
undefined. The third part of the triplet is supposed to mean an OS; and
I haven't the slightest idea if the build system for m68k supports an
OS-less target. Maybe it does. Maybe it doesn't.
The other thing you might try is combining your gcc & binutils trees and
configure them all at once. I usually build trees of symlinks into the
same root. The same 'configure' script builds complete makefiles for the
build of both gcc & binutils in the proper order (binutils first), and
just "knows" to use the just-built binutils to build the compiler.
What's worked for me is to build the symlink tree pointing at their
respective CVS local repositories:
cd $x
mkdir combined-tree
cd combined-tree
ln -s $gcc_source/gcc/* .
ln -s $binutils_source/* . >/dev/null 2>&1
rm include;mkdir include;cd include
ln -s $gcc_source/gcc/include/* .
ln -s $binutils_source/include/* . >/dev/null 2>&1
Then ...
cd $y/buildspace
$x/combined-tree/configure --target=<n> --prefix=<p> <and so on to
your taste>
This has worked for me since gcc-3.x/binutils-2.9 (once I got my new
triplet straight, that is :-) ). I'd try it before you start hacking
build scripts ... --with-sysroot= was also a godsend for any cross. Once
you start hacking build scripts, you'll end up going down some really
bizarre paths. Been there, done that.
And the other thing ... maybe Dan's crosstool script handles your
target, maybe it doesn't. It might be worth a shot.
Good luck,
--Jim--
Brian Rose wrote:
> Jim Tison wrote:
>
>> Bleh ... this will teach me to post at midnight!
>>
>> --build is where you're running the configury/build process. That's
>> self-evident and defaults to the sane value.
>>
>> --host is where you want the language processor to *run*. If you
>> don't specify it, it will equal --build.
>>
>> --target is the architecture for which you want the language
>> processor to *emit* code.
>>
>> When --host == --build != --target, you'll build a normal cross
>> compiler.
>> When --host != --build != --target, you'll have a Canadian Cross.
>>
>
> So when I build binutils, I do it with the following commands...
> (from a build directory)
>
> $ ../../binutils-2.16.1/configure --target=m68k-elf
> --prefix=$HOME/rtems/tools
> $ make && make install
>
> So I look in the $HOME/rtems/tools directory and I see a bin and a
> m68k-elf directory. In bin I see the m68k-elf-* tools which have the
> correct target. But GCC seems to be looking in the m68k-elf/bin
> directory, where I have ar, as, etc which have the i686-pc-cygwin
> target. Having an i686-pc-cygwin target program in the m68k-elf
> directory doesn't make sense. Can somebody shed light on this?
>
> Anyway, GCC is supposed to look in the prefix/bin directory for the
> tools. GCC should also prepend the target to the filename to get the
> complete path name of prefix/bin/target-tool, correct? If so, then
> something is broken because those files are present.
>
> In any event, I can modify my build script to explicitly call the
> correct assembler and linker. I would like to solve this, because I
> don't think that this should be nessecary.
>
> ../../gcc-4.0.2/configure --target=m68k-elf --prefix=$HOME/rtems/tools
> --with-as=$HOME/rtems/tools/bin/m68k-elf-as.exe
> --with-ld=$HOME/rtems/tools/bin/m68k-elf-ld.exe
>
>
>
------
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