View previous topic :: View next topic |
Author |
Message |
dxwil n00b
Joined: 05 Aug 2024 Posts: 7
|
Posted: Tue Aug 06, 2024 1:11 pm Post subject: Chromium doesn't compile because of the lack of sve support |
|
|
I am trying to compile chromium on the M1 arm64 chip, which according to Google supports neon but not sve. Chromium is giving me error that target needs sve support, how can I compile chromium without it?
Code: |
Portage 3.0.65 (python 3.12.4-final-0, default/linux/arm64/23.0/desktop, gcc-13, glibc-2.40, 6.9.12-p1-asahi-dist aarch64)
=================================================================
System Settings
=================================================================
System uname: Linux-6.9.12-p1-asahi-dist-aarch64-with-glibc2.40
KiB Mem: 7710720 total, 1402576 free
KiB Swap: 16777200 total, 16684016 free
Timestamp of repository gentoo: Mon, 05 Aug 2024 13:00:00 +0000
Head commit of repository gentoo: 5405c6e53400be10d3d93528859f361469b0db64
Timestamp of repository asahi: Sun, 04 Aug 2024 07:50:57 +0000
Head commit of repository asahi: 5cc2fc136c597d8f5a3bf9849a4f0ddd86ef2ca4
Timestamp of repository electron: Tue, 23 Jul 2024 14:19:07 +0000
Head commit of repository electron: 19e5bdfb27ec106439519913305228f36df08b60
Timestamp of repository guru: Mon, 05 Aug 2024 11:06:26 +0000
Head commit of repository guru: 9c612d95e55402ec6d1b87cf2041f34b0ffc9044
Timestamp of repository librewolf: Mon, 05 Aug 2024 05:34:33 +0000
Head commit of repository librewolf: e580229c093578febd817b163af2b1489656a0fd
Timestamp of repository wayland-desktop: Sun, 28 Jul 2024 17:03:54 +0000
Head commit of repository wayland-desktop: a3b24dd585c5c4ba4b22e3249413b946bfb08628
sh bash 5.2_p26-r6
ld GNU ld (Gentoo 2.42 p6) 2.42.0
app-misc/pax-utils: 1.3.7::gentoo
app-shells/bash: 5.2_p26-r6::gentoo
dev-build/autoconf: 2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake: 1.16.5-r2::gentoo
dev-build/cmake: 3.28.5::gentoo
dev-build/libtool: 2.4.7-r4::gentoo
dev-build/make: 4.4.1-r1::gentoo
dev-build/meson: 1.4.1::gentoo
dev-lang/perl: 5.38.2-r3::gentoo
dev-lang/python: 3.11.9_p1::gentoo, 3.12.4_p3::gentoo
dev-lang/rust-bin: 1.79.0::gentoo
sys-apps/baselayout: 2.15::gentoo
sys-apps/openrc: 0.54.2::gentoo
sys-apps/sandbox: 2.38::gentoo
sys-devel/binutils: 2.42-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang: 18.1.8::gentoo
sys-devel/gcc: 13.3.1_p20240614::gentoo
sys-devel/gcc-config: 2.11::gentoo
sys-devel/lld: 18.1.8::gentoo
sys-devel/llvm: 18.1.8-r1::gentoo
sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.40::gentoo
Repositories:
gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
volatile: False
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-max-age: 3
sync-rsync-verify-jobs: 1
sync-rsync-extra-opts:
asahi
location: /var/db/repos/asahi
sync-type: git
sync-uri: https://github.com/gentoo-mirror/asahi.git
masters: gentoo
volatile: False
electron
location: /var/db/repos/electron
sync-type: git
sync-uri: https://github.com/gentoo-mirror/electron.git
masters: gentoo
volatile: False
guru
location: /var/db/repos/guru
sync-type: git
sync-uri: https://github.com/gentoo-mirror/guru.git
masters: gentoo
volatile: False
librewolf
location: /var/db/repos/librewolf
sync-type: git
sync-uri: https://github.com/gentoo-mirror/librewolf.git
masters: gentoo
volatile: False
wayland-desktop
location: /var/db/repos/wayland-desktop
sync-type: git
sync-uri: https://github.com/gentoo-mirror/wayland-desktop.git
masters: gentoo
volatile: False
Binary Repositories:
gentoobinhost
priority: 1
sync-uri: https://distfiles.gentoo.org/releases/arm64/binpackages/23.0/arm64
ACCEPT_KEYWORDS="arm64"
ACCEPT_LICENSE="@FREE"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-march=armv8.5-a+fp16+simd+crypto+i8mm -mtune=native -O2 -pipe"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-march=armv8.5-a+fp16+simd+crypto+i8mm -mtune=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--ask --jobs=3 --load-average=7"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=armv8.5-a+fp16+simd+crypto+i8mm -mtune=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=armv8.5-a+fp16+simd+crypto+i8mm -mtune=native -O2 -pipe"
GENTOO_MIRRORS="https://ftp.fau.de/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j7 -l7"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RUSTFLAGS="-C target-cpu=native"
SHELL="/bin/bash"
USE="X aac acl acpi alsa arm64 bluetooth branding bzip2 cairo crypt cups dbus dri elogind encode exif gdbm gif gtk gui iconv icu ipv6 jpeg kf6compat lcms libnotify libtirpc mad mng mp3 mp4 mpeg ncurses nls ogg opengl openmp pam pango pcre pdf png policykit ppds qt5 readline sdl seccomp sound spell ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wayland wxwidgets x264 xattr xcb xft xml xv xvid zlib zstd" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="aes asimddp crc32 edsp sha1 sha2 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="asahi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
[ebuild N ] www-client/chromium-127.0.6533.88 USE="cups hangouts official proprietary-codecs pulseaudio qt5 screencast system-harfbuzz system-icu system-png (system-toolchain) system-zstd vaapi wayland -X -bindist -custom-cflags -debug -ffmpeg-chromium -gtk4 (-headless) -kerberos -pax-kernel (-pgo) -qt6 (-selinux) (-widevine)" L10N="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv sw ta te th tr uk ur vi zh-CN zh-TW"
|
Build log:
https://0x0.st/XVBC.log |
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 324 Location: Somewhere in the 77
|
Posted: Thu Aug 08, 2024 9:55 am Post subject: |
|
|
Hello,
After some googling, the most relevant link is… this topic, fat luck. I did not spotted a bug either here, as the wiki page of Chromium (from gentoo) isn't providing much useful info about that.
First thing, I never used Gentoo on ARM64 system, but maybe you could try this : Not a single modification of the use flag, just try to build it as it is (if you did not tried yet). Maybe one of your USE flag is making a mess ? At this point sadly it's guessing :/.
Sadly there is no chromium-bin to test if it's possible to get this build working on your architecture.
Maybe you could also try to follow the Chromium compilation guide instead of using emerge. If it works with the Google instruction, it could mean the problem is on Gentoo side (misconfigured ebuild ? bugs ?).
Hope you find your fix.
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
dxwil n00b
Joined: 05 Aug 2024 Posts: 7
|
Posted: Thu Aug 08, 2024 10:19 am Post subject: |
|
|
Yeah I'll try compiling with the default use flags, that's a good idea. The official build instructions lists x86_64 as a requirement so there is no guide for arm. I've also reported a chromium bug here: https://issues.chromium.org/issues/357889510 |
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 324 Location: Somewhere in the 77
|
Posted: Thu Aug 08, 2024 10:26 am Post subject: |
|
|
dxwil wrote: | Yeah I'll try compiling with the default use flags, that's a good idea. The official build instructions lists x86_64 as a requirement so there is no guide for arm. I've also reported a chromium bug here: https://issues.chromium.org/issues/357889510 |
When you can't find what's not working, try the default path is mostly a good idea, yes !
Get us in touch if you manage to find or report a problem that might other on Gentoo or ARM system to get it working !
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
dxwil n00b
Joined: 05 Aug 2024 Posts: 7
|
Posted: Thu Aug 08, 2024 6:15 pm Post subject: |
|
|
Tried with the default use flags, but the results is unfortunately still the same |
|
Back to top |
|
|
zerdox n00b
Joined: 11 Sep 2023 Posts: 5
|
Posted: Sat Dec 07, 2024 6:27 pm Post subject: |
|
|
I see from your logs that it's coming from libvpx. I have it installed on my M1. And I also can't build chromium, though, my build fails even earlier and for different reason.
Maybe we could system-libvpx somehow, probably it will require lots of work if it's even possible. I will investigate further and will try to compile chromium other ways as it's blocking for me. Latest I could build is 116, not tried 117 and further, but current available versions are broken for all M1 I guess _________________ 0x396D2C5E84820BD6 |
|
Back to top |
|
|
zerdox n00b
Joined: 11 Sep 2023 Posts: 5
|
Posted: Sun Dec 08, 2024 7:27 am Post subject: |
|
|
ok now i see that third_party/libyuv/source/rotate_sme fails for me. same reason
Code: | error: function executed in streaming-SVE mode requires 'sme' |
_________________ 0x396D2C5E84820BD6 |
|
Back to top |
|
|
dE_logics Advocate
Joined: 02 Jan 2009 Posts: 2289 Location: $TERM
|
Posted: Thu Dec 12, 2024 9:31 am Post subject: |
|
|
/proc/cpuinfo has sve? If not, then qemu softemu compiling on a powerful x86 machine may help, but the build binaries may results in 'invalid opcode'. _________________ My blog |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54799 Location: 56N 3W
|
Posted: Thu Dec 12, 2024 11:37 am Post subject: |
|
|
Try changing -march to -mcpu.
Do not use -march at all. -mtune=native should be harmless but being old and synical, I would remove that.
I don't know that this is your problem but I've seen a chromium build on a Pi4 go wrong when -march was used.
I tried to reproduce the bug but I've always used -mcpu on arm64 and it failed to fail. :)
The build time was 3d 12h. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54799 Location: 56N 3W
|
Posted: Thu Dec 12, 2024 11:58 am Post subject: |
|
|
Moved from Multimedia to Gentoo on ARM.
An M1 is one of these. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
M1buKy0sh1r0 n00b
Joined: 29 Jan 2025 Posts: 6 Location: GER
|
Posted: Wed Jan 29, 2025 12:36 pm Post subject: |
|
|
Same here, cannot compile chromium on M1 arm64.
I identified some variables to set for the third_party lubyuv sources:
LIBYUV_DISABLE_SVE=1
LIBYUV_DISABLE_SVE2=1
LIBYUV_DISABLE_SME=1
https://chromium.googlesource.com/libyuv/libyuv/+/refs/heads/main/docs/environment_variables.md
But howto pass these variables to the emerge process?
Tried directly:
Code: | LIBYUV_DISABLE_SVE=1 LIBYUV_DISABLE_SVE2=1 LIBYUV_DISABLE_SME=1 emerge chromium |
and with export:
Code: | export LIBYUV_DISABLE_SVE=1; export LIBYUV_DISABLE_SVE2=1; export LIBYUV_DISABLE_SME=1; emerge chromium |
This didn´t work either. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54799 Location: 56N 3W
|
Posted: Wed Jan 29, 2025 5:54 pm Post subject: |
|
|
M1buKy0sh1r0,
You can try EXTRA_ECONFIG="..." but not all build systems honour it.
It can be set on a per package basis. in /etc/portage/...
All those flags are amd64 only. Have you tried using -mcpu in place of -march?
Some build systems think that they know better than -march and enable amd64 features on arm64. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
M1buKy0sh1r0 n00b
Joined: 29 Jan 2025 Posts: 6 Location: GER
|
Posted: Wed Jan 29, 2025 6:53 pm Post subject: |
|
|
Thx NeddySeagoon,
I tried, but then emerge fails instantly because it cannot handle -mcpu with the parameters of -march. But, maybe I missunderstood, so it's likely my mistake.
Currently, I try to build the package by removing the if clauses where the SVE and SME directions will be handled. I was able to skip libyuv errors, but ran into libaom error then:
Code: | In file included from ../../third_party/libaom/source/libaom/av1/encoder/arm/av1_error_sve.c:19:
../../third_party/libaom/source/libaom/aom_dsp/arm/aom_neon_sve_bridge.h:31:10: error: SVE vector type 'svuint64_t' (aka '__SVUint64_t') cannot be used in a target without sve
31 | return svget_neonq_u64(svdot_u64(svset_neonq_u64(svundef_u64(), acc), |
So disabling SVE, SME in general would be my favorite.
The EXTRA_ECONFIG option is also worth a try. But I this does not look like adding those environment vars rather specifying compiler options instead.
But I did not yet find the correct options therefor.[/code] _________________ -
"If it moves compile it" |
|
Back to top |
|
|
M1buKy0sh1r0 n00b
Joined: 29 Jan 2025 Posts: 6 Location: GER
|
Posted: Wed Jan 29, 2025 7:21 pm Post subject: |
|
|
Found related upstream issue:
https://issues.chromium.org/issues/357889510
As of my understanding the cpu detection and resulting feature selection has to be modified to fix the issue. _________________ -
"If it moves compile it" |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54799 Location: 56N 3W
|
Posted: Wed Jan 29, 2025 7:35 pm Post subject: |
|
|
M1buKy0sh1r0,
What does resolve-march-native tell about your CPU ?
On a Pi5 I get Code: | Pi5-LVM /usr/src/rpi-6.12.y # resolve-march-native
-mcpu=cortex-a76+crc+crypto |
Likewise cpuid2cpuflags Code: | Pi5-LVM /usr/src/rpi-6.12.y # cpuid2cpuflags
CPU_FLAGS_ARM: edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 aes sha1 sha2 crc32 asimddp v4 v5 v6 v7 v8 thumb2 |
I'm trying chromium now. (On a Pi5). It takes 24 hours so I don't do it often.
== edit ==
I've found a build log for chromium-132.0.6834.83 it fails for
Code: | ld.lld: error: undefined symbol: __arm_tpidr2_save |
The log is huge. Code: | Pi5-LVM /var/tmp/portage/www-client/chromium-132.0.6834.83 # ls temp/ -lh
total 199M
-rw-rw---- 1 portage portage 198M Jan 20 02:46 build.log |
I can host it if you want to see it. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
M1buKy0sh1r0 n00b
Joined: 29 Jan 2025 Posts: 6 Location: GER
|
Posted: Thu Jan 30, 2025 3:39 pm Post subject: |
|
|
Hi NeddySeagoon,
here some more details;
resolve-march-native gives:
Code: |
ERROR: No entry -m(arch|cpu)=.. found in: -foffload-options=-fno-stack-protector -mabi=lp64 -march= -mbranch-protection= -mcmodel=small -mcpu= -mearly-ldp-fusion -mearly-ra=none -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 -mglibc -mharden-sls= -mlate-ldp-fusion -mlittle-endian -mno-big-endian -mno-bionic -mno-general-regs-only -mno-low-precision-div -mno-low-precision-recip-sqrt -mno-low-precision-sqrt -mno-musl -mno-strict-align -mno-track-speculation -mno-uclibc -mno-verbose-cost-dump -momit-leaf-frame-pointer -moutline-atomics -moverride= -mpc-relative-literal-loads -msign-return-address=none -mstack-protector-guard-offset= -mstack-protector-guard-reg= -mstack-protector-guard=global -msve-vector-bits=scalable -mtls-dialect=desc -mtls-size=24 -mtp=el0 -mtune= |
cpuid2cpuflags gives:
Code: | CPU_FLAGS_ARM: edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 aes sha1 sha2 crc32 asimddp v4 v5 v6 v7 v8 thumb2 |
make.conf flags:
Code: | COMMON_FLAGS="-march=armv8.5-a+fp16+simd+crypto+i8mm -mtune=native -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
RUSTFLAGS="-C target-cpu=native"
CHOST="aarch64-unknown-linux-gnu" |
tmp has currently cleaned up, so need another run to have a fresh build.log. But maybe the mcpu hint is useful. As you can see my output of resolve-march-native gives some errors about it. Never used it before, so worth a try.
Cheers _________________ -
"If it moves compile it" |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54799 Location: 56N 3W
|
Posted: Thu Jan 30, 2025 4:09 pm Post subject: |
|
|
M1buKy0sh1r0,
What version of resolve-march-native do you have?
3.0.0 was the first one that worked on arm64?
5.0.2 is current stable and 6.0.1 is testing.
Upgrade to the testing one.
File a bug if it still says Code: | ERROR: No entry -m(arch|cpu)= |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
M1buKy0sh1r0 n00b
Joined: 29 Jan 2025 Posts: 6 Location: GER
|
Posted: Thu Jan 30, 2025 5:34 pm Post subject: |
|
|
My version is:
Code: |
app-misc/resolve-march-native-5.1.0-r1
|
No other version available. _________________ -
"If it moves compile it" |
|
Back to top |
|
|
M1buKy0sh1r0 n00b
Joined: 29 Jan 2025 Posts: 6 Location: GER
|
Posted: Thu Jan 30, 2025 5:48 pm Post subject: |
|
|
So, looking for the correct settings I found this:
https://en.wikipedia.org/wiki/Apple_M1
I know, Wikipedia isn´t that reliable but it's somehow hard to find information which instruction set is correct.
So, if true, I may need to change:
Code: | COMMON_FLAGS="-march=armv8.5-a+fp16+simd+crypto+i8mm -mtune=native -O2 -pipe" |
to
Code: | COMMON_FLAGS="-march=armv8.4-a+fp16+simd+crypto+i8mm -mtune=native -O2 -pipe" |
Also, it's mentioned, the variant is "apple-a14". So trying to set:
But this fails always. _________________ -
"If it moves compile it" |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54799 Location: 56N 3W
|
Posted: Thu Jan 30, 2025 7:09 pm Post subject: |
|
|
M1buKy0sh1r0,
man gcc: | -mcpu=name
Specify the name of the target processor, optionally suffixed by one or more feature modifiers. This
option has the form -mcpu=cpu{+[no]feature}*, where the permissible values for cpu are the same as those
available for -mtune. The permissible values for feature are documented in the sub-section on
aarch64-feature-modifiers,,-march and -mcpu Feature Modifiers. Where conflicting feature modifiers are
specified, the right-most feature is used.
...
-mtune=name
Specify the name of the target processor for which GCC should tune the performance of the code.
Permissible values for this option are: generic, cortex-a35, cortex-a53, cortex-a55, cortex-a57,
cortex-a72, cortex-a73, cortex-a75, cortex-a76, cortex-a76ae, cortex-a77, cortex-a65, cortex-a65ae,
cortex-a34, cortex-a78, cortex-a78ae, cortex-a78c, ares, exynos-m1, emag, falkor, neoverse-512tvb,
neoverse-e1, neoverse-n1, neoverse-n2, neoverse-n3, neoverse-v1, neoverse-v2, neoverse-v3,
neoverse-v3ae, grace, qdf24xx, saphira, phecda, xgene1, vulcan, octeontx, octeontx81, octeontx83,
octeontx2, octeontx2t98, octeontx2t96 octeontx2t93, octeontx2f95, octeontx2f95n, octeontx2f95mm, a64fx,
fujitsu-monaka, thunderx, thunderxt88, thunderxt88p1, thunderxt81, tsv110, thunderxt83, thunderx2t99,
thunderx3t110, zeus, cortex-a57.cortex-a53, cortex-a72.cortex-a53, cortex-a73.cortex-a35,
cortex-a73.cortex-a53, cortex-a75.cortex-a55, cortex-a76.cortex-a55, cortex-r82, cortex-x1, cortex-x1c,
cortex-x2, cortex-x3, cortex-x4, cortex-x925, cortex-a510, cortex-a520, cortex-a710, cortex-a715,
cortex-a720, cortex-a725, ampere1, ampere1a, ampere1b, cobalt-100 and native.
The values cortex-a57.cortex-a53, cortex-a72.cortex-a53, cortex-a73.cortex-a35, cortex-a73.cortex-a53,
cortex-a75.cortex-a55, cortex-a76.cortex-a55 specify that GCC should tune for a big.LITTLE system.
The value neoverse-512tvb specifies that GCC should tune for Neoverse cores that (a) implement SVE and
(b) have a total vector bandwidth of 512 bits per cycle. In other words, the option tells GCC to tune
for Neoverse cores that can execute 4 128-bit Advanced SIMD arithmetic instructions a cycle and that can
execute an equivalent number of SVE arithmetic instructions per cycle (2 for 256-bit SVE, 4 for 128-bit
SVE). This is more general than tuning for a specific core like Neoverse V1 but is more specific than
the default tuning described below.
Additionally on native AArch64 GNU/Linux systems the value native tunes performance to the host system.
This option has no effect if the compiler is unable to recognize the processor of the host system.
Where none of -mtune=, -mcpu= or -march= are specified, the code is tuned to perform well across a range
of target processors.
This option cannot be suffixed by feature modifiers.
...
-march and -mcpu Feature Modifiers
Feature modifiers used with -march and -mcpu can be any of the following and their inverses nofeature:
crc Enable CRC extension. This is on by default for -march=armv8.1-a.
crypto
Enable Crypto extension. This also enables Advanced SIMD and floating-point instructions.
fp Enable floating-point instructions. This is on by default for all possible values for options -march
and -mcpu.
...
| and lots more.
Also
Code: | -march=name
Specify the name of the target architecture and, optionally, one or more feature modifiers. This option
has the form -march=arch{+[no]feature}*.
The table below summarizes the permissible values for arch and the features that they enable by default:
arch value : Architecture : Includes by default
armv8-a : Armv8-A : +fp, +simd
armv8.1-a : Armv8.1-A : armv8-a, +crc, +lse, +rdma
armv8.2-a : Armv8.2-A : armv8.1-a
armv8.3-a : Armv8.3-A : armv8.2-a, +pauth
armv8.4-a : Armv8.4-A : armv8.3-a, +flagm, +fp16fml, +dotprod
armv8.5-a : Armv8.5-A : armv8.4-a, +sb, +ssbs, +predres
armv8.6-a : Armv8.6-A : armv8.5-a, +bf16, +i8mm
armv8.7-a : Armv8.7-A : armv8.6-a, +ls64
armv8.8-a : Armv8.8-a : armv8.7-a, +mops
armv8.9-a : Armv8.9-a : armv8.8-a
armv9-a : Armv9-A : armv8.5-a, +sve, +sve2
armv9.1-a : Armv9.1-A : armv9-a, +bf16, +i8mm
armv9.2-a : Armv9.2-A : armv9.1-a, +ls64
armv9.3-a : Armv9.3-A : armv9.2-a, +mops
armv9.4-a : Armv9.4-A : armv9.3-a
armv8-r : Armv8-R : armv8-r
The value native is available on native AArch64 GNU/Linux and causes the compiler to pick the
architecture of the host system. This option has no effect if the compiler is unable to recognize the
architecture of the host system,
The permissible values for feature are listed in the sub-section on aarch64-feature-modifiers,,-march
and -mcpu Feature Modifiers. Where conflicting feature modifiers are specified, the right-most feature
is used.
GCC uses name to determine what kind of instructions it can emit when generating assembly code. If
-march is specified without either of -mtune or -mcpu also being specified, the code is tuned to perform
well across a range of target processors implementing the target architecture. |
Its not gcc making a mess of -march=native its the build system.
app-misc/resolve-march-native-5.1.0-r1 is the stable version but
Code: | $ eix app-misc/resolve-march-native
[I] app-misc/resolve-march-native
Available versions: 2.2.0^t (~)3.0.0-r1^t (~)4.1.0^t 5.0.2^t{tbz2} (~)5.1.0^t{tbz2} 5.1.0-r1^t{tbz2} (~)6.0.1^t{tbz2} {test PYTHON_TARGETS="python3_10 python3_11 python3_12 python3_13"}
Installed versions: 6.0.1^t{tbz2}(15:39:22 12/01/25)(-test PYTHON_TARGETS="python3_12 -python3_10 -python3_11 -python3_13")
Homepage: https://github.com/hartwork/resolve-march-native
Description: Resolve GCC flag -march=native |
(~)6.0.1 means that 6.0.1 is in testing.
Make a file called Code: | /etc/portage/package.accept_keywords/resolve-march-native |
Put Code: | # Enjoy testing resolve-march-native
app-misc/resolve-march-native | into the file.
The testing resolve-march-native should be available now. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|