diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-03-07 17:57:54 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-03-07 17:57:54 +0000 |
commit | bc75b42f7650c33ffdb61e5e29b0b96cb9111932 (patch) | |
tree | 867908c0cf83e6015a5b1544cfdc4e17f1c13753 /dev-cpp | |
parent | b3fef92e618039dc93153a93176184a49606c74a (diff) |
gentoo auto-resync : 07:03:2023 - 17:57:54
Diffstat (limited to 'dev-cpp')
-rw-r--r-- | dev-cpp/Manifest.gz | bin | 13078 -> 13074 bytes | |||
-rw-r--r-- | dev-cpp/benchmark/Manifest | 2 | ||||
-rw-r--r-- | dev-cpp/benchmark/benchmark-1.7.1.ebuild | 4 | ||||
-rw-r--r-- | dev-cpp/highway/Manifest | 5 | ||||
-rw-r--r-- | dev-cpp/highway/files/0001-fix-compile-for-armv7-targets-with-vfp4-and-lower.patch | 123 | ||||
-rw-r--r-- | dev-cpp/highway/highway-1.0.1-r1.ebuild | 6 | ||||
-rw-r--r-- | dev-cpp/highway/highway-1.0.3.ebuild | 4 |
7 files changed, 138 insertions, 6 deletions
diff --git a/dev-cpp/Manifest.gz b/dev-cpp/Manifest.gz Binary files differindex 80501102626a..524beab1ff13 100644 --- a/dev-cpp/Manifest.gz +++ b/dev-cpp/Manifest.gz diff --git a/dev-cpp/benchmark/Manifest b/dev-cpp/benchmark/Manifest index 04267494888e..665b2d6dcfca 100644 --- a/dev-cpp/benchmark/Manifest +++ b/dev-cpp/benchmark/Manifest @@ -1,5 +1,5 @@ DIST benchmark-1.7.0.tar.gz 194165 BLAKE2B 2a5ae10fb1fd1d05da60287591a5ba16d9bf8f7c77d1f332a6482cba32841a00b1350bf83238d52e051bcf2f628ed8ffc9e1899c75337b8cd12d9fb1800fd5b0 SHA512 25f81930ce210e298d9cc67c965cc8937f66c53427b18a672338b86424eef32df877ec6b7a7106417464b29c5048b014fcc82cfa773168ed701aa47d01f39f82 DIST benchmark-1.7.1.tar.gz 196575 BLAKE2B 05a0ae69c0eee231b5d3c06d474c89680e4a2dfaae2ac0ffa1777cf011907cce6230648bfdb631008c2aa10f01b55652f58949849714d6333c5a0351ef42e567 SHA512 396af1c1d3eaa2b78c6d23b1472f6088db85a294056ae1c2366dc5c0becdc8f141ba8fc3a235033324ab0a41c2298f5d242ef09b9b6f69d9877de6bcb2062efd EBUILD benchmark-1.7.0.ebuild 912 BLAKE2B 4fa13b2ec4ce003a8dbc3d30a7e565e64a3397cf04b9a0fc97a306c97e3fe30079519735d50138fafc2fffa700543b72da6971b203626ab9fe060945f993a688 SHA512 5a0cdc46d1e9710a59f8d971bd1549796c7eb3df45c92b270c0719ca3fbb49f43bbb87cbdfd265f2d6e5a3ba34a2c2c5a48eb98ae20c6eaeabfd04023bdd6228 -EBUILD benchmark-1.7.1.ebuild 917 BLAKE2B da88887ddfb23f042f92148c22791bdd540992c1b545e4d91666374a25a8feeb5c236f7e8acec41488681ae3ff27a81ca6beb457b61482bea0f385d5a41dc9ce SHA512 903570dbe93163207afa70b6e06cc9e3f52a2ea9136d38b6136f568234946ac5b7fa08f074eda1dd56d62885989de355cfdaba659bc26e98960caa44156ab8cb +EBUILD benchmark-1.7.1.ebuild 912 BLAKE2B 46027df03fdba76ae5fc34a442feaba1d417669344f2a75980896299a269356c7a0ce5cd60f1f0f495508f5e0795743b1a5166deb6e96068e81b892b2a81841d SHA512 68a1bd35e2b84a3f4fd35124478e46afb300dfa16a50c206605dbfca47518bbaaab207131780cf200cd374ed8af37b4c037b1425330d662e2e57f45f52f54326 MISC metadata.xml 563 BLAKE2B 2c825b6895d64a3e5e4ea6b61a707e03e14873bc5fbe9f67a756a56c8edd0dd04dd8f3aa1d1a80bf8b4921f25aad19320222b3607494ab512d3713152b1ce41e SHA512 09856cb99c18336b143b725f8acd7fce84d7cce2aea22f03f80934f6681161fcf667f084af236fd654051acf4a261c7e25026822ce3ab79d6fef0ea3212a601d diff --git a/dev-cpp/benchmark/benchmark-1.7.1.ebuild b/dev-cpp/benchmark/benchmark-1.7.1.ebuild index fdf73017860e..c0045a92a8c9 100644 --- a/dev-cpp/benchmark/benchmark-1.7.1.ebuild +++ b/dev-cpp/benchmark/benchmark-1.7.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -11,7 +11,7 @@ SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="Apache-2.0" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~x86" +KEYWORDS="amd64 ~arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86" IUSE="debug doc lto test" RESTRICT="!test? ( test )" diff --git a/dev-cpp/highway/Manifest b/dev-cpp/highway/Manifest index 36f7e2c87a08..402230fb2e21 100644 --- a/dev-cpp/highway/Manifest +++ b/dev-cpp/highway/Manifest @@ -1,6 +1,7 @@ +AUX 0001-fix-compile-for-armv7-targets-with-vfp4-and-lower.patch 5987 BLAKE2B e6168befa010bbfe2cce3633c78c8d8c5005ecbe605a12c39e1004284f80d580c0c8a9a037638e414e57a989f63370b54a64db2de1c25a3188d0a3df4611687b SHA512 03f5d89ed1038f6eab451c11216ac75bfa7165a57b1f46a0b6fedb03620a355b30bd868d0da371e44d1ebe5f625e4e36777929de63762953e4e9fc0013c6f5bb DIST highway-1.0.1.tar.gz 1730746 BLAKE2B 1c6185af91afe32fbb35285d49101d381ade7ded262cbcd3b0a8bf28b1924a76ac5a11423a1613068f3435fbbdd2ab0119aa8a1aafe2c3467e0aff1987f40aad SHA512 35b6287579b6248966b0d36fda1522fd6338523934b079e94e857f9de08354f20b99739c99d53249a3a6c583519da0e0ac5e06dfbe6e3a89262f627c75b59dd8 DIST highway-1.0.3.tar.gz 1770704 BLAKE2B 5454f7e661270f25d1439a2a3d649a0f9970d7e10e0cfe6818c470b00460cc77b044ca83e912c91a3582b4a60af5d8d0f7c0aba01762acd3c98b9692fa0b20c6 SHA512 fc419c862e1686b6278081e8e10da41dc2bdfbd386a29b59e21a57375a47d3eeb5c7297e3078c78007b212121d936640b192a26a16c941e73cf599f24e081021 -EBUILD highway-1.0.1-r1.ebuild 911 BLAKE2B 394070e1f0c01816fd9e35078d22e5d15da24e111e14d594d8876300f72a82e352ab0c5e5e2583f57d2553ae57b99b41a4ef7d8d05a682417604540c7dc952bf SHA512 df57e02f5d608d133284144a0a0d7c9785b21741f649914254cf3cb8fa62e8694d06913a035504748bb78966c57b090ca14ea3e8c042a0f5e1170b3e568fb851 -EBUILD highway-1.0.3.ebuild 924 BLAKE2B 440bd36c2230450374e569f77a6d61904563a1768ce74715190139bf360756bcec4262cbc01e6dc90a57dbb70d8ded39c424ca3f62e01cd9f05023fdb4444259 SHA512 632555492ba533503e7c55c1fd932a1033f1bff95d116c3dbd82c5c0d6f5abae3bf26b5f94a1cd5055b96dbfd6bf7757f885b6ae29b1e131d016bf93c3057aa7 +EBUILD highway-1.0.1-r1.ebuild 1000 BLAKE2B 785d94ce1c5bda32873bae32c693eeb56672a1ae639dffbf8b6d609eb093f89adfb8ba262e7059bc64af8126ef80b6f80156ebd8386447377bfdca9023ed2a8c SHA512 3cfded30d2f7342f019bad820581629ae34edc1585f7e9442a164bfa122bcaa3f6a24d61d433c36f2bd199f1344efa1afbde3f7218b3d1ff0313c76b01c25136 +EBUILD highway-1.0.3.ebuild 1013 BLAKE2B b0926754b43676b61fa2bbae683668b5844d7572c14202d3cb1833f62b9e761d7be91bc731c849aa41ed4996736188f09d74d8cc4f858709a199fa027e4c384a SHA512 5b46e348b0d3a771782c7dc128824f3199c7acbb92085db939017e542565daf5901d75e063da9236dda07f4863eb59f99b93a8271c2cbcaec939e59a7c5b4bae EBUILD highway-9999.ebuild 918 BLAKE2B f6de6a0483355dfbc793c0fb1520cf8ca5eae7fceba7bff77c38979c18c0a82a07ea8505e972a62e7cbf0ae5abd39050f021524bc8c5680eef3b57ac3531a8d5 SHA512 a6ca4d498ff57290c34333c5553f9d80383f770103fd128cd5822046183d769deb4407f891918d0058152634bab09fa0dcd53f152ef9e8182a5cd3fd4aaa1ebe MISC metadata.xml 700 BLAKE2B 23fb803289745f094f19cb7dc6b296f56a3bf712b39f87ee563872496edb5798fe9f36ec1d8a9d9af52d26b589bca354bc58a3c039753156e09a154de27cb960 SHA512 b47da71c110bb91b523dd970a1ed8f4d40c1cc067c170d10ef0ad412850967682303e610c352d7c6425d7bad33d58f90a6d3a34a333a38e427c65a8341c3ec21 diff --git a/dev-cpp/highway/files/0001-fix-compile-for-armv7-targets-with-vfp4-and-lower.patch b/dev-cpp/highway/files/0001-fix-compile-for-armv7-targets-with-vfp4-and-lower.patch new file mode 100644 index 000000000000..ebf448cfbb24 --- /dev/null +++ b/dev-cpp/highway/files/0001-fix-compile-for-armv7-targets-with-vfp4-and-lower.patch @@ -0,0 +1,123 @@ +https://github.com/google/highway/commit/dc63f813c465f3bf95cb5b98f01aeed28b81173c +https://github.com/google/highway/pull/1143 + +https://github.com/google/highway/issues/834 +https://github.com/google/highway/issues/1032 + +https://bugs.gentoo.org/869077 + +From dc63f813c465f3bf95cb5b98f01aeed28b81173c Mon Sep 17 00:00:00 2001 +From: Julien Olivain <ju.o@free.fr> +Date: Mon, 20 Feb 2023 23:22:28 +0100 +Subject: [PATCH] Fix compilation for armv7 targets with vfp < v4 and gcc >= 8 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When using a armv7 gcc >= 8 toolchain (like [1]) with Highway +configured with -DHWY_CMAKE_ARM7=OFF and HWY_ENABLE_CONTRIB=ON, +compilation fails with error: + + In file included from /build/highway-1.0.3/hwy/ops/arm_neon-inl.h:33, + from /build/highway-1.0.3/hwy/highway.h:358, + from /build/highway-1.0.3/hwy/contrib/sort/shared-inl.h:104, + from /build/highway-1.0.3/hwy/contrib/sort/traits128-inl.h:27, + from /build/highway-1.0.3/hwy/contrib/sort/vqsort_128d.cc:23, + from /build/highway-1.0.3/hwy/foreach_target.h:81, + from /build/highway-1.0.3/hwy/contrib/sort/vqsort_128d.cc:20: + /toolchain/lib/gcc/arm-buildroot-linux-gnueabihf/12.2.0/include/arm_neon.h: In function ‘void hwy::N_NEON::StoreU(Vec128<long long unsigned int, 2>, Full128<long long unsigned int>, uint64_t*)’: + /toolchain/lib/gcc/arm-buildroot-linux-gnueabihf/12.2.0/include/arm_neon.h:11052:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_u64(uint64_t*, uint64x2_t)’: target specific option mismatch + 11052 | vst1q_u64 (uint64_t * __a, uint64x2_t __b) + | ^~~~~~~~~ + /build/highway-1.0.3/hwy/ops/arm_neon-inl.h:2786:12: note: called from here + 2786 | vst1q_u64(unaligned, v.raw); + | ~~~~~~~~~^~~~~~~~~~~~~~~~~~ + +The same errors happen when configured with HWY_ENABLE_EXAMPLES=ON, +or from client libraries like libjxl (at other places). + +The issue is that Highway Arm NEON ops have a dependency on the +Advanced SIMD (Neon) v2 and the VFPv4 floating-point instructions. +The SIMD (Neon) v1 and VFPv3 instructions are not supported. + +There was several attempts to fix variants of this issues. +See #834 and #1032. + +HWY_NEON target is selected only if __ARM_NEON is defined. See: +https://github.com/google/highway/blob/1.0.3/hwy/detect_targets.h#L251 + +This test is not sufficient since __ARM_NEON will be predefined in +any cases when Neon is enabled (neon-vfpv3, neon-vfpv4). + +The issue is that HWY_CMAKE_ARM7=ON implies VFPv4 / NEON SIMD v2. +When setting HWY_CMAKE_ARM7=OFF, "neon-vfpv4" will not be forced, +but the code is still using intrinsics assuming VFPv4. Gcc will fail +with error because code cannot be generated for the selected +architecture. + +This issue can be avoided by adding "-DHWY_DISABLED_TARGETS=HWY_NEON" in +CXXFLAGS. The problem with this solution is that every client program will +also need to do the same. This goes against the very purpose of +"hwy/detect_targets.h". + +Technically, Armv7-a processors with VFPv4 can be detected using some +ACLE (Arm C Language Extensions [2]) predefined macros: + +Basically, we want Highway to define HWY_NEON only when the target +supports SIMDv2/VFPv4 or higher. An older target with vfpv3 only +(e.g. Cortex-A8, A9, ...) would NOT define HWY_NEON, and therefore +would fallback on HWY_SCALAR implementation. + +However, not all compiler completely support ACLE. There is also +several versions too. So we cannot easily rely on macros like +"__ARM_VFPV4__" (which clang predefine, but not gcc). + +The alternative solution proposed in this patch, is to declare the +HWY_NEON target architecture as broken, when we detect the target is +Armv7-A, but mandatory features for vfpv4 (namely half-float, FMA) +are missing. Half-floats are tested using the macro __ARM_NEON_FP, +and the FMA with the macro __ARM_FEATURE_FMA. See ACLE [2]. The +intent of declaring the target as broken, rather than selecting +HWY_NEON only if vfpv4 features are detected is to remain a bit +conservative, since the detection is slithly inaccurate. + +For a given compiler/cflags, predefined macros for Arm/ACLE can be +reviewed with commands like: + + arm-linux-gnueabihf-gcc -mcpu=cortex-a9 -mfpu=neon-vfpv3 -Wp,-dM -E -c - < /dev/null | grep -Fi arm | sort + arm-linux-gnueabihf-gcc -mcpu=cortex-a7 -mfpu=neon-vfpv4 -Wp,-dM -E -c - < /dev/null | grep -Fi arm | sort + clang -target armv7a -mcpu=cortex-a9 -mfpu=neon-vfpv3 -mfloat-abi=hard -Wp,-dM -E -c - < /dev/null | grep -Fi arm | sort + clang -target armv7a -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Wp,-dM -E -c - < /dev/null | grep -Fi arm | sort + +The different values of __ARM_NEON_FP can be seen, depending which +"-mfpu" is passed. Same for __ARM_FEATURE_FMA. + +[1] https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--glibc--bleeding-edge-2022.08-1.tar.bz2 +[2] https://github.com/ARM-software/acle/ + +Signed-off-by: Julien Olivain <ju.o@free.fr> +--- + hwy/detect_targets.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/hwy/detect_targets.h b/hwy/detect_targets.h +index 2beca95b..40ae7fe7 100644 +--- a/hwy/detect_targets.h ++++ b/hwy/detect_targets.h +@@ -154,6 +154,16 @@ + (defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN)) + #define HWY_BROKEN_TARGETS (HWY_NEON) + ++// armv7-a without a detected vfpv4 is not supported ++// (for example Cortex-A8, Cortex-A9) ++// vfpv4 always have neon half-float _and_ FMA. ++#elif HWY_ARCH_ARM_V7 && \ ++ (__ARM_ARCH_PROFILE == 'A') && \ ++ !defined(__ARM_VFPV4__) && \ ++ !((__ARM_NEON_FP & 0x2 /* half-float */) && \ ++ (__ARM_FEATURE_FMA == 1)) ++#define HWY_BROKEN_TARGETS (HWY_NEON) ++ + // SVE[2] require recent clang or gcc versions. + #elif (HWY_COMPILER_CLANG && HWY_COMPILER_CLANG < 1100) || \ + (HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1000) diff --git a/dev-cpp/highway/highway-1.0.1-r1.ebuild b/dev-cpp/highway/highway-1.0.1-r1.ebuild index e4a2c4b87d4b..b0a7900ce124 100644 --- a/dev-cpp/highway/highway-1.0.1-r1.ebuild +++ b/dev-cpp/highway/highway-1.0.1-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 2021-2022 Gentoo Authors +# Copyright 2021-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -24,6 +24,10 @@ DEPEND="test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )" RESTRICT="!test? ( test )" +PATCHES=( + "${FILESDIR}"/0001-fix-compile-for-armv7-targets-with-vfp4-and-lower.patch +) + multilib_src_configure() { local mycmakeargs=( -DHWY_CMAKE_ARM7=$(usex cpu_flags_arm_neon) diff --git a/dev-cpp/highway/highway-1.0.3.ebuild b/dev-cpp/highway/highway-1.0.3.ebuild index af752cf34a06..c4d4ed034ee9 100644 --- a/dev-cpp/highway/highway-1.0.3.ebuild +++ b/dev-cpp/highway/highway-1.0.3.ebuild @@ -24,6 +24,10 @@ DEPEND="test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )" RESTRICT="!test? ( test )" +PATCHES=( + "${FILESDIR}"/0001-fix-compile-for-armv7-targets-with-vfp4-and-lower.patch +) + multilib_src_configure() { local mycmakeargs=( -DHWY_CMAKE_ARM7=$(usex cpu_flags_arm_neon) |