From owner-freebsd-arm@freebsd.org Fri Feb 10 16:20:29 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C1A9CD9A8B; Fri, 10 Feb 2017 16:20:29 +0000 (UTC) (envelope-from wolfgang.meyer@hob.de) Received: from hobex29.hob.de (hobex29.hob.de [212.185.199.32]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "HOBEX29", Issuer "HOBEX29" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C58DFFCC; Fri, 10 Feb 2017 16:20:27 +0000 (UTC) (envelope-from wolfgang.meyer@hob.de) Received: from HOBEX22.hob.de (172.22.1.22) by hobex29.hob.de (172.25.1.32) with Microsoft SMTP Server (TLS) id 14.2.347.0; Fri, 10 Feb 2017 17:18:53 +0100 Received: from HOBEX11.hob.de ([fe80::b99f:1c54:7122:49b4]) by HOBEX22.hob.de ([::1]) with mapi id 14.02.0387.000; Fri, 10 Feb 2017 17:19:13 +0100 From: "Meyer, Wolfgang" To: "Meyer, Wolfgang" , "'freebsd-arm@FreeBSD.org'" , "'freebsd-toolchain@FreeBSD.org'" Subject: RE: How to get a crosscompile toolchain for aarch64 for use in poudriere[?] Thread-Topic: How to get a crosscompile toolchain for aarch64 for use in poudriere[?] Thread-Index: AdKDrhWkwDVgm5wmQJOmHv89OT16WQACrmdQ Date: Fri, 10 Feb 2017 16:19:13 +0000 Message-ID: References: In-Reply-To: Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.24.71.140] old-x-esetresult: clean, is OK old-x-esetid: 46BD7B394506373217FE23 x-esetresult: clean, is OK x-esetid: 46BD7B394506373217FE23 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2017 16:20:29 -0000 > Hello, > > > To make the long story short, after comparing the verbose output of my > compiling in the jails with that of a direct crosscompile I found out tha= t it was > able to correctly link some object files when providing absolute paths to= the > crt*.o files and correct library search path for the libgcc_something lib= raries. > Which of course doesn't help when the linker is implicitly called by the > compiler. Further research showed that I could crosscompile/link when > providing the --sysroot=3D/ flag to overwrite the sysroot configuration f= rom the > build of the crosscompiler. Amending the lines > > CFLAGS+=3D--sysroot=3D/ > CPPFLAGS+=3D--sysroot=3D/ (Don't know if needed) > CXXFLAGS+=3D--sysroot=3D/ > LDFLAGS+=3D--sysroot=3D/ > > to my poudriere make.conf file I finally was able to produce a working cr= oss- > compiled package for aarch64 in poudriere. And the gains are quite signif= icant > (around 21 minutes for building pkg package with qemu-user emulation vs 5 > minutes using cross-compilation, native amd64 build in poudriere finishes= in > less than a minute). > > Still the creation of the cross-compiling toolchain seems to be quite > cumbersome. Hence advice on getting such a toolchain in a cleaner way > (ideally probably a working build for the xdev target) are greatly apprec= iated. > After building some more packages besides of pkg it seems, I am still not t= here yet. There is quite some fallout mainly during configure due to not ge= tting the right searchpath for the libraries. Maybe creating a symlink on t= he root directory at the path of the expected sysroot directory might heal = this. ________________________________ Follow HOB: - HOB: http://www.hob.de/redirect/hob.html - Xing: http://www.hob.de/redirect/xing.html - LinkedIn: http://www.hob.de/redirect/linkedin.html - HOBLink Mobile: http://www.hob.de/redirect/hoblinkmobile.html - Facebook: http://www.hob.de/redirect/facebook.html - Twitter: http://www.hob.de/redirect/twitter.html - YouTube: http://www.hob.de/redirect/youtube.html - E-Mail: http://www.hob.de/redirect/mail.html HOB GmbH & Co. KG Schwadermuehlstr. 3 D-90556 Cadolzburg Geschaeftsfuehrung: Klaus Brandstaetter, Zoran Adamovic AG Fuerth, HRA 5180 Steuer-Nr. 218/163/00107 USt-ID-Nr. DE 132747002 Komplementaerin HOB electronic Beteiligungs GmbH AG Fuerth, HRB 3416