You are not logged in.

#1 2021-02-10 13:06:45

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 80

Replacements for aarch64-linux-gnu-*

I've created a set of PKGBUILDs uploaded to AUR that are meant to replace the current aarch64-linux-gnu-{binutils,linux-api-headers,gcc,glibc}.
I've renamed them so that they don't conflict with the existing ones, and the $_target is set to the same name as what ./config.guess (from binutils) on Arch Linux ARM to match them. The changes include using sysroot right, removed old and deprecated configure options, and matching the configure options with the native ones as much as possible.
The maintainers have been notified by email, but I haven't heard anything from them (yet)

Comments are very welcome!

Offline

#3 2021-02-11 08:25:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,211

Re: Replacements for aarch64-linux-gnu-*

Not an Arch discussion, moving to AUR Issues/Discussion

Offline

#4 2021-02-11 11:40:01

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,206
Website

Re: Replacements for aarch64-linux-gnu-*

I have only ever cross-compiled using distcc and the respective toolchains (armv7h, or aarch64, etc).

Goal: produce armv7h or aarch64 packages from PKGBUILDs using x86_64 to speed up compilation.
Distcc volunteer = x86_64 with ArchARM toolchains for example.
Distcc host = Raspberry Pi4 running aarch64 or armv7h.

What goals can be achieved with these packages?  Can I build aarch64 from Arch ARM PKGBUILDs on x86_64?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2021-02-11 11:43:44

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 80

Re: Replacements for aarch64-linux-gnu-*

Yes, they can. Or at least for aarch64. That's was my motivation for this. Arch Linux already have a aarch64 toolchain, and it works somewhat, these packages are meant to replace them.

Offline

#6 2021-02-11 12:57:22

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 80

Re: Replacements for aarch64-linux-gnu-*

Offline

#7 2021-02-11 14:14:15

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,206
Website

Re: Replacements for aarch64-linux-gnu-*

Link to instructions/guide?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2021-02-11 14:23:24

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 80

Re: Replacements for aarch64-linux-gnu-*

On what? How to build them or how to make symlinks?

Offline

#9 2021-02-11 21:03:48

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,206
Website

Re: Replacements for aarch64-linux-gnu-*

How to use the packages to compile an aarch64 PKGBUILD on a Arch x86_64 machine.  For example, I'd like to build linux-rasbperrypi4 entirely on my x86_64 box.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2021-02-11 21:08:24

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 80

Re: Replacements for aarch64-linux-gnu-*

Not sure how that works, but you /should/ be able to set CC to "distcc armv7l-unknown-linux-gnueabihf-gcc" during make in your PKGBUILD.

Offline

#11 2021-02-11 21:15:30

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,206
Website

Re: Replacements for aarch64-linux-gnu-*

Is this just a toolchain for x86_64 meant to be used as a distcc volunteer?  If so, as I posted in the Arch ARM forums, the recommended method to use an x86_64 machine as a distcc volunteer, is to put Arch ARM's official toolchain on your x86_64 box.  The distcc host is your Arch ARM box (all flavors supported).  Recommend you install these with distccd-arch-arm available in the AUR.

I was thinking that you could use these or the aarch64 packages in [community] to some how build natively on x86_64 yet produce aarch64 code without the need to use distcc.

Last edited by graysky (2021-02-11 21:16:42)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#12 2021-02-11 21:29:34

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 80

Re: Replacements for aarch64-linux-gnu-*

Both ways should work, as long as you somehow change CC (and CXX where applicable)
Cross compiling (without distcc) the kernel requires some extra options.

CARCH=armv7h ARCH=arm CROSS_COMPILE=armv7l-unknown-linux-gnueabihf- makepkg -A

This seems to work on linux-raspberrypi4 from ALARMs github. (I guess that is yours)

Offline

#13 2021-02-12 10:23:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,206
Website

Re: Replacements for aarch64-linux-gnu-*

Are you executing the above on your x86_64 box or on your arm7h box?  If it is the x86_64 box, how does this handle dependencies?  For example, if there are armv7h or aarch64 packages that are needed for the build?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#14 2021-02-12 10:28:26

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 80

Re: Replacements for aarch64-linux-gnu-*

Since the main reason for creating them was to be used for distcc, I don't have any extra libraries installed into the sysroot. In that case, they need to be packaged as well.
But for stuff like the kernel and other low-level things, this should suffice.
The above command was run on my fast x86_64 box. The package was copied over to my Pi, and installed. Worked flawlessly smile

Offline

Board footer

Powered by FluxBB