Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 6304E781104 for <~alpine/devel@lists.alpinelinux.org>; Wed, 16 Feb 2022 19:09:49 +0000 (UTC) Received: (Authenticated sender: contact@markand.fr) by mail.gandi.net (Postfix) with ESMTPSA id AEF5AFF802 for <~alpine/devel@lists.alpinelinux.org>; Wed, 16 Feb 2022 19:09:48 +0000 (UTC) Received: by postfix.malikania.fr (Postfix) with ESMTPSA id 9A5CE120C5 for <~alpine/devel@lists.alpinelinux.org>; Wed, 16 Feb 2022 20:09:47 +0100 (CET) From: David Demelier Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Subject: Re: Availability of cross toolchains in aports Date: Wed, 16 Feb 2022 20:09:47 +0100 References: To: ~alpine/devel@lists.alpinelinux.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3693.40.0.1.81) > On 16 Feb 2022, at 11:27, Drew DeVault wrote: >=20 > I think that we should have a greater variety of cross compiler > toolchains available in aports, providing in reach repo at least = enough > cross-compilers to build Alpine for any target supported by a stable > Alpine release. >=20 > Thoughts? clang is by itself a cross-compiler. basically one can setup an = environment by grabbing a minirootfs and extract alpine packages itself = and then using appropriate command line options you=E2=80=99re pretty = much done: clang --sysroot=3D/alpine-aarch64 -target alpine-aarch64-linux-musl = -fuse-ld=3Dlld test.c -o test boum, test is aarch64 executable. Nothing more, nothing less. That said cross-compiling is still pretty much utopia. Some packages = build executables that they run during the build process, having to = specify a host compiler and a target compiler which many build system = don=E2=80=99t support. Not mentioning that many software just don=E2=80=99= t care. I don=E2=80=99t think spending effort on this is any useful. =E2=80=94=20 David=