]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Restrict AES-NI support to ELF platforms for now
authorGreg Hudson <ghudson@mit.edu>
Fri, 10 Jan 2014 16:54:13 +0000 (11:54 -0500)
committerGreg Hudson <ghudson@mit.edu>
Fri, 10 Jan 2014 21:52:08 +0000 (16:52 -0500)
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

index 5e616b62d7538fb6372a5ea9b5d4efe229a874c8..b0b6c5addaab6d78bbd28f0a55899e09327440ea 100644 (file)
@@ -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