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 3E0795C41B0 for ; Thu, 21 Jul 2016 23:14:51 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1469142883; 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=3261; bh=oiN3rJ0/ggOOr8KszNxCTOXMClWfRYB5dVSiaicpPdk=; b=L/jAmVNgfiPL2Apm9LsKLz40M1oGgpt6SN9vcHhimU+mRMFborvuo5iPrZUYr9Pt b8LWBU1c31cAhCjL9rF9MvjaLbjRDXQ8dogg4YchIH2oZm1qwiB5Gmv1JAHfvqW/tqI H3FKsLbramSwC2kqK3QY5eYVigaCfh1s2nxdGptE= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 146914288299281.45343522801761; Thu, 21 Jul 2016 16:14:42 -0700 (PDT) Date: Fri, 22 Jul 2016 06:14:42 +0700 From: "Tuan M. Hoang" To: "Timo Teras" Cc: "alpine-devel" Message-ID: <1560fbd5a78.dbf5aa7b48820.4632348656468847927@flatglobe.org> In-Reply-To: <20160718084038.23773fca@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> 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 Mon, 18 Jul 2016 12:40:38 +0700 Timo Teras wrote ---- > Usually it is configured in /etc/abuild.conf, and that's what my > scripts expect. E.g. my abuild-crossbuild-armv7.conf has: > # inherit CBUILD, and other basic defines > source /etc/abuild.conf > > It expects CBUILD= to be in /etc/abuild.conf. > > This is also used by abuild to deduce if cross building or not, and > probably caused the problem #1 too. > Problem 1 : (to keeptrack easier) This is the content of my /etc/abuild.conf : http://pastebin.com/Pq6vYpvD So strange that there is no trace of CBUILD variable, even CARCH, CTARGET_ARCH. I keep getting CARCH=unknown error. Then I made some modification as in : https://github.com/tmh1999/alpine-bootstrap-s390x/commit/2aadde7982a9ba679bd01734705321d9dde76d97 AFAIK, CARCH is the build machine architecture (x86_64) and you get it by running $ abuild -A. But in my modification, it is armv7. > We managed to bootstrap aarch64 recently. We have it running on qemu > and on real hw too. I believe when it comes up, it could be used for > aarch64 and possibly armv7 builds. Sounds great ! Question 1 : Until now, I also have successfully built a cross-compiler targeting s390x architecture, with above modification to the script and few more modification in aports/main/gcc/APKBUILD and aports/main/musl/APKBUILD files ( I use the experimental s390x port of musl ). I know this is not your problem but I would like to ask you since you are more experienced in this problem than me :) This is the modification I made to aports/main/gcc/APKBUILD file : --- a/main/gcc/APKBUILD +++ b/main/gcc/APKBUILD @@ -392,7 +427,9 @@ libatomic() { mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libatomic.so.* "$subpkgdir"/usr/lib/ || \ cp -a "$pkgdir"/usr/$CTARGET/lib/libatomic.so.* "$subpkgdir"/usr/lib/ || \ + cp -a "$pkgdir"/usr/$CTARGET/lib64/libatomic.so.* "$subpkgdir"/usr/lib/ || \ return 1 } libcxx() { @@ -403,7 +440,9 @@ libcxx() { mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libstdc++.so.* "$subpkgdir"/usr/lib/ || \ cp -a "$pkgdir"/usr/$CTARGET/lib/libstdc++.so.* "$subpkgdir"/usr/lib/ || \ + cp -a "$pkgdir"/usr/$CTARGET/lib64/libstdc++.so.* "$subpkgdir"/usr/lib/ || \ return 1 } gpp() { @@ -452,7 +491,9 @@ libgcc() { mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgcc_s.so.* "$subpkgdir"/usr/lib/ || \ cp -a "$pkgdir"/usr/$CTARGET/lib/libgcc_s.so.* "$subpkgdir"/usr/lib/ || \ + cp -a "$pkgdir"/usr/$CTARGET/lib64/libgcc_s.so.* "$subpkgdir"/usr/lib/ || \ return 1 } >From what I understand, when we --disable-multilib when configuring gcc, lib/ and lib64/ wouldn't be existed at the same time. But in my case they are all there and the *.so files are in lib64/ directory. This workaround helps the creatcross-toolchain.sh but when running crossbuild-toolchain.sh I faced a lot of failures from this lib/, lib64/ thing and the 'unknown' described above. What do you think ? 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 :( Thank you. --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---