From 58e9f838bba4457b8ad2723f1d13f74e77345996 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 7 Nov 2012 15:22:57 -0500 Subject: [PATCH] Revert "Fix: cross-build: configure.ac should use --target, not --host" This reverts commit 1eade46a854eb8211be9fd32e0cf6835576deb63. No. --target is for building cross-compilers. --host was appropriate. Signed-off-by: Mathieu Desnoyers --- README | 2 +- configure.ac | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README b/README index 9d154c5..81afe0e 100644 --- a/README +++ b/README @@ -17,7 +17,7 @@ BUILDING * CFLAGS="-m64 -g -O2" ./configure Forcing a 32-bit build with 386 backward compatibility: - * CFLAGS="-m32 -g -O2" ./configure --target=i386-pc-linux-gnu + * CFLAGS="-m32 -g -O2" ./configure --host=i386-pc-linux-gnu Forcing a 32-bit build for Sparcv9 (typical for Sparc v9) * CFLAGS="-m32 -Wa,-Av9a -g -O2" ./configure diff --git a/configure.ac b/configure.ac index 02ad272..4d0c7f4 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,7 @@ AC_FUNC_MMAP AC_CHECK_FUNCS([bzero gettimeofday munmap sched_getcpu strtoul sysconf]) # Find arch type -AS_CASE([$target_cpu], +AS_CASE([$host_cpu], [i386], [ARCHTYPE="x86" && SUBARCHTYPE="x86compat"], [i486], [ARCHTYPE="x86"], [i586], [ARCHTYPE="x86"], @@ -77,7 +77,7 @@ AS_IF([test "x$SUBARCHTYPE" = xx86compat],[ AC_DEFINE([CONFIG_RCU_COMPAT_ARCH], [1]) ]) -AS_IF([test "$target_cpu" = "armv7l"],[ +AS_IF([test "$host_cpu" = "armv7l"],[ CFLAGS="$CFLAGS -mcpu=cortex-a9 -mtune=cortex-a9 -O1" ]) @@ -105,7 +105,7 @@ AS_IF([test "x$ARCHTYPE" = "xx86"],[ #For now, using lock; addl compatibility mode even for i686, because the #Pentium III is seen as a i686, but lacks mfence instruction. #Only using fence for x86_64. - AS_IF([test "x$target_cpu" != "xi386" -a "x$target_cpu" != "xi486" -a "x$target_cpu" != "xi586" -a "x$target_cpu" != "xi686"],[ + AS_IF([test "x$host_cpu" != "xi386" -a "x$host_cpu" != "xi486" -a "x$host_cpu" != "xi586" -a "x$host_cpu" != "xi686"],[ AC_MSG_RESULT([yes]) AC_DEFINE([CONFIG_RCU_HAVE_FENCE], [1]) ],[ -- 2.34.1