debug/ltrace: fix building on x86 1.6
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Mar 06 16:05:20 2010 +0100 (2010-03-06)
branch1.6
changeset 1825019368610072
parent 1824 29f23b97a4ca
child 1826 26e53ab85f5e
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.
(transplanted from 55adc838cd68d3692e5eeeb38afb3d619b8b0c1a)
scripts/build/debug/400-ltrace.sh
     1.1 --- a/scripts/build/debug/400-ltrace.sh	Wed Feb 03 00:24:24 2010 +0100
     1.2 +++ b/scripts/build/debug/400-ltrace.sh	Sat Mar 06 16:05:20 2010 +0100
     1.3 @@ -22,6 +22,8 @@
     1.4  }
     1.5  
     1.6  do_debug_ltrace_build() {
     1.7 +    local ltrace_host
     1.8 +
     1.9      CT_DoStep INFO "Installing ltrace"
    1.10  
    1.11      CT_DoLog EXTRA "Copying sources to build dir"
    1.12 @@ -32,9 +34,14 @@
    1.13      CT_DoLog EXTRA "Configuring ltrace"
    1.14      # ltrace-0.5.3, and later, don't use GNU Autotools configure script anymore
    1.15      if [ "${CT_LTRACE_0_5_3_or_later}" = "y" ]; then
    1.16 -        CC=${CT_TARGET}-${CT_CC} \
    1.17 -        HOST=${CT_ARCH} \
    1.18 -        CFLAGS="${CT_TARGET_CFLAGS}" \
    1.19 +        case "${CT_ARCH}:${CT_ARCH_BITNESS}" in
    1.20 +            x86:32) ltrace_host="i386";;
    1.21 +            x86:64) ltrace_host="x86_64";;
    1.22 +            *)      ltrace_host="${CT_ARCH}";;
    1.23 +        esac
    1.24 +        CC="${CT_TARGET}-${CT_CC}"      \
    1.25 +        HOST="${ltrace_host}"           \
    1.26 +        CFLAGS="${CT_TARGET_CFLAGS}"    \
    1.27          CT_DoExecLog ALL ./configure --prefix=/usr
    1.28      else
    1.29          CT_DoExecLog ALL        \