Subject: [alpine-devel] Multi architecture support

From: Mark Constable <[email-masked]>
Date: Thu, 30 Jul 2009 16:17:42 +1000

I see the default /etc/abuild.conf has CHOST=i486-alpine-linux-uclibc
and there is no sign of a PKGBUILD arch=(i686 x86_64) equivalent so
is there a recommended way to provide multiple archs from a single
APKBUILD?

I guess using a different /etc/abuild.conf in each build environment
would suffice but I thought I should check if there is some inbuilt
method that is not documented yet.

I intend to build a subset of packages for i686, x86_64, arm8 and
possibly ppc (ps3) eventually. I'd use separate chroots for i686
and x86_64 and possibly use the ArchMobile qemu examle for arm8 as
I have a Beagelboard begging for some TLC.

Sorry about the rush of newbie questions and many thanks for the
responses.

--markc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 30 Jul 2009 14:48:38 +0200

On Thu, 2009-07-30 at 16:17 +1000, Mark Constable wrote:
> I intend to build a subset of packages for i686, 

This is ok.

> x86_64, 

This should work, but I have never tried it. I think most APKBUILDs will
work too. Looking at Arch Linux it seems like most x86_64 bit specifics
are related to PIC, which we need anyway due to our hardened toolchain.

> arm8 and
> possibly ppc (ps3) eventually. 

Those would probably require cross-compiling. I think its possible but
it will probably require some redesign of abuild and extra things to
consider in APKBUILDs.

> I'd use separate chroots for i686

TLC?

I'm not familiar with ArchMobile. Does it cross-compile or native
compile in qemu? Native compile in qemu might work but is slow.

Btw, i use vserver for my development of x86. Its like an advanced
chroot.

---

---

From: Mark Constable <[email-masked]>
Date: Thu, 30 Jul 2009 23:26:52 +1000

> are related to PIC, which we need anyway due to our hardened toolchain.

It seems CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe" makes gcc use
-fPIC by default (this is from an ncurses attempt)...

gcc -I../test -I. -DHAVE_CONFIG_H -I. -I../include -march=x86-64 -mtune=generic -O2 -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64  -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe  --param max-inline-insns-single=1200  -fPIC -c ../test/background.c -o ../obj_s/background.o

>> arm8 and possibly ppc (ps3) eventually. 
> 
> Those would probably require cross-compiling.

To bootstrap, sure, but I'm hoping the Beagleboard, with external USB
HDD, will be powerful enough to build packages natively.

> I think its possible but it will probably require some redesign of
> abuild and extra things to consider in APKBUILDs.

One way to find out :)

>> I have a Beagelboard begging for some TLC.

"tender loving care". I've had the beagelboard for a couple of weeks
but I haven't even plugged it in yet. http://beagleboard.org/hardware

> compile in qemu? Native compile in qemu might work but is slow.

Best answerred by...

http://www.archmobile.org/trac/wiki/AFR/BuildEnvironment
http://bbs.archlinux.org/viewtopic.php?pid=587134#p587134

> Btw, i use vserver for my development of x86. Its like an advanced

I should look into it. chroot is simple and native speed.

--markc

---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 30 Jul 2009 14:49:46 +0200

...

> Sorry about the rush of newbie questions and many thanks for the

btw... you are welcome to join #alpine-linux and #alpine-devel on
freenode.

-nc

---

---

From: Timo Teräs <[email-masked]>
Date: Thu, 30 Jul 2009 14:26:37 +0300

> I have a Beagelboard begging for some TLC.

This is a good question. Alpine is currently x86 only, but we will
soon need it on x86_64. I think ncopa has been thinking this to some
degree, but has been busy on implementing/fixing other things.

If you have experience on multi-arch stuff, input here will be
greatly appreciated.

Thanks,
  Timo

---