Re: [alpine-devel] Porting Alpine scripts
---- On Fri, 22 Jul 2016 12:45:14 +0700 Timo Teras <timo.teras_at_iki.fi> wrote ----
> My scripts expect that you add CBUILD there. Though it's trivial to get
> it from $(gcc -dumpmachine), I think that should be added to abuild.
> I'll probably do that soon. I think most of the environment variables
> set the cross .conf files should in fact be set in abuild already. I'll
> look in to doing that as well.
For some commands, running without CBUILD being set is okay, some are not. I cannot remember which is which but If I see them again, I will tell you.
> Though, we are currently looking into improving the build system a bit
> more to support cross-building better, including supporting it directly
> from abuild command line and building things automatically in chroot.
> This needs a bit of design, but is on the way.
That's really good to know. I would like to help in that process, or try it out and give feedback.
> abuild will deduce CARCH from CHOST. You need to add s390x support to
> abuild. See commit:
This one is very helpful. I had to set CARCH to some commands around for a while even though I do *guess* it should be deduced from CHOST, by reading /usr/bin/abuild.
> The lib64 is gcc default, and on x86_64 and aarch64 it's similar. We
> patch the lib location for these architectures, see:
> You probably need to add similar change for gcc/config/s390/t-linux64.
Looks like gold to me. Progressing on it.
> > Question 2:
> > So when you started porting armv7 and aarch, which files in the
> > aports tree you had to make changes ? Theoretically I can check in
> > the git log but that would be a lot, I think :(
> Not too many. You probably need (aarch64 commit referred):
> - abuild to recognize the triplet (the commit refferred earlier)
> - apk-tools to use the same arch name
> - gcc to be configured correct for the arch
> (the ada change is generic, you'll need the _arch_configure +
> gcc-pure64.patch update)
> And update APKBUILDs for the packages that are arch aware; for
> minimal bootstrap it includes:
> - linux-headers
> - openssl
> - linux-vanilla (or the kernel you need, including creating kernel configuration)
> Some packages might also need other kind of patching, e.g. if configure
> does not recognize the new triplet.
It's much easier to have some existed work to follow. I have patched some APKBUILD myself along the way (gcc, musl, apk-tools, libfetch, openssl ...) and it is kind of painful, when you are new to Alpine. I will use your work and suggestion and come back after few days.
Thank you so much, Timo.
> Unsubscribe: alpine-devel+unsubscribe_at_lists.alpinelinux.org
> Help: alpine-devel+help_at_lists.alpinelinux.org
Received on Sat Jul 23 2016 - 05:43:49 UTC