2007-07-12 13:34:56 +00:00
|
|
|
# Build script for strace
|
|
|
|
|
2017-10-01 01:47:35 +00:00
|
|
|
do_debug_strace_get()
|
|
|
|
{
|
2017-05-30 05:32:38 +00:00
|
|
|
CT_Fetch STRACE
|
2007-07-12 13:34:56 +00:00
|
|
|
}
|
|
|
|
|
2017-10-01 01:47:35 +00:00
|
|
|
do_debug_strace_extract()
|
|
|
|
{
|
2017-05-30 05:32:38 +00:00
|
|
|
CT_ExtractPatch STRACE
|
2007-07-12 13:34:56 +00:00
|
|
|
}
|
|
|
|
|
2017-10-01 01:47:35 +00:00
|
|
|
do_debug_strace_build()
|
|
|
|
{
|
2018-05-26 06:57:29 +00:00
|
|
|
local cflags="${CT_ALL_TARGET_CFLAGS}"
|
2017-10-01 01:47:35 +00:00
|
|
|
|
2007-07-12 13:34:56 +00:00
|
|
|
CT_DoStep INFO "Installing strace"
|
2017-01-09 07:01:52 +00:00
|
|
|
|
2017-10-01 01:47:35 +00:00
|
|
|
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__"
|
|
|
|
fi
|
|
|
|
|
2017-01-09 07:01:52 +00:00
|
|
|
CT_mkdir_pushd "${CT_BUILD_DIR}/build-strace"
|
2007-07-12 13:34:56 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Configuring strace"
|
2017-01-09 07:01:52 +00:00
|
|
|
CT_DoExecLog CFG \
|
2017-01-14 05:24:16 +00:00
|
|
|
CC="${CT_TARGET}-${CT_CC}" \
|
2017-10-01 01:47:35 +00:00
|
|
|
CFLAGS="${cflags}" \
|
2018-05-26 06:57:29 +00:00
|
|
|
LDFLAGS="${CT_ALL_TARGET_LDFLAGS}" \
|
2017-01-09 07:01:52 +00:00
|
|
|
CPP="${CT_TARGET}-cpp" \
|
|
|
|
LD="${CT_TARGET}-ld" \
|
2017-01-25 08:06:28 +00:00
|
|
|
${CONFIG_SHELL} \
|
2017-05-30 05:32:38 +00:00
|
|
|
"${CT_SRC_DIR}/strace/configure" \
|
2017-01-09 07:01:52 +00:00
|
|
|
--build=${CT_BUILD} \
|
|
|
|
--host=${CT_TARGET} \
|
2018-04-28 16:15:41 +00:00
|
|
|
--prefix=/usr \
|
|
|
|
--enable-mpers=check
|
2007-07-12 13:34:56 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Building strace"
|
2016-11-21 07:50:17 +00:00
|
|
|
CT_DoExecLog ALL make
|
2007-07-12 13:34:56 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Installing strace"
|
2016-11-21 07:50:17 +00:00
|
|
|
CT_DoExecLog ALL make DESTDIR="${CT_DEBUGROOT_DIR}" install
|
2007-07-12 13:34:56 +00:00
|
|
|
|
|
|
|
CT_Popd
|
|
|
|
CT_EndStep
|
|
|
|
}
|
|
|
|
|