You are not logged in.

#1 2004-12-15 14:03:41

RedShift
Member
From: Belgium
Registered: 2004-07-16
Posts: 230

ArchLinux for the AMD 64

Hi all,

I'm going to try building current for the AMD 64 architecture. I currently don't have a 64 CPU, so builds can't be tested by myself. But I was wondering if it was possible to build a x86_64 binary from a 32 bit machine? I would do this on a dual p-III 866.

I've already mailed Judd for this, but he hasn't replied (yet), probably busy doing other stuff.

This is what my makepkg.conf would look like:

export CARCH="AMD64"
export CHOST="amd64-pc-linux-gnu"

export CFLAGS="-march=amd64 -O2 -pipe"
export CXXFLAGS="-march=amd64 -O2 -pipe"

#export CFLAGS="-mcpu=amd64 -O2 -pipe"
#export CXXFLAGS="-mcpu=amd64 -O2 -pipe"

export MAKEFLAGS="-j 2"
export USE_FAKEROOT="y"
export USE_COLOR="n"
export PKGDEST=/home/glenn/build/archlinux/packages/

Is this right? For the kernel, I would use the same configuration file. For all the packages I won't make any modification to their pkgbuild's.

Then I would do makeworld /home/glenn/build/archlinux/packages base


(This post is the same as the one in the maillinglist)


:?

Offline

#2 2004-12-15 15:12:35

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: ArchLinux for the AMD 64

To be sure I'd add -m64 too.

Offline

#3 2004-12-15 15:19:25

RedShift
Member
From: Belgium
Registered: 2004-07-16
Posts: 230

Re: ArchLinux for the AMD 64

Yes I've figured that out too. But ArchLinux doesn't standard has 64 bit support compiled into it's libraries. I'm trying to recompile glibc with 64 bit support for cross-compiling, but during the makepkg it can't find asm/prctl.h
And I indeed do not have this file in my /usr/include/asm directory. The question now is, what is it, what does it do, and how do I get it?


:?

Offline

#4 2004-12-15 16:17:55

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: ArchLinux for the AMD 64

A 32 bit version "optimized" for x86-64 isn't interesting, can as well use the current i686 Arch packages. What you really want is a totally 64 bit system, with preferably 32 bit backward compatibily so you can use "normal" 32 bit Arch packages too. The 64 and 32 bit binaries can live side by side, only thing you need to keep track off is which version you installed, so you don't install both a 32 and a 64 version of a package (at least I can imagine that causing problems). Making all this work nicely is the hard part, just recompiling packages for 64 bit is easy and not the real work. (of course a lot need fixing before they work with 64 bit, but that must be done upstream.)

As for the asm/prctl.h file: All stuff can be found in linux-2.*/include/asm-x86_64/, you really don't want to compile against your current i386 version include/asm files.

If you ask me someone who actually has an x86-64 cpu should do this kind of stuff, you can't even test if the apps work or not, and testing stuff is the most work. For adding real amd64 support you simply need an amd64 system.

Offline

#5 2004-12-15 16:21:04

RedShift
Member
From: Belgium
Registered: 2004-07-16
Posts: 230

Re: ArchLinux for the AMD 64

If you ask me someone who actually has an x86-64 cpu should do this kind of stuff, you can't even test if the apps work or not, and testing stuff is the most work. For adding real amd64 support you simply need an amd64 system.

Bah, I hate giving up.


:?

Offline

#6 2004-12-15 16:45:02

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: ArchLinux for the AMD 64

It's not about giving up, it's about not being able to do the real work, but only a tiny, easy part. It's like making pkgbuilds without being able to build, compile and test them, but worse.

There is simply no honour to gain from this fiddling. :-)

Though if you want to continue anyway, then at least find someone with an amd64 who can actively help you testing the stuff you make.

Offline

#7 2004-12-15 16:48:11

RedShift
Member
From: Belgium
Registered: 2004-07-16
Posts: 230

Re: ArchLinux for the AMD 64

i3839 wrote:

It's not about giving up, it's about not being able to do the real work, but only a tiny, easy part. It's like making pkgbuilds without being able to build, compile and test them, but worse.

There is simply no honour to gain from this fiddling. :-)

Though if you want to continue anyway, then at least find someone with an amd64 who can actively help you testing the stuff you make.

Aha! You're volunteering? ;-)


:?

Offline

#8 2004-12-15 17:24:19

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: ArchLinux for the AMD 64

RedShift wrote:

Aha! You're volunteering? ;-)

That implies that I have an amd64... Dream on, me. ;-)

Offline

#9 2004-12-20 02:23:49

jason
Member
From: /dev/null
Registered: 2003-01-13
Posts: 102

Re: ArchLinux for the AMD 64

I've said this before, but I have an AMD 64 and I'd be willing to help build x86_64 packages.  I've been bugging Xentac for some build scripts, but I'm sure Xentac is busy, just like Judd.  I'm not sure if supporting two architectures is what ArchLinux is heading for, but I guess that's up to the gods above.... you know... that "big picture" thing people are always talking about.

Offline

#10 2004-12-20 10:09:22

Creepy
Member
From: The Netherlands
Registered: 2004-09-20
Posts: 48

Re: ArchLinux for the AMD 64

I'm willing to test and compile packages as well. smile (yes, I have an AMD64).

With a true 64 bit envoriment I think's it's not that much of a trouble to compile the packages with abs. But my problem a.t.m. is to get a arch 64bit enviroment (i.e. crosscompile kernel + base packages and install that on a new partition, reboot and hope that it works wink ).

Offline

#11 2005-01-03 22:08:50

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: ArchLinux for the AMD 64

hey, i tried with marc=amd64 and it didn't worked. I had to put march=athlon64

I'm going to build some packages, but can I update them anywhere? this is my makepkg.conf file;

#
# /etc/makepkg.conf
#

# The FTP/HTTP download utility that makepkg should use to acquire sources
export FTPAGENT="/usr/bin/wget --continue --passive-ftp --tries=3 --waitretry=3"
#export FTPAGENT="/usr/bin/snarf"
#export FTPAGENT="/usr/bin/lftpget -c"

export CARCH="AMD64"
export CHOST="amd64-pc-linux-gnu"

# Pentium Pro/Pentium II/Pentium III+/Pentium 4/Athlon exclusive (binaries
# will use the P6 instruction set and only run on P6+ systems)
export CFLAGS="-march=athlon64 -O2 -pipe"
export CXXFLAGS="-march=athlon64 -O2 -pipe"
# Pentium Pro/Pentium II/Pentium III+/Pentium 4/Athlon optimized (but binaries
# will run on any x86 system)
#export CFLAGS="-mcpu=i686 -O2 -pipe"
#export CXXFLAGS="-mcpu=i686 -O2 -pipe"

# SMP Systems
#export MAKEFLAGS="-j 2"

# Enable fakeroot for building packages as a non-root user
export USE_FAKEROOT="y"

export LDFLAGS="-Wl,-O2"

# Enable colorized output messages
export USE_COLOR="y"

# Specify a fixed directory where all packages will be placed
#export PKGDEST=/home/packages

# If you want your name to show up in the packages you build, set this.
#export PACKAGER="John Doe <john@doe.com>"

will the packages compiled this way be good for you?

Offline

#12 2005-01-03 22:21:45

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: ArchLinux for the AMD 64

right now i'm building base.

next i think i'll build kde

But I also think that I have to become a tur in order to have my packages uploaded to anybody, isn't it?

Offline

#13 2005-01-03 23:12:54

Fox
Member
Registered: 2004-07-28
Posts: 124

Re: ArchLinux for the AMD 64

Your CFLAGS are wrong!
This topic was discussed at the mailinglist:
http://www.archlinux.org/pipermail/arch … 03091.html
http://linux.bytesex.org/cross-compiler.html
http://gentoo-wiki.com/Safe_Cflags#Opte … _.28AMD.29


OMG! Make a better research on it!
Matthias-Christian Ott

Offline

#14 2005-01-04 00:19:05

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: ArchLinux for the AMD 64

thanks smile

Offline

#15 2005-01-04 13:00:50

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: ArchLinux for the AMD 64

It would really be nice if *WHEN* I switch to an AMD64, Arch would still be there and optimized for that chip. The only problems is that you would need two seprate repos for 32-bit and 64-bit. One day Arch will have to face the 64-bit future.

Offline

#16 2005-01-04 18:35:54

Fox
Member
Registered: 2004-07-28
Posts: 124

Re: ArchLinux for the AMD 64

But if you use the wrong CFLAGS (Gentoo's CFLAGS fit best), there won't be an Arch Linux 64 Bit Edition.

Offline

#17 2005-01-04 20:19:05

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: ArchLinux for the AMD 64

ok, then I make binutils with that cflags, but when i type "file /usr/bin/ld" it sais ELF 80386 32 bits.

What's going on?

Offline

#18 2005-01-05 16:47:21

Fox
Member
Registered: 2004-07-28
Posts: 124

Re: ArchLinux for the AMD 64

Pajaro wrote:

ok, then I make binutils with that cflags, but when i type "file /usr/bin/ld" it sais ELF 80386 32 bits.

What's going on?

Read it (You need a Cross Compiler):
http://linux.bytesex.org/cross-compiler.html

Offline

Board footer

Powered by FluxBB