You are not logged in.

#1 2012-01-02 03:09:01

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Using makepkg to cross-compile (for sparc64)

I recently acquired a Sun Ultra 5 system with a TI UltraSparc IIi CPU (sparc64).  I am in the middle of doing some compiling on it using Debian as the host system while dabbling into cross-compiling for it.  It would be superb to have a sparc64 toolchain installed and in the $PATH on a modern x86_64 system while using makepkg to cross-compile sparc64 packages.  I would copy /etc/makepkg.conf to a working directory, make the necessary changes, and run makepkg --config /working/dir/makepkg.conf.  makepkg would then (theoretically) pick up that I'm cross compiling, see the proper toolchain in the path, and cross compile.

Is this possible?  If not, what kind of work/patching would be necessary to make it happen?

Offline

#2 2012-01-02 07:00:38

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Using makepkg to cross-compile (for sparc64)

I have an i686 chroot installed on my x86_64 installation, you probably could do something similar, I guess. You don't mess up your $PATH, and you can use the scripts from devtools (makechrootpkg) to build your package. It's pretty neat.

Either way, if you want to use makepkg, that means you'll pretty much need to have an Arch sparc64 setup (at least, if you want dependency resolving etc.). A toolchain isn't enough, you need dependencies as well.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2012-01-02 11:10:43

cedeel
Member
From: ~
Registered: 2009-08-25
Posts: 176
Website

Re: Using makepkg to cross-compile (for sparc64)

A Sparc64 chroot isn't possible. The closest thing would be to run a chroot-like environment in QEMU.
A cross toolchain should be preferred, although I have no idea on how to set it up.

Offline

#4 2012-01-02 20:17:50

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: Using makepkg to cross-compile (for sparc64)

cedeel wrote:

A Sparc64 chroot isn't possible. The closest thing would be to run a chroot-like environment in QEMU.
A cross toolchain should be preferred, although I have no idea on how to set it up.

Yeah.  I'm building a toolchain atm.  As long as the PKGBUILDs know that I'm cross compiling, I should be okay.  There will be a bit of hand-cranking needed since not all sources use autotools.  Not really looking forward to cross-compiling openssl, and the kernel will take a bit of screwing around to work right, but, meh, that's part of the fun, right?  There's only 100-ish packages for a base install, so just getting to a functional system won't be too bad.

I'm going to experiment with an auto-build system when I have the system running.  I'm very comfortable with bash scripting and am learning c++, so I have some good ideas.  I work as a sysadmin too, so I could even give some of the meatier servers at work an extra job to do.  That is, if all goes well smile

Last edited by synthead (2012-01-02 20:18:18)

Offline

#5 2012-01-02 20:20:16

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: Using makepkg to cross-compile (for sparc64)

Here's what I'm following: http://www.ifp.illinois.edu/~nakazato/tips/xgcc.html

It might be a bit dated, but we'll see what happens.  Doing the first run of gcc now.

Offline

#6 2012-12-28 02:56:16

dlin
Member
From: Taipei,Taiwan
Registered: 2005-09-21
Posts: 265

Re: Using makepkg to cross-compile (for sparc64)

Have you ever tried crosstool-ng?


Running 4 ArchLinux including sh4twbox,server,notebook,desktop. my AUR packages

Offline

Board footer

Powered by FluxBB