]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
AArch64: Improve enabling of SVE for libmvec
authorWilco Dijkstra <wilco.dijkstra@arm.com>
Thu, 29 May 2025 15:08:15 +0000 (15:08 +0000)
committerWilco Dijkstra <wilco.dijkstra@arm.com>
Thu, 29 May 2025 16:58:49 +0000 (16:58 +0000)
When using a -mcpu option in CFLAGS, GCC can report errors when building libmvec.
Fix this by overriding both -mcpu and -march with a generic variant with SVE added.
Also use a tune for a modern SVE core.

Reviewed-by: Yury Khrustalev <yury.khrustalev@arm.com>
sysdeps/aarch64/fpu/Makefile

index 7b0ec3e9a94a7f83689c641bd5771ea2575a760b..9efbe1f78dad38bcea8f3fbf10f5b7079212d9a5 100644 (file)
@@ -56,8 +56,11 @@ libmvec-support = $(addsuffix f_advsimd,$(float-advsimd-funcs)) \
                   v_powf_data
 endif
 
-sve-cflags = -march=armv8-a+sve
+# Enable SVE for building libmvec.  Since CFLAGS may contain a -mcpu or -march,
+# add a generic -mcpu and -march with SVE enabled.  Also use a tune for a modern
+# SVE core.
 
+sve-cflags = -mcpu=generic+sve -march=armv8-a+sve -mtune=neoverse-v2
 
 ifeq ($(build-mathvec),yes)
 bench-libmvec = $(addprefix float-advsimd-,$(float-advsimd-funcs)) \