X-Original-To: alpine-devel@lists.alpinelinux.org Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) by lists.alpinelinux.org (Postfix) with ESMTP id 7E6775C41CC for ; Fri, 22 Jul 2016 22:44:03 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1469227430; s=default; d=flatglobe.org; i=tmhoang@flatglobe.org; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; l=3647; bh=t/Fgggrw8y0osBD8ml1cj2qnSqhHgUvc0L52MdycDGM=; b=AS7ia2GO2l1Jt2/VsDEP3pa/PtxePC51p78h85gWlQ22nHBe/6+DzZ5lmPDVjSbh 3d5o8MwxEQxRWwfo5UNSlSKT/nkWsAKF4XadxENWHCzrmgDKyjvfYi1SzdJZznwAcyU hbnnJnbPgP1IoJLJc/YeBlEfzCSr50UJWcT1RBaw= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1469227429965271.69168655320254; Fri, 22 Jul 2016 15:43:49 -0700 (PDT) Date: Sat, 23 Jul 2016 05:43:49 +0700 From: "Tuan M. Hoang" To: "Timo Teras" Cc: "alpine-devel" Message-ID: <15614c77014.1200f0e697958.371787825394349914@flatglobe.org> In-Reply-To: <20160722084514.7c01123f@vostro.util.wtbts.net> References: <155a8e57d76.f37920c130996.6728092923369604578@flatglobe.org> <20160703225319.0ce46f62@vostro> <155b28d7dfa.ca28fe6d67425.5841089419777612642@flatglobe.org> <20160705172656.788ec089@vostro.util.wtbts.net> <20160706172836.74bab5d1@vostro> <155e6497a8e.11ad265cf269464.7355344611305011615@flatglobe.org> <155f440c618.129c9f0aa5155.5728200182511575692@flatglobe.org> <20160718084038.23773fca@vostro.util.wtbts.net> <1560fbd5a78.dbf5aa7b48820.4632348656468847927@flatglobe.org> <20160722084514.7c01123f@vostro.util.wtbts.net> Subject: Re: [alpine-devel] Porting Alpine scripts X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail ---- On Fri, 22 Jul 2016 12:45:14 +0700 Timo Teras 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: > http://git.alpinelinux.org/cgit/abuild/commit/?id=580dd46c588ef71bc852d2b9a5bb4426a2c47665 > 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: > http://git.alpinelinux.org/cgit/aports/tree/main/gcc/gcc-pure64.patch > > 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) > http://git.alpinelinux.org/cgit/abuild/commit/?id=580dd46c588ef71bc852d2b9a5bb4426a2c47665 > > - apk-tools to use the same arch name > http://git.alpinelinux.org/cgit/apk-tools/commit/?id=06ae5fdfdccd0c8e6d5501d93666bd915d2604d1 > > - gcc to be configured correct for the arch > http://git.alpinelinux.org/cgit/aports/commit/main/gcc?id=db1d2c069e66b3bf9962d76b0b48bfdcfc8d0384 > (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 > http://git.alpinelinux.org/cgit/aports/commit/?id=f483f49692b97950b680d987fe31f8ddb9277842 > > - openssl > http://git.alpinelinux.org/cgit/aports/commit/?id=896f06e3b0b07200957d0389e2156d0ee4e099cb > > - linux-vanilla (or the kernel you need, including creating kernel configuration) > http://git.alpinelinux.org/cgit/aports/commit/?id=baa04a75170112f9713dd5ad72a5732f9bfaeaac > > 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. Hoang > Cheers, > Timo > > > --- > Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org > Help: alpine-devel+help@lists.alpinelinux.org > --- > > --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---