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 the dmalloc debug library facility
3 do_debug_dmalloc_get() {
4 CT_GetFile "dmalloc-${CT_DMALLOC_VERSION}" http://dmalloc.com/releases/
7 do_debug_dmalloc_extract() {
8 CT_Extract "dmalloc-${CT_DMALLOC_VERSION}"
9 CT_Patch "dmalloc" "${CT_DMALLOC_VERSION}"
12 do_debug_dmalloc_build() {
15 CT_DoStep INFO "Installing dmalloc"
16 CT_DoLog EXTRA "Configuring dmalloc"
18 mkdir -p "${CT_BUILD_DIR}/build-dmalloc"
19 cd "${CT_BUILD_DIR}/build-dmalloc"
21 case "${CT_CC_LANG_CXX}" in
22 y) extra_config+=("--enable-cxx");;
23 *) extra_config+=("--disable-cxx");;
25 case "${CT_THREADS}" in
26 none) extra_config+=("--disable-threads");;
27 *) extra_config+=("--enable-threads");;
29 case "${CT_SHARED_LIBS}" in
30 y) extra_config+=("--enable-shlib");;
31 *) extra_config+=("--disable-shlib");;
34 CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
36 LD="${CT_TARGET}-ld" \
37 AR="${CT_TARGET}-ar" \
40 "${CT_SRC_DIR}/dmalloc-${CT_DMALLOC_VERSION}/configure" \
42 --build="${CT_BUILD}" \
43 --host="${CT_TARGET}" \
46 CT_DoLog EXTRA "Building dmalloc"
49 CT_DoLog EXTRA "Installing dmalloc"
50 CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" installincs installlib
51 CT_DoExecLog ALL make DESTDIR="${CT_DEBUGROOT_DIR}" installutil