summaryrefslogtreecommitdiff
path: root/scripts/build/debug/400-ltrace.sh
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-03-06 15:05:20 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-03-06 15:05:20 (GMT)
commitecfc6d2e2d2ca5690c35a425dd40acfa8469eb96 (patch)
tree073ad79dfef2c7c701564de751b3e90b79f44ffb /scripts/build/debug/400-ltrace.sh
parentca9b06fbe64f25f0b983cb1ddd85962cfbf38a17 (diff)
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.
Diffstat (limited to 'scripts/build/debug/400-ltrace.sh')
-rw-r--r--scripts/build/debug/400-ltrace.sh13
1 files changed, 10 insertions, 3 deletions
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 \