john-jumbo: fix build with clang under superenv

Fixes Homebrew/homebrew#26531.
This commit is contained in:
Misty De Meo 2014-02-09 21:04:44 -08:00
parent 488a96e240
commit fe96fdcdb0

View file

@ -9,8 +9,12 @@ class JohnJumbo < Formula
def patches
[
DATA, # Taken from MacPorts, tells john where to find runtime files
"http://www.openwall.com/john/g/john-1.7.9-jumbo-7.diff.gz" # Jumbo
"http://www.openwall.com/john/g/john-1.7.9-jumbo-7.diff.gz", # Jumbo
# First patch taken from MacPorts, tells john where to find runtime files
# Second patch protects against a redefinition of _mm_testz_si128 which
# tanked the build in clang;
# see https://github.com/Homebrew/homebrew/issues/26531
DATA
]
end
@ -19,11 +23,6 @@ class JohnJumbo < Formula
cause "Don't remember, but adding this to whitelist 2336."
end
fails_with :clang do
build 425
cause "rawSHA1_ng_fmt.c:535:19: error: redefinition of '_mm_testz_si128'"
end
def install
ENV.deparallelize
arch = MacOS.prefer_64_bit? ? '64' : 'sse2'
@ -78,3 +77,17 @@ __END__
#endif
#define JOHN_PRIVATE_HOME "~/.john"
#endif
diff --git a/src/rawSHA1_ng_fmt.c b/src/rawSHA1_ng_fmt.c
index 5f89cda..6cbd550 100644
--- a/src/rawSHA1_ng_fmt.c
+++ b/src/rawSHA1_ng_fmt.c
@@ -530,7 +530,7 @@ static void sha1_fmt_crypt_all(int count)
#if defined(__SSE4_1__)
-# if !defined(__INTEL_COMPILER)
+# if !defined(__INTEL_COMPILER) && !defined(__clang__)
// This intrinsic is not always available in GCC, so define it here.
static inline int _mm_testz_si128 (__m128i __M, __m128i __V)
{