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
|
# manual strip because ipa .sign files depend on the file contents- have to re-sign after strip
|
||||||
options="!strip !check"
|
options="!strip !check"
|
||||||
# fp6-img: this package only ever runs on the FP6 (4x Cortex-A520 + 4x
|
# 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
|
# Cortex-A720), so build for it. armv8.6-a is the highest level whose
|
||||||
# expands -mcpu=cortex-a720 into a +sve-bitperm token that binutils 2.45
|
# mandatory set the phone exposes (8.7 would assume WFxT, 9.x SVE2; neither
|
||||||
# rejects at the assembler. +nosve+nomemtag: the FP6 exposes neither SVE nor
|
# is in its hwcaps); +fp16fml+aes+sha3+sm4 are the optional extensions it
|
||||||
# MTE (no sve/mte hwcaps), and without them the code would SIGILL.
|
# has, the same set `gcc -march=native` derives on the phone. One spelling
|
||||||
export CFLAGS="$CFLAGS -march=armv9.2-a+nosve+nomemtag -mtune=cortex-a720"
|
# for gcc and clang, and the same string the kernel aport uses.
|
||||||
export CXXFLAGS="$CXXFLAGS -march=armv9.2-a+nosve+nomemtag -mtune=cortex-a720"
|
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
|
case "$CARCH" in
|
||||||
arm*|aarch64)
|
arm*|aarch64)
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,12 @@ makedepends="
|
||||||
# failure), same as modemmanager; build under plain qemu.
|
# failure), same as modemmanager; build under plain qemu.
|
||||||
options="!pmb:crossdirect"
|
options="!pmb:crossdirect"
|
||||||
# fp6-img: this package only ever runs on the FP6 (4x Cortex-A520 + 4x
|
# 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
|
# Cortex-A720), so build for it. armv8.6-a is the highest level whose
|
||||||
# expands -mcpu=cortex-a720 into a +sve-bitperm token that binutils 2.45
|
# mandatory set the phone exposes (8.7 would assume WFxT, 9.x SVE2; neither
|
||||||
# rejects at the assembler. +nosve+nomemtag: the FP6 exposes neither SVE nor
|
# is in its hwcaps); +fp16fml+aes+sha3+sm4 are the optional extensions it
|
||||||
# MTE (no sve/mte hwcaps), and without them the code would SIGILL.
|
# has, the same set `gcc -march=native` derives on the phone. One spelling
|
||||||
export CFLAGS="$CFLAGS -march=armv9.2-a+nosve+nomemtag -mtune=cortex-a720"
|
# 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"
|
||||||
subpackages="
|
subpackages="
|
||||||
$pkgname-dev
|
$pkgname-dev
|
||||||
$pkgname-doc
|
$pkgname-doc
|
||||||
|
|
|
||||||
|
|
@ -43,11 +43,12 @@ checkdepends="glib-dev py3-gobject3 py3-dbus"
|
||||||
# on-device validation is the real test.
|
# on-device validation is the real test.
|
||||||
options="!pmb:crossdirect !check"
|
options="!pmb:crossdirect !check"
|
||||||
# fp6-img: this package only ever runs on the FP6 (4x Cortex-A520 + 4x
|
# 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
|
# Cortex-A720), so build for it. armv8.6-a is the highest level whose
|
||||||
# expands -mcpu=cortex-a720 into a +sve-bitperm token that binutils 2.45
|
# mandatory set the phone exposes (8.7 would assume WFxT, 9.x SVE2; neither
|
||||||
# rejects at the assembler. +nosve+nomemtag: the FP6 exposes neither SVE nor
|
# is in its hwcaps); +fp16fml+aes+sha3+sm4 are the optional extensions it
|
||||||
# MTE (no sve/mte hwcaps), and without them the code would SIGILL.
|
# has, the same set `gcc -march=native` derives on the phone. One spelling
|
||||||
export CFLAGS="$CFLAGS -march=armv9.2-a+nosve+nomemtag -mtune=cortex-a720"
|
# 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"
|
||||||
subpackages="
|
subpackages="
|
||||||
$pkgname-lang
|
$pkgname-lang
|
||||||
$pkgname-doc
|
$pkgname-doc
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue