Re: Cross-compiling on Debian systems?
On Wed, 17 Nov 1999 19:52:42 -0800 (PST), ferret@phonewave.net wrote:
> On Wed, 17 Nov 1999, Ben Collins wrote:
>> On Wed, Nov 17, 1999 at 02:48:55PM -0800, ferret@phonewave.net wrote:
>> > I'd like to set up a cross-compiler on my Lintel (AMD 266) to compile
>> > packages for my Sparc IPX. I'd preferably like to package the
>> > cross-compiler so I can esaily remove it if I no longer need it.
>> >
>> > The only cross-compiler in the slink packages list is for m68k.
>> >
>> > What do I need to do to set one up?
>>
>> The last cross-compiler I built (for kernel compiles) was using the m68k
>> cross-compiler package. I just changed the m68k references to sparc, and
>> ran dpkg-buildpackage -us -uc -rfakeroot (change all of the m68k
>> references in debian/ to sparc).
>
> I just did a 'debian/rules binary' in 'gcc-m68k-linux-2.8.1' after
> changing 'm68k' to 'sparc', and I get a build error. Looks like the gcc
> buildstrap isn't working.
"make bootstrap" doesn't work for cross compilers, have a look at the
cross gcc FAQ: http://www.objsw.com/CrossGCC/ .
> ./xgcc -B./ -DCROSS_COMPILE -DIN_GCC -O2 -I./include -I. -I. \
> -I./config -g0 \
> -finhibit-size-directive -fno-inline-functions -fno-exceptions \
> -c ./crtstuff.c -DCRT_BEGIN -o crtbegin.o
> as: option `-s' is ambiguous
> make[1]: *** [crtbegin.o] Error 1
> make[1]: Leaving directory `gcc-m68k-linux-2.8.1'
> make: *** [build] Error 2
>
> I get the exact same error if I use dpkg-buildpackage. I don't know enough
> about building gcc to know what's wrong. And this is the source package
> from ftp.ca.debian.org (us.debian.org not responding to me through lynx
> for some reason)
Looks like you're using the native binutils instead of cross binutils.
> I also found out I need the binutils-m68k-linux package, and that's being
> downloaded as I type..
You also need libc and kernel header files for the target system. The
kernel has to be configured for the target system, but that can be done on
the build host.
Erik
--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2785859 Fax: +31-15-2781843 Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
Reply to: