Commit 4e8e6d70 authored by Niels Möller's avatar Niels Möller
Browse files

(ABI): Detect which ABI the compiler is using.

On x86_64, also check for __arch64__.

Rev: nettle/ChangeLog:1.68
Rev: nettle/configure.ac:1.16
parent 69c38ef5
2010-03-29 Niels Mller <nisse@lysator.liu.se>
* configure.ac (ABI): Detect which ABI the compiler is using.
On x86_64, also check for __arch64__.
2010-03-28 Niels Mller <nisse@lysator.liu.se> 2010-03-28 Niels Mller <nisse@lysator.liu.se>
* configure.ac (asm_path): For x86_64, check if compiler is * configure.ac (asm_path): For x86_64, check if compiler is
......
...@@ -116,21 +116,19 @@ if test x$enable_dependency_tracking = xyes ; then ...@@ -116,21 +116,19 @@ if test x$enable_dependency_tracking = xyes ; then
]) ])
fi fi
# Select assembler code # Figure out ABI. Currently, configurable only be setting CFLAGS.
asm_path= ABI=standard
case "$host_cpu" in case "$host_cpu" in
[i?86* | k[5-8]* | pentium* | athlon])
asm_path=x86
;;
[x86_64 | amd64]) [x86_64 | amd64])
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#if defined(__i386__) #if defined(__x86_64__) || defined(__arch64__)
#error 32-bit x86 #error 64-bit x86
#endif #endif
], [], [ ], [], [
asm_path=x86_64 ABI=32
], [ ], [
asm_path=x86 ABI=64
]) ])
;; ;;
*sparc*) *sparc*)
...@@ -139,11 +137,38 @@ case "$host_cpu" in ...@@ -139,11 +137,38 @@ case "$host_cpu" in
#error 64-bit sparc #error 64-bit sparc
#endif #endif
], [], [ ], [], [
asm_path=sparc32 ABI=32
], [ ], [
asm_path=sparc64 ABI=64
]) ])
;; ;;
esac
if test "x$ABI" != xstandard ; then
AC_MSG_NOTICE([Compiler uses $ABI-bit ABI. To change, set CFLAGS.])
AC_MSG_NOTICE([You may want to set libdir!])
fi
# Select assembler code
asm_path=
case "$host_cpu" in
[i?86* | k[5-8]* | pentium* | athlon])
asm_path=x86
;;
[x86_64 | amd64])
if test "x$ABI" = 64 ; then
asm_path=x86_64
else
asm_path=x86
fi
;;
*sparc*)
if test "x$ABI" = 64 ; then
asm_path=sparc64
else
asm_path=sparc32
fi
;;
*) *)
enable_assembler=no enable_assembler=no
;; ;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment