scripts/build/internals.sh: compile wrapper with portable options.
static linking is not possible on MacOS, and unnessecary on other systems.
The old optimization and warning flags crash the gcc on MacOS
and (imho) are a bit overdone for this software.
1 # Build script for ltrace
3 do_debug_ltrace_get() {
4 CT_GetFile "ltrace_${CT_LTRACE_VERSION}.orig" .tar.gz \
5 {ftp,http}://ftp.de.debian.org/debian/pool/main/l/ltrace/
6 # Create a link so that the following steps are easier to do:
7 CT_Pushd "${CT_TARBALLS_DIR}"
8 ltrace_ext=$(CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig")
9 ln -sf "ltrace_${CT_LTRACE_VERSION}.orig${ltrace_ext}" \
10 "ltrace-${CT_LTRACE_VERSION}${ltrace_ext}"
14 do_debug_ltrace_extract() {
15 CT_Extract "ltrace-${CT_LTRACE_VERSION}"
16 CT_Patch "ltrace" "${CT_LTRACE_VERSION}"
19 do_debug_ltrace_build() {
22 CT_DoStep INFO "Installing ltrace"
24 CT_DoLog EXTRA "Copying sources to build dir"
25 CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}" \
26 "${CT_BUILD_DIR}/build-ltrace"
27 CT_Pushd "${CT_BUILD_DIR}/build-ltrace"
29 CT_DoLog EXTRA "Configuring ltrace"
30 # ltrace-0.5.3, and later, don't use GNU Autotools configure script anymore
31 if [ "${CT_LTRACE_0_5_3_or_later}" = "y" ]; then
32 case "${CT_ARCH}:${CT_ARCH_BITNESS}" in
33 x86:32) ltrace_host="i386";;
34 x86:64) ltrace_host="x86_64";;
35 powerpc:*) ltrace_host="ppc";;
36 *) ltrace_host="${CT_ARCH}";;
38 CC="${CT_TARGET}-${CT_CC}" \
39 HOST="${ltrace_host}" \
40 CFLAGS="${CT_TARGET_CFLAGS}" \
41 CT_DoExecLog ALL ./configure --prefix=/usr
50 CT_DoLog EXTRA "Building ltrace"
53 CT_DoLog EXTRA "Installing ltrace"
54 CT_DoExecLog ALL make DESTDIR="${CT_DEBUGROOT_DIR}" install