From ecfc6d2e2d2ca5690c35a425dd40acfa8469eb96 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sat, 6 Mar 2010 16:05:20 +0100 Subject: debug/ltrace: fix building on x86 ltrace uses i386 and x86_64, whereas crosstool-NG use x86 for both cases. Fix that by detecting what bitness we're building for, and pass appropriate i386 or x86_64 to ltrace's configure. diff --git a/scripts/build/debug/400-ltrace.sh b/scripts/build/debug/400-ltrace.sh index 7c017e5..72f16f0 100644 --- a/scripts/build/debug/400-ltrace.sh +++ b/scripts/build/debug/400-ltrace.sh @@ -22,6 +22,8 @@ do_debug_ltrace_extract() { } do_debug_ltrace_build() { + local ltrace_host + CT_DoStep INFO "Installing ltrace" CT_DoLog EXTRA "Copying sources to build dir" @@ -32,9 +34,14 @@ do_debug_ltrace_build() { CT_DoLog EXTRA "Configuring ltrace" # ltrace-0.5.3, and later, don't use GNU Autotools configure script anymore if [ "${CT_LTRACE_0_5_3_or_later}" = "y" ]; then - CC=${CT_TARGET}-${CT_CC} \ - HOST=${CT_ARCH} \ - CFLAGS="${CT_TARGET_CFLAGS}" \ + case "${CT_ARCH}:${CT_ARCH_BITNESS}" in + x86:32) ltrace_host="i386";; + x86:64) ltrace_host="x86_64";; + *) ltrace_host="${CT_ARCH}";; + esac + CC="${CT_TARGET}-${CT_CC}" \ + HOST="${ltrace_host}" \ + CFLAGS="${CT_TARGET_CFLAGS}" \ CT_DoExecLog ALL ./configure --prefix=/usr else CT_DoExecLog ALL \ -- cgit v0.10.2-6-g49f6