AMD 64 support
Mike A. Harris
mharris at redhat.com
Wed Nov 5 11:58:29 UTC 2003
On Mon, 3 Nov 2003, Bill Rugolsky Jr. wrote:
>> RedHat employees have said they openly encourage people to port Fedora to
>> other architectures. So the fedora community can take Fedora where they
>> want it to go; but RedHat likely won't act as the catalyst for things like
>> an x86_64 port. All understandable, its just frustrating in that they've
>> obviously done the required work; and they are perfectly content with
>> having the Fedora community duplicate that effort of formalizing 64bit
>> library and 32bit library coexistance and so on. For all I know RedHat
>> will weigh in and advise on such decisions.
>
>There is no great hidden magic here. There are x86_64 package
>builds in Rawhide, and the RHEL base is available as SRPMS.
>Sure, a lot of work went into getting multi-arch to function
>properly in RHEL, and the fruits of that are already available
>to you. To really contribute, one will have to read and
>understand first, and the code is there for you to peruse.
>Perhaps someone has thrown together a whitepaper on multi-arch
>support. Or you can start by looking at the changelogs,
>patches, and spec files for things like gcc, binutils, gdb,
>glibc, rpm, etc.
There really isn't a lot one needs to know/care about to support
AMD64. Make sure rpm spec files, Makefiles and other build
scripts do not hard code /lib, /usr/lib et al. as directories to
look for libraries in, nor for directories to install libraries
into. On AMD64 all 64bit libraries are in /lib64, /usr/lib64
etc. This is done by using %{_libdir} instead of /usr/lib in the
rpm specfile, and /%{lib} instead of /lib. Similar constructs
for other library locations. Some packages need patching to do
this, others just need spec file tweaks. It's usually very
simple work for each package that takes 5-30 minutes depending on
package complexity.
As long as the code is 64bit clean, there isn't a lot of other
concerns to have. Just search the web for generic 64bit
portability notes/papers/HOWTO docs, etc.
For multiarch issues, that is what %{_libdir} is for as mentioned
above. Never hard code library paths ever. ;o) After building
an rpm, do an "rpm -qlp *.rpm" on all of the binary rpms it
produced, making sure no files were installed into /usr/lib,
/lib, /whatever/lib, etc.. and if so, fix it. ;o)
If an app crashes on 64bit but not 32, run it in gdb, and well...
um... well, fix it. ;o)
--
Mike A. Harris ftp://people.redhat.com/mharris
OS Systems Engineer - XFree86 maintainer - Red Hat
More information about the fedora-devel-list
mailing list