diff options
Diffstat (limited to 'scripts/build/debug/500-strace.sh')
-rw-r--r-- | scripts/build/debug/500-strace.sh | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/scripts/build/debug/500-strace.sh b/scripts/build/debug/500-strace.sh index 6eb2357..c28af35 100644 --- a/scripts/build/debug/500-strace.sh +++ b/scripts/build/debug/500-strace.sh @@ -1,32 +1,44 @@ # Build script for strace -do_debug_strace_get() { - local base_url="http://downloads.sourceforge.net/project/strace/strace" - CT_GetFile "strace-${CT_STRACE_VERSION}" "${base_url}/${CT_STRACE_VERSION}" - # Downloading from sourceforge leaves garbage, cleanup - CT_DoExecLog ALL rm -f "${CT_TARBALLS_DIR}/showfiles.php"* +do_debug_strace_get() +{ + CT_Fetch STRACE } -do_debug_strace_extract() { - CT_Extract "strace-${CT_STRACE_VERSION}" - CT_Patch "strace" "${CT_STRACE_VERSION}" +do_debug_strace_extract() +{ + CT_ExtractPatch STRACE } -do_debug_strace_build() { +do_debug_strace_build() +{ + local cflags="${CT_ALL_TARGET_CFLAGS}" + CT_DoStep INFO "Installing strace" + if [ "${CT_LIBC_MUSL}" = "y" ]; then + # Otherwise kernel headers cause errors when included, e.g. + # <netinet/in.h> and <linux/in6.h>. Kernel's libc-compat.h + # only cares about GLIBC. uClibc-ng does the same + # internally, pretending it's GLIBC for kernel headers inclusion. + cflags+=" -D__GLIBC__ -D__USE_MISC" + fi + CT_mkdir_pushd "${CT_BUILD_DIR}/build-strace" CT_DoLog EXTRA "Configuring strace" CT_DoExecLog CFG \ CC="${CT_TARGET}-${CT_CC}" \ + CFLAGS="${cflags}" \ + LDFLAGS="${CT_ALL_TARGET_LDFLAGS}" \ CPP="${CT_TARGET}-cpp" \ LD="${CT_TARGET}-ld" \ ${CONFIG_SHELL} \ - "${CT_SRC_DIR}/strace-${CT_STRACE_VERSION}/configure" \ + "${CT_SRC_DIR}/strace/configure" \ --build=${CT_BUILD} \ --host=${CT_TARGET} \ - --prefix=/usr + --prefix=/usr \ + --enable-mpers=check CT_DoLog EXTRA "Building strace" CT_DoExecLog ALL make |