Created attachment 803806 [details] compressed build log with gcc-10.4.0 hey everyone, there is a compile error for dev-cpp/highway-1.0.1 and newer on armv7a: $ cat highway-9999-with-cross-gcc-10.4.0.log | grep error: /usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:11002:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_u64(uint64_t*, uint64x2_t)’: target specific option mismatch /usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch /usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:11002:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_u64(uint64_t*, uint64x2_t)’: target specific option mismatch /usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch /usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10944:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_s16(int16_t*, int16x8_t)’: target specific option mismatch /usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10944:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_s16(int16_t*, int16x8_t)’: target specific option mismatch /usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10951:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_s32(int32_t*, int32x4_t)’: target specific option mismatch /usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10951:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_s32(int32_t*, int32x4_t)’: target specific option mismatch /usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10958:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_s64(int64_t*, int64x2_t)’: target specific option mismatch /usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10958:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_s64(int64_t*, int64x2_t)’: target specific option mismatch
Created attachment 803809 [details] compressed build log with gcc-11.3.0 reproduced with native gcc-11.3.0
I've opened an issue with upstream a few weeks ago, and it seems there is nothing the devs can do to help with the issue. Therefore, can please someone from the toolchain team have a look at this? easy reproducer: emerge -av =dev-cpp/highway-9999 [ebuild U *] dev-cpp/highway-9999::gentoo [0.17.0::gentoo] to /usr/armv7a-unknown-linux-gnueabihf/ USE="-test" 0 KiB
Created attachment 803812 [details] output of emerge --info
Try adding -mfpu=neon to *FLAGS.
There is a HWY_CMAKE_ARM7 cmake flag, which enables NEON (default off). Maybe enable it with arm neon USE expand.
Created attachment 803824 [details, diff] patch for the ebuilds alas, you're right with passing neon flags. the attached patch fixes the issue, I think it will force neon to all ARCH=arm and ignore all other ARCH. please commit if you feel its correct, but really no need to post my private email in the public commit msg. Thank you.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2873436957fb527e0fd84838c3d8e09f6b1171d8 commit 2873436957fb527e0fd84838c3d8e09f6b1171d8 Author: Daniel Novomesky <dnovomesky@gmail.com> AuthorDate: 2022-09-15 06:44:45 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2022-10-10 12:20:07 +0000 dev-cpp/highway: fix buiding on ARM Neon Bug: https://bugs.gentoo.org/869077 Signed-off-by: Daniel Novomesky <dnovomesky@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/27263 Signed-off-by: Joonas Niilola <juippis@gentoo.org> dev-cpp/highway/{highway-1.0.1.ebuild => highway-1.0.1-r1.ebuild} | 3 ++- dev-cpp/highway/highway-9999.ebuild | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f2eceb5dfcce9899649870caac59d62055e7b82 commit 1f2eceb5dfcce9899649870caac59d62055e7b82 Author: stefson <herrtimson@yahoo.de> AuthorDate: 2023-03-07 11:01:52 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-03-07 11:44:19 +0000 dev-cpp/highway: fix compile without neon optimization on armv7 Closes: https://bugs.gentoo.org/869077 Signed-off-by: Steffen Kuhn <nielson2@yandex.com> Closes: https://github.com/gentoo/gentoo/pull/29964 Signed-off-by: Sam James <sam@gentoo.org> ...ile-for-armv7-targets-with-vfp4-and-lower.patch | 123 +++++++++++++++++++++ dev-cpp/highway/highway-1.0.1-r1.ebuild | 6 +- dev-cpp/highway/highway-1.0.3.ebuild | 4 + 3 files changed, 132 insertions(+), 1 deletion(-)