pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/libgcrypt libgcrypt: Fix build w...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f536e132ae5e
branches:  trunk
changeset: 307678:f536e132ae5e
user:      kamil <kamil%pkgsrc.org@localhost>
date:      Fri May 11 19:20:11 2018 +0000
description:
libgcrypt: Fix build with Clang

Port code that disables optimization on GCC to Clang/LLVM.

diffstat:

 security/libgcrypt/distinfo                                  |   3 +-
 security/libgcrypt/patches/patch-random_jitterentropy-base.c |  26 ++++++++++++
 2 files changed, 28 insertions(+), 1 deletions(-)

diffs (45 lines):

diff -r 9e3f4fca60a6 -r f536e132ae5e security/libgcrypt/distinfo
--- a/security/libgcrypt/distinfo       Fri May 11 19:18:35 2018 +0000
+++ b/security/libgcrypt/distinfo       Fri May 11 19:20:11 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.76 2017/12/14 08:49:54 adam Exp $
+$NetBSD: distinfo,v 1.77 2018/05/11 19:20:11 kamil Exp $
 
 SHA1 (libgcrypt-1.8.2.tar.bz2) = ab8aae5d7a68f8e0988f90e11e7f6a4805af5c8d
 RMD160 (libgcrypt-1.8.2.tar.bz2) = e0bed861b328fe411faa74daca0db388fb5aed88
@@ -6,4 +6,5 @@
 Size (libgcrypt-1.8.2.tar.bz2) = 2966534 bytes
 SHA1 (patch-aa) = 60b3f4453b217ed8879a2ffd8d485c0195ffb5f8
 SHA1 (patch-cipher_rijndael-arm.S) = ef3cb7f481022440780eb48ae31cbfad0a3ec115
+SHA1 (patch-random_jitterentropy-base.c) = 5a14676aae7ad5d12f9f0bed366af5183aaf22ad
 SHA1 (patch-src_visibility.h) = 8cbbf6803ab34b4b7dda832aa8ee18247aa89518
diff -r 9e3f4fca60a6 -r f536e132ae5e security/libgcrypt/patches/patch-random_jitterentropy-base.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libgcrypt/patches/patch-random_jitterentropy-base.c      Fri May 11 19:20:11 2018 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-random_jitterentropy-base.c,v 1.1 2018/05/11 19:20:11 kamil Exp $
+
+Port to Clang.
+
+--- random/jitterentropy-base.c.orig   2017-11-23 18:16:58.000000000 +0000
++++ random/jitterentropy-base.c
+@@ -50,13 +50,18 @@
+  */
+ 
+ #undef _FORTIFY_SOURCE
++
++#ifdef __clang__
++#pragma clang optimize off
++#else
+ #pragma GCC optimize ("O0")
++#endif
+ 
+ #include "jitterentropy.h"
+ 
+ #ifndef CONFIG_CRYPTO_CPU_JITTERENTROPY_STAT
+  /* only check optimization in a compilation for real work */
+- #ifdef __OPTIMIZE__
++ #if defined(__OPTIMIZE__) && !defined(__clang__)
+   #error "The CPU Jitter random number generator must not be compiled with optimizations. See documentation. Use the compiler switch -O0 for compiling jitterentropy-base.c."
+  #endif
+ #endif



Home | Main Index | Thread Index | Old Index