public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgcrypt/
Date: Mon, 17 Jan 2022 03:01:17 +0000 (UTC)	[thread overview]
Message-ID: <1642388322.7ce5b6fde46ba698919feec73ccee5bdaaf4f8c6.sam@gentoo> (raw)

commit:     7ce5b6fde46ba698919feec73ccee5bdaaf4f8c6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 17 02:58:42 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 17 02:58:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ce5b6fd

dev-libs/libgcrypt: wire up CPU_FLAGS_ARM_* for crypto extensions

Note that we currently use an all-or-nothing approach as I'm
only aware of ARM CPUs supporting all of: cpu_flags_arm_{aes,sha1,sha2}
or none, but it does look like it's possible (or will be in future)
to support some crypto extensions but not all.

The libgcrypt build system only exposes --disable-arm-crypto-support which
uses at least both AES and SHA* instructions right now with no way to disable
just one.

Given in the wild, we're only aware of all-or-nothing CPUs, let's
just add REQUIRED_USE logic for safety for now, and enable/disable based
on all of cpu_flags_arm_{aes,sha1,sha2} being set by the user (which, again,
should be the case for all known CPUs. cpuid2cpuflags will do this automatically.)

Needed to avoid automagic usage of crypto extensions which may cause
problems for e.g. binpkgs.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild b/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild
index c7244661f75b..f8ee619d921b 100644
--- a/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild
+++ b/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild
@@ -12,7 +12,17 @@ SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
 LICENSE="LGPL-2.1 MIT"
 SLOT="0/20" # subslot = soname major version
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+asm cpu_flags_arm_neon cpu_flags_ppc_vsx2 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc o-flag-munging static-libs"
+IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_vsx2 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc o-flag-munging static-libs"
+
+# Build system only has --disable-arm-crypto-support right now
+# If changing this, update src_configure logic too.
+# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions,
+# but this looks like it might change in future. This is just a safety check
+# in case people somehow do have a CPU which only supports some. They must
+# for now disable them all if that's the case.
+REQUIRED_USE="cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 )
+	cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 )
+	cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 )"
 
 RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
 DEPEND="${RDEPEND}"
@@ -44,6 +54,8 @@ multilib_src_configure() {
 
 		--enable-noexecstack
 		$(use_enable cpu_flags_arm_neon neon-support)
+		# See REQUIRED_USE comment above
+		$(use_enable cpu_flags_arm_aes arm-crypto-support)
 		$(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support)
 		$(use_enable cpu_flags_x86_aes aesni-support)
 		$(use_enable cpu_flags_x86_avx avx-support)


             reply	other threads:[~2022-01-17  3:01 UTC|newest]

Thread overview: 270+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17  3:01 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-27 13:59 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgcrypt/ Sam James
2025-02-24  0:01 Sam James
2025-01-29 21:25 Sam James
2025-01-29 21:25 Sam James
2025-01-25 17:24 Sam James
2025-01-25  3:57 Sam James
2025-01-25  3:40 Matt Turner
2024-12-16  7:51 Arthur Zamarin
2024-12-14 11:49 Sam James
2024-12-12 19:38 Sam James
2024-12-12 19:31 Arthur Zamarin
2024-12-12 11:43 Sam James
2024-12-12 11:24 Sam James
2024-12-12 11:24 Sam James
2024-12-04 22:58 Sam James
2024-10-13 19:41 Arthur Zamarin
2024-10-09  5:46 Sam James
2024-10-08 20:28 Arthur Zamarin
2024-10-07 17:36 Sam James
2024-10-07 17:36 Sam James
2024-10-07 17:36 Sam James
2024-07-28 13:59 Fabian Groffen
2024-07-19 11:33 Fabian Groffen
2024-07-19 11:27 Fabian Groffen
2024-07-07  6:05 Sam James
2024-04-04 16:23 Arthur Zamarin
2024-02-06  7:42 Sam James
2024-02-06  7:25 Sam James
2024-02-06  7:25 Sam James
2024-02-06  7:25 Sam James
2024-02-06  7:25 Sam James
2024-02-06  6:25 Sam James
2024-02-06  6:25 Sam James
2024-01-15  3:32 Ionen Wolkens
2024-01-04 10:50 Ulrich Müller
2024-01-03 10:40 Sam James
2023-12-24 14:22 Sam James
2023-12-22  5:07 Sam James
2023-12-15  3:26 Ionen Wolkens
2023-11-15 17:13 Sam James
2023-11-14 11:42 Sam James
2023-09-24 14:22 Sam James
2023-09-17  8:56 Arthur Zamarin
2023-09-16  0:37 Sam James
2023-04-27  9:57 Fabian Groffen
2023-04-23 19:55 Sam James
2023-04-20 23:53 Sam James
2023-04-20 23:53 Sam James
2023-04-07 10:07 Sam James
2023-04-03 14:51 Mike Gilbert
2023-03-04 14:07 Arthur Zamarin
2023-03-04 10:03 Arthur Zamarin
2023-03-04  9:28 Arthur Zamarin
2023-03-04  8:07 Arthur Zamarin
2023-01-14 19:17 Sam James
2022-11-08 17:05 Mike Gilbert
2022-11-08 17:05 Mike Gilbert
2022-11-03 20:21 Mike Gilbert
2022-11-03 17:16 Mike Gilbert
2022-11-03 17:15 Mike Gilbert
2022-10-31 16:41 Agostino Sarubbo
2022-10-31 11:47 Agostino Sarubbo
2022-10-30  4:11 Jakov Smolić
2022-10-29 18:58 Arthur Zamarin
2022-10-29 18:58 Arthur Zamarin
2022-10-29 18:57 Arthur Zamarin
2022-10-29 18:52 Arthur Zamarin
2022-10-29 18:52 Arthur Zamarin
2022-05-13  2:58 Sam James
2022-05-13  2:58 Sam James
2022-05-01 23:25 Sam James
2022-05-01 23:11 Sam James
2022-04-16 19:35 Mike Gilbert
2022-04-15  0:53 Sam James
2022-03-30  4:11 Sam James
2022-02-10 13:41 Sam James
2022-02-10 11:38 Sam James
2022-02-10 11:37 Sam James
2022-02-10 11:37 Sam James
2022-02-10 11:37 Sam James
2022-01-28  9:32 Agostino Sarubbo
2022-01-28  9:31 Agostino Sarubbo
2022-01-24 15:16 Sam James
2022-01-20  8:44 Arthur Zamarin
2022-01-19  7:44 Agostino Sarubbo
2022-01-18 22:16 Sam James
2022-01-18 22:14 Sam James
2022-01-18 13:10 Jakov Smolić
2022-01-17  4:25 Georgy Yakovlev
2022-01-17  4:25 Georgy Yakovlev
2022-01-17  2:46 Georgy Yakovlev
2021-10-20  0:11 Sam James
2021-09-24 15:37 Sam James
2021-09-20  6:25 Agostino Sarubbo
2021-09-19 21:35 Agostino Sarubbo
2021-09-19  6:37 Agostino Sarubbo
2021-09-18 19:51 Sam James
2021-09-18 19:46 Sam James
2021-09-18 19:46 Sam James
2021-09-17  9:01 Mikle Kolyada
2021-08-29 15:54 Mikle Kolyada
2021-06-16 16:46 Sam James
2021-04-20  9:27 Mikle Kolyada
2021-03-28 11:29 Sergei Trofimovich
2021-03-28 10:17 Mikle Kolyada
2021-03-28 10:02 Agostino Sarubbo
2021-03-26 20:39 Agostino Sarubbo
2021-03-26 15:31 Agostino Sarubbo
2021-03-26 14:26 Agostino Sarubbo
2021-03-26 13:40 Agostino Sarubbo
2021-03-25 17:52 Sergei Trofimovich
2021-02-17 22:04 Sam James
2021-02-17 22:04 Sam James
2021-02-17 20:02 Sam James
2021-01-29 14:36 Sam James
2021-01-29 13:19 Sam James
2021-01-23 16:37 Andreas K. Hüttel
2021-01-20 20:53 Sam James
2021-01-20 20:18 Sam James
2021-01-20 20:17 Sam James
2021-01-20 20:17 Sam James
2021-01-20  8:57 Mikle Kolyada
2021-01-02 22:33 David Seifert
2020-12-27 14:21 Fabian Groffen
2020-12-17 18:56 Lars Wendler
2020-10-25 19:45 Mikle Kolyada
2020-09-20 13:41 Mikle Kolyada
2020-09-20 13:41 Mikle Kolyada
2020-09-07 18:23 Mikle Kolyada
2020-08-31 21:35 Sam James
2020-08-20 21:55 Sergei Trofimovich
2020-08-16 14:50 Agostino Sarubbo
2020-08-16 14:47 Agostino Sarubbo
2020-08-16 14:46 Agostino Sarubbo
2020-08-16 10:32 Sergei Trofimovich
2020-08-15  6:51 Sam James
2020-08-15  4:00 Sam James
2020-07-07  9:22 Lars Wendler
2020-06-20  0:56 Aaron Bauman
2020-06-14 16:08 Mike Gilbert
2019-11-13 13:17 Agostino Sarubbo
2019-11-06 23:15 Aaron Bauman
2019-11-01 10:39 Mikle Kolyada
2019-10-14  9:53 Agostino Sarubbo
2019-10-14  3:31 Matt Turner
2019-08-30  9:00 Kristian Fiskerstrand
2019-05-04 18:29 Andreas K. Hüttel
2018-11-23 23:41 Alon Bar-Lev
2018-10-29 19:39 Kristian Fiskerstrand
2018-10-29  8:50 Alon Bar-Lev
2018-10-06  0:32 Alon Bar-Lev
2018-10-05 19:27 Alon Bar-Lev
2018-09-16  8:16 Mikle Kolyada
2018-07-22  9:01 Sergei Trofimovich
2018-07-16  0:12 Mikle Kolyada
2018-07-07 10:47 Markus Meier
2018-06-26 15:44 Tobias Klausmann
2018-06-19 14:30 Mart Raudsepp
2018-06-17 23:29 Thomas Deutschmann
2018-06-15 15:56 Sergei Trofimovich
2018-06-15  9:58 Sergei Trofimovich
2018-06-13 18:54 Kristian Fiskerstrand
2018-04-27 16:53 Alon Bar-Lev
2018-02-15 17:09 Alon Bar-Lev
2018-02-10 23:56 Alon Bar-Lev
2018-01-13 13:01 Kristian Fiskerstrand
2018-01-12 18:19 Mike Frysinger
2017-12-24  9:46 Mart Raudsepp
2017-12-14 20:47 Kristian Fiskerstrand
2017-09-09  0:41 Kristian Fiskerstrand
2017-09-08 22:12 Sergei Trofimovich
2017-09-07 19:41 Markus Meier
2017-09-02 20:01 Aaron Bauman
2017-09-02 20:01 Aaron Bauman
2017-08-31  1:15 Matt Turner
2017-08-31  1:15 Matt Turner
2017-08-31  1:15 Matt Turner
2017-08-29 22:01 Sergei Trofimovich
2017-08-28 10:25 Kristian Fiskerstrand
2017-07-20 13:15 Kristian Fiskerstrand
2017-07-18 14:47 Kristian Fiskerstrand
2017-07-07  6:19 Markus Meier
2017-06-30 11:11 Sergei Trofimovich
2017-06-30  8:32 Agostino Sarubbo
2017-06-29  8:04 Kristian Fiskerstrand
2017-06-21 11:57 Agostino Sarubbo
2017-06-13 12:31 Agostino Sarubbo
2017-06-12 18:53 Markus Meier
2017-06-09  9:44 Agostino Sarubbo
2017-06-02 11:28 Kristian Fiskerstrand
2017-04-12 19:30 Mike Frysinger
2017-04-11  6:43 Jeroen Roovers
2017-03-27 14:06 Alon Bar-Lev
2017-03-26 19:36 Matt Turner
2017-03-21 11:31 Michael Weber
2017-03-20 12:28 Agostino Sarubbo
2017-03-20  6:17 Matt Turner
2017-03-20  6:17 Matt Turner
2017-03-20  6:17 Matt Turner
2017-03-20  6:17 Matt Turner
2017-03-20  1:05 Matt Turner
2017-03-19 17:19 Alon Bar-Lev
2017-03-19 17:19 Alon Bar-Lev
2017-03-02 19:27 Kristian Fiskerstrand
2017-03-02 19:27 Kristian Fiskerstrand
2017-02-04 20:07 Alon Bar-Lev
2016-12-15 11:28 Kristian Fiskerstrand
2016-12-15 11:28 Kristian Fiskerstrand
2016-12-11 21:37 Kristian Fiskerstrand
2016-11-10  6:20 Mike Frysinger
2016-10-03 17:11 Kristian Fiskerstrand
2016-09-29 13:28 Agostino Sarubbo
2016-09-29 12:35 Agostino Sarubbo
2016-09-29  9:35 Agostino Sarubbo
2016-09-29  8:41 Agostino Sarubbo
2016-09-01 11:31 Markus Meier
2016-08-31 10:58 Tobias Klausmann
2016-08-18 23:33 Jeroen Roovers
2016-08-18 23:33 Jeroen Roovers
2016-08-18 14:53 Agostino Sarubbo
2016-08-18  8:39 Kristian Fiskerstrand
2016-08-18  8:12 Kristian Fiskerstrand
2016-08-18  8:12 Kristian Fiskerstrand
2016-08-17 17:30 Kristian Fiskerstrand
2016-08-06 21:29 Kristian Fiskerstrand
2016-08-03  3:19 Jeroen Roovers
2016-07-14 16:54 Kristian Fiskerstrand
2016-07-14 16:51 Kristian Fiskerstrand
2016-06-26 18:29 Markus Meier
2016-06-20 10:43 Tobias Klausmann
2016-06-15 21:59 Kristian Fiskerstrand
2016-06-08 18:45 Mike Frysinger
2016-05-27 18:14 Mike Frysinger
2016-05-22 19:42 Kristian Fiskerstrand
2016-05-22 18:59 Jeroen Roovers
2016-04-23 17:36 Tobias Klausmann
2016-04-15 19:00 Robin H. Johnson
2016-03-25  9:40 Markus Meier
2016-03-20 12:24 Agostino Sarubbo
2016-03-19 12:28 Agostino Sarubbo
2016-03-18 19:11 Michał Górny
2016-03-16 14:09 Agostino Sarubbo
2016-03-15 20:52 Tobias Klausmann
2016-03-15 20:50 Tobias Klausmann
2016-03-15 16:39 Agostino Sarubbo
2016-03-05 16:48 Mikle Kolyada
2016-02-29  8:46 Stephen Klimaszewski
2016-02-25 17:40 Kristian Fiskerstrand
2016-02-12  7:23 Jeroen Roovers
2016-02-11 12:27 Agostino Sarubbo
2016-02-10 22:57 Kristian Fiskerstrand
2016-02-09 18:19 Kristian Fiskerstrand
2015-12-02 19:55 Alon Bar-Lev
2015-12-01  6:48 Alon Bar-Lev
2015-11-08 19:14 Mikle Kolyada
2015-10-16  8:01 Mikle Kolyada
2015-09-15  9:26 Tobias Klausmann
2015-09-08 10:44 Kristian Fiskerstrand
2015-09-08  4:26 Jeroen Roovers
2015-09-07 16:27 Alon Bar-Lev
2015-09-06 20:37 Alon Bar-Lev
2015-09-06  4:17 Alon Bar-Lev
2015-09-06  4:17 Alon Bar-Lev
2015-09-05 15:36 Anthony G. Basile
2015-09-05 14:59 Agostino Sarubbo
2015-09-05 14:58 Agostino Sarubbo
2015-09-05 13:35 Anthony G. Basile
2015-09-04 14:15 Alon Bar-Lev
2015-08-19  9:59 Alon Bar-Lev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1642388322.7ce5b6fde46ba698919feec73ccee5bdaaf4f8c6.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox