libcamera, libqmi, modemmanager: build for the cores the phone has
Same string as the kernel commit, for the three compiled aports this image builds itself: -march=armv8.6-a+fp16fml+aes+sha3+sm4 -mtune=cortex-a720 appended to CFLAGS (and CXXFLAGS for libcamera). abuild builds these with Alpine's GCC; the string is gcc's own -march=native expansion on the phone re-based on armv8.6-a, and it assembles on GCC 15 with binutils 2.45.1 and on GCC 16 (whose -mcpu=cortex-a720 expansion binutils 2.45 rejects). On the phone itself gcc -flto, g++ and clang all compile, link and run it. The base stops at 8.6 on purpose: this phone exposes neither SVE nor MTE (userspace autovectorised for SVE2 would SIGILL), and not WFxT either. pkgrel bumps so apk upgrade delivers the rebuilt binaries.
This commit is contained in:
parent
27f923a817
commit
34c687d160
3 changed files with 19 additions and 16 deletions
|
|
@ -84,12 +84,13 @@ builddir="$srcdir/$pkgname-v$_pkgver"
|
|||
# manual strip because ipa .sign files depend on the file contents- have to re-sign after strip
|
||||
options="!strip !check"
|
||||
# fp6-img: this package only ever runs on the FP6 (4x Cortex-A520 + 4x
|
||||
# Cortex-A720), so tune for it. Spelled -march/-mtune, not -mcpu: GCC 16
|
||||
# expands -mcpu=cortex-a720 into a +sve-bitperm token that binutils 2.45
|
||||
# rejects at the assembler. +nosve+nomemtag: the FP6 exposes neither SVE nor
|
||||
# MTE (no sve/mte hwcaps), and without them the code would SIGILL.
|
||||
export CFLAGS="$CFLAGS -march=armv9.2-a+nosve+nomemtag -mtune=cortex-a720"
|
||||
export CXXFLAGS="$CXXFLAGS -march=armv9.2-a+nosve+nomemtag -mtune=cortex-a720"
|
||||
# Cortex-A720), so build for it. armv8.6-a is the highest level whose
|
||||
# mandatory set the phone exposes (8.7 would assume WFxT, 9.x SVE2; neither
|
||||
# is in its hwcaps); +fp16fml+aes+sha3+sm4 are the optional extensions it
|
||||
# has, the same set `gcc -march=native` derives on the phone. One spelling
|
||||
# for gcc and clang, and the same string the kernel aport uses.
|
||||
export CFLAGS="$CFLAGS -march=armv8.6-a+fp16fml+aes+sha3+sm4 -mtune=cortex-a720"
|
||||
export CXXFLAGS="$CXXFLAGS -march=armv8.6-a+fp16fml+aes+sha3+sm4 -mtune=cortex-a720"
|
||||
|
||||
case "$CARCH" in
|
||||
arm*|aarch64)
|
||||
|
|
|
|||
Loading…
Reference in a new issue