diff options
author | joerg <joerg@pkgsrc.org> | 2015-01-25 13:13:51 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-01-25 13:13:51 +0000 |
commit | 21a17d663062cb68a5546dcc8d9883b277f63c48 (patch) | |
tree | a2d028b474c120cf0b8fd52e1c87615de9e2c66a /security | |
parent | 8137925f03007b4c57b1f0c155f78d1709c98f18 (diff) | |
download | pkgsrc-21a17d663062cb68a5546dcc8d9883b277f63c48.tar.gz |
For clang, don't use the rotate inline asm, but expect the compiler to
generate optimal code.
Diffstat (limited to 'security')
-rw-r--r-- | security/libtomcrypt/distinfo | 3 | ||||
-rw-r--r-- | security/libtomcrypt/patches/patch-src_headers_tomcrypt__macros.h | 25 |
2 files changed, 27 insertions, 1 deletions
diff --git a/security/libtomcrypt/distinfo b/security/libtomcrypt/distinfo index c4d21d08a92..624f25e00b6 100644 --- a/security/libtomcrypt/distinfo +++ b/security/libtomcrypt/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.3 2014/01/16 13:32:10 drochner Exp $ +$NetBSD: distinfo,v 1.4 2015/01/25 13:13:51 joerg Exp $ SHA1 (crypt-1.17.tar.bz2) = 9c746822c84e4276e432b64964f94d1d5ddd13ad RMD160 (crypt-1.17.tar.bz2) = 742d72d82fea2e6a9865d8c682c10cbaba69ea2f @@ -6,3 +6,4 @@ Size (crypt-1.17.tar.bz2) = 1599215 bytes SHA1 (patch-aa) = a2385cf0543a19b1555d4370a10c012c5141b48a SHA1 (patch-ab) = c0eb1522dd02c2811deebfa353433e81e71a8928 SHA1 (patch-ac) = 871a713512b20199b502876d2523e8bf619c5e85 +SHA1 (patch-src_headers_tomcrypt__macros.h) = 4aa1e0773a11c32fca83e7de82e12d44fdbb8202 diff --git a/security/libtomcrypt/patches/patch-src_headers_tomcrypt__macros.h b/security/libtomcrypt/patches/patch-src_headers_tomcrypt__macros.h new file mode 100644 index 00000000000..b676a3c3ebf --- /dev/null +++ b/security/libtomcrypt/patches/patch-src_headers_tomcrypt__macros.h @@ -0,0 +1,25 @@ +$NetBSD: patch-src_headers_tomcrypt__macros.h,v 1.1 2015/01/25 13:13:51 joerg Exp $ + +clang doesn't allow non-constant arguments for "I" constraints. +Just use the C version, it will get optimised to rotate anyway. + +--- src/headers/tomcrypt_macros.h.orig 2015-01-24 16:35:36.000000000 +0000 ++++ src/headers/tomcrypt_macros.h +@@ -242,7 +242,7 @@ asm __volatile__ ( \ + #define RORc(x,n) _lrotr(x,n) + #define ROLc(x,n) _lrotl(x,n) + +-#elif !defined(__STRICT_ANSI__) && defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(INTEL_CC) && !defined(LTC_NO_ASM) ++#elif !defined(__STRICT_ANSI__) && defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(INTEL_CC) && !defined(LTC_NO_ASM) && !defined(__clang__) + + static inline unsigned ROL(unsigned word, int i) + { +@@ -341,7 +341,7 @@ static inline unsigned RORc(unsigned wor + + + /* 64-bit Rotates */ +-#if !defined(__STRICT_ANSI__) && defined(__GNUC__) && defined(__x86_64__) && !defined(LTC_NO_ASM) ++#if !defined(__STRICT_ANSI__) && defined(__GNUC__) && defined(__x86_64__) && !defined(LTC_NO_ASM) && !defined(__clang__) + + static inline unsigned long ROL64(unsigned long word, int i) + { |