Skip to content

Commit 5059999

Browse files
committed
Legacy Makefile: Add AES-NI compiler flags to AVX, and beyond, targets
It would already be supported by the -native targets. See openwall#5593
1 parent 6d6cebe commit 5059999

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Makefile.legacy

+12-12
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ linux-x86-64-avx512:
347347
$(MAKE_ORIG) $(PROJ) \
348348
JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o" \
349349
CFLAGS_MAIN="$(CFLAGS) -DJOHN_AVX512F -DHAVE_CRYPT" \
350-
CFLAGS="$(CFLAGS) -mavx512f -DHAVE_CRYPT" \
351-
ASFLAGS="$(ASFLAGS) -mavx512f" \
350+
CFLAGS="$(CFLAGS) -mavx512f -maes -mpclmul -DHAVE_CRYPT" \
351+
ASFLAGS="$(ASFLAGS) -mavx512f" -maes -mpclmul \
352352
LDFLAGS="$(LDFLAGS) -lcrypt"
353353

354354
linux-x86-64-avx2:
@@ -357,8 +357,8 @@ linux-x86-64-avx2:
357357
$(MAKE_ORIG) $(PROJ) \
358358
JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o" \
359359
CFLAGS_MAIN="$(CFLAGS) -DJOHN_AVX2 -DHAVE_CRYPT" \
360-
CFLAGS="$(CFLAGS) -mavx2 -DHAVE_CRYPT" \
361-
ASFLAGS="$(ASFLAGS) -mavx2" \
360+
CFLAGS="$(CFLAGS) -mavx2 -maes -mpclmul -DHAVE_CRYPT" \
361+
ASFLAGS="$(ASFLAGS) -mavx2" -maes -mpclmul \
362362
LDFLAGS="$(LDFLAGS) -lcrypt"
363363

364364
linux-x86-64-xop:
@@ -380,8 +380,8 @@ linux-x86-64-avx:
380380
$(MAKE_ORIG) $(PROJ) \
381381
JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o simd-intrinsics.o" \
382382
CFLAGS_MAIN="$(CFLAGS) -DJOHN_AVX -DHAVE_CRYPT -DHAVE_LIBDL" \
383-
CFLAGS="$(CFLAGS) -mavx -DHAVE_CRYPT -DHAVE_LIBDL" \
384-
ASFLAGS="$(ASFLAGS) -mavx" \
383+
CFLAGS="$(CFLAGS) -mavx -maes -mpclmul -DHAVE_CRYPT -DHAVE_LIBDL" \
384+
ASFLAGS="$(ASFLAGS) -mavx" -maes -mpclmul \
385385
LDFLAGS="$(LDFLAGS) -lcrypt -ldl"
386386
@echo "Failing after this point just means some helper tools did not build:"
387387
$(MAKE_ORIG) $(PROJ_PCAP)
@@ -566,8 +566,8 @@ linux-x86-avx512:
566566
$(MAKE_ORIG) $(PROJ) \
567567
JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o" \
568568
CFLAGS_MAIN="$(CFLAGS) -m32 -DJOHN_AVX512F -DHAVE_CRYPT" \
569-
CFLAGS="$(CFLAGS) -m32 -mavx512f -DHAVE_CRYPT" \
570-
ASFLAGS="$(ASFLAGS) -m32 -mavx512f" \
569+
CFLAGS="$(CFLAGS) -m32 -mavx512f -maes -mpclmul -DHAVE_CRYPT" \
570+
ASFLAGS="$(ASFLAGS) -m32 -mavx512f" -maes -mpclmul \
571571
LDFLAGS="$(LDFLAGS) -m32 -lcrypt"
572572

573573
linux-x86-avx2:
@@ -576,8 +576,8 @@ linux-x86-avx2:
576576
$(MAKE_ORIG) $(PROJ) \
577577
JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o" \
578578
CFLAGS_MAIN="$(CFLAGS) -m32 -DJOHN_AVX2 -DHAVE_CRYPT" \
579-
CFLAGS="$(CFLAGS) -m32 -mavx2 -DHAVE_CRYPT" \
580-
ASFLAGS="$(ASFLAGS) -m32 -mavx2" \
579+
CFLAGS="$(CFLAGS) -m32 -mavx2 -maes -mpclmul -DHAVE_CRYPT" \
580+
ASFLAGS="$(ASFLAGS) -m32 -mavx2" -maes -mpclmul \
581581
LDFLAGS="$(LDFLAGS) -m32 -lcrypt"
582582

583583
linux-x86-xop:
@@ -599,8 +599,8 @@ linux-x86-avx:
599599
$(MAKE_ORIG) $(PROJ) \
600600
JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o x86-sse.o simd-intrinsics.o" \
601601
CFLAGS_MAIN="$(CFLAGS) -m32 -DJOHN_AVX -DHAVE_CRYPT -D_LARGEFILE64_SOURCE" \
602-
CFLAGS="$(CFLAGS) -m32 -mavx -DHAVE_CRYPT" \
603-
ASFLAGS="$(ASFLAGS) -m32 -mavx" \
602+
CFLAGS="$(CFLAGS) -m32 -mavx -maes -mpclmul -DHAVE_CRYPT" \
603+
ASFLAGS="$(ASFLAGS) -m32 -mavx" -maes -mpclmul \
604604
LDFLAGS="$(LDFLAGS) -m32 -lcrypt"
605605
@echo "Failing after this point just means some helper tools did not build:"
606606
$(MAKE_ORIG) $(PROJ_PCAP) CFLAGS="$(CFLAGS) -m32"

0 commit comments

Comments
 (0)