Re: cross compiler deb package question
Bart Trojanowski <bart@jukie.net> writes:
> So as you may recall I am trying to get things started on an x86-64
> port. Since I don't have real hardware -- and it looks I will not have
> access to any for a while I have been playing around with the bochs
> emulator and a gcc-3.2-based cross compiler I built of the CVS snapshots
> from x86-64.org.
I was actually starting some work on this, too. I've gotten as far as
getting the kernel to boot in Bochs and run a statically linked
version of dash. I was planning to start more work on it tonight: set
aside a large amount of disk space for the Bochs disk image, cross
compile coreutils, binutils, gcc, etc.
> I would like to build a cross compiler (host=i386/i686, target=x86-64)
> and package it up in a deb. I don't think this package should go into
> the debian distribution, so I will not event suggest it. I will,
> however, make it available on my server -- if anyone else cares to use
> it.
>
> Since the compiler is a standard gcc-3.2 \w x86-64 patches, making the
> actual deb will be trivial (that is, I will use the existing gcc-3.2
> source package as a blueprint).
The cross compiling tools should install in /usr/x86_64-linux/*,
except that there will be tools x86_64-linux-gcc, etc. in /usr/bin.
So afaik using a prefix of /usr should be ok.
BTW, I found that the gcc build gave me endless problems unless I
passed --disable-multilib to configure. Also, it wants to link
libgcc_s.so against -lc, while glibc wants to link against libgcc.a,
so you won't be able to compile either all the way through the first
time.
> However, I cannot just install it in /usr/bin/gcc because it would clash
> with the base compiler (not to mention the apt gcc-wrapper)... so I know
> that I will need a prefix. I will probably pick x86-64- as the prefix,
> since it makes sense and is relatively short (the default would be
> x86-64-unknown-linux-).
x86_64-linux-* is better: that's what the kernel source I downloaded
from x86-64.org expects, and it's policy compliant to boot.
> Now, my question is: should it be installed in prefix=/usr or /opt or
> /usr/local. I understand that the debian-way (TM) is to instal in /usr,
> but this is a less then usual package, no?
>
> Moreover, what should I call the package? x86-64-gcc-3.2.i386.deb?
How about gcc-x86-64 instead? Iirc at one point there were
binutils-m68k packages, and there's currently binutils-multiarch
(though I don't think that includes x86-64 support atm).
--
Daniel Schepler "Please don't disillusion me. I
schepler@math.berkeley.edu haven't had breakfast yet."
-- Orson Scott Card
Reply to: