[28162] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Restrict AES-NI support to ELF platforms for now

daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Jan 10 16:53:16 2014

Date: Fri, 10 Jan 2014 16:53:11 -0500
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201401102153.s0ALrBLA031326@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/220066d9544a1fb1d6100f18f3ada7265799e97b
commit 220066d9544a1fb1d6100f18f3ada7265799e97b
Author: Greg Hudson <ghudson@mit.edu>
Date:   Fri Jan 10 11:54:13 2014 -0500

    Restrict AES-NI support to ELF platforms for now
    
    Since we explicitly specify the ELF object format when building
    iaesx86.s or iaesx64.s, we need to restrict it to operating systems we
    know to be ELF platforms.  Otherwise we can break the build on OS X,
    which uses the Mach-O object format.
    
    ticket: 7812
    target_version: 1.12.1
    tags: pullup

 src/configure.in |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/configure.in b/src/configure.in
index 5e616b6..b0b6c5a 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -263,17 +263,22 @@ enable_aesni=check)
 if test "$CRYPTO_IMPL" = builtin -a "x$enable_aesni" != xno; then
     case "$host" in
     i686-*)
-	aesni_flags="-f elf32"
 	aesni_obj=iaesx86.o
+	aesni_machine=x86
 	;;
     x86_64-*)
-	# All Unix-like platforms need -D__linux__ for iaesx64.s to
-	# handle the System V x86-64 calling convention.
-	aesni_flags="-D__linux__ -f elf64"
 	aesni_obj=iaesx64.o
+	aesni_machine=amd64
+	;;
+    esac
+    case "$host" in
+    *-*-linux* | *-*-gnu* | *-*-*bsd* | *-*-solaris*)
+	# All Unix-like platforms need -D__linux__ for iaesx64.s to
+	# use the System V x86-64 calling convention.
+	aesni_flags="-D__linux__ -f elf -m $aesni_machine"
 	;;
     esac
-    if test "x$aesni_obj" != x; then
+    if test "x$aesni_obj" != x && test "x$aesni_flags" != x; then
 	AC_CHECK_PROG(YASM,yasm,yasm)
 	AC_CHECK_HEADERS(cpuid.h)
 	if test x"$YASM" != x -a "x$ac_cv_header_cpuid_h" = xyes; then
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post