From 650232759dcf7dfe22e956de28c4311bfee87ced Mon Sep 17 00:00:00 2001 From: magnum Date: Mon, 27 May 2013 02:09:13 +0200 Subject: [PATCH] Add a linux-X32-native make target (for X32-ABI). For this to work we also change ARCH_WORD to "long long" in x86-64.h. --- src/Makefile | 9 +++++++++ src/x86-64.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 8ca6c0f..0cb72e7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -90,6 +90,7 @@ default: @echo "linux-x86-avx Linux, x86 32-bit with AVX (2011+ Intel CPUs)" @echo "linux-x86-xop Linux, x86 32-bit with AVX and XOP (2011+ AMD CPUs)" @echo "linux-x86-sse2 Linux, x86 32-bit with SSE2 (most common, if 32-bit)" + @echo "linux-X32-native Linux, X32 'native' (all CPU features you've got)" @echo "linux-x86-mmx Linux, x86 32-bit with MMX (for old computers)" @echo "linux-x86-any Linux, x86 32-bit (for truly ancient computers)" @echo "linux-alpha Linux, Alpha" @@ -181,6 +182,14 @@ linux-x86-64: CFLAGS="$(CFLAGS) -DHAVE_CRYPT" \ LDFLAGS="$(LDFLAGS) -lcrypt" +linux-X32-native: + $(LN) x86-64.h arch.h + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o" \ + CFLAGS="$(CFLAGS) -DHAVE_CRYPT -march=native -mx32" \ + ASFLAGS="$(ASFLAGS) -march=native -mx32" \ + LDFLAGS="$(LDFLAGS) -lcrypt -march=native -mx32" + linux-x86-64-32-sse2: $(LN) x86-sse.h arch.h $(MAKE) $(PROJ) \ diff --git a/src/x86-64.h b/src/x86-64.h index 4398a82..8723378 100644 --- a/src/x86-64.h +++ b/src/x86-64.h @@ -10,7 +10,7 @@ #ifndef _JOHN_ARCH_H #define _JOHN_ARCH_H -#define ARCH_WORD long +#define ARCH_WORD long long #define ARCH_SIZE 8 #define ARCH_BITS 64 #define ARCH_BITS_LOG 6 -- 1.7.10.4