aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMisty De Meo2014-02-09 21:04:44 -0800
committerMisty De Meo2014-02-09 21:08:04 -0800
commitd8c9e8a38bac1a695e7f2b84c3199500a1314777 (patch)
treedf5b38fe1dbe99f58d631046689585606038ab87 /Library/Formula
parentc32ab0a35a2dfa9b593f759ef0ae8b7af077b0b7 (diff)
downloadhomebrew-d8c9e8a38bac1a695e7f2b84c3199500a1314777.tar.bz2
john-jumbo: fix build with clang under superenv
Fixes #26531.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/john-jumbo.rb27
1 files changed, 20 insertions, 7 deletions
diff --git a/Library/Formula/john-jumbo.rb b/Library/Formula/john-jumbo.rb
index 9af025b23..58dbe4205 100644
--- a/Library/Formula/john-jumbo.rb
+++ b/Library/Formula/john-jumbo.rb
@@ -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)
+ {