scripts/build/debug/200-duma.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 03 09:50:16 2009 +0000 (2009-05-03)
branchnewlib
changeset 1366 5e5d1e6f55d3
parent 1238 73c8b86a05b1
child 1489 8c45efc97e7f
permissions -rw-r--r--
Update the newlib devel branch with stuff from /trunk@1498.

-------- diffstat follows --------
/devel/newlib/configure | 336 176 160 0 +++++++------
/devel/newlib/Makefile.in | 12 3 9 0 -
/devel/newlib/scripts/build/kernel/linux.sh | 2 1 1 0
/devel/newlib/scripts/build/internals.sh | 1 0 1 0 -
/devel/newlib/scripts/build/libc/eglibc.sh | 1 0 1 0 -
/devel/newlib/scripts/build/mpfr.sh | 2 1 1 0
/devel/newlib/scripts/functions | 111 5 106 0 ----
/devel/newlib/scripts/config.guess | 7 5 2 0 +
/devel/newlib/scripts/config.sub | 3 2 1 0 +
/devel/newlib/scripts/saveSample.sh.in | 4 2 2 0
/devel/newlib/docs/overview.txt | 8 6 2 0 +
/devel/newlib/samples/armeb-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/sh4-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-elf/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/armeb-unknown-eabi/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/arm-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/ia64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-e500v2-linux-gnuspe/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i686-nptl-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-iphone-linux-gnueabi/crosstool.config | 8 4 4 0
/devel/newlib/samples/armeb-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i586-geode-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-elf/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/powerpc-405-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-eabi/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/mipsel-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/alphaev56-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-860-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/config/kernel/linux.in | 108 2 106 0 ----
/devel/newlib/config/global/ct-behave.in | 22 13 9 0 +
/devel/newlib/config/global/download.in | 210 15 195 0 +-------
/devel/newlib/config/libc/glibc.in | 7 7 0 0 +
/devel/newlib/config/libc/glibc-eglibc.in-common | 15 14 1 0 +
45 files changed, 382 insertions(+), 839 deletions(-)
     1 # Build script for D.U.M.A.
     2 
     3 do_debug_duma_get() {
     4     CT_GetFile "duma_${CT_DUMA_VERSION}" http://mesh.dl.sourceforge.net/sourceforge/duma/
     5     # Downloading from sourceforge leaves garbage, cleanup
     6     CT_DoExecLog ALL rm -f "${CT_TARBALLS_DIR}/showfiles.php"*
     7 }
     8 
     9 do_debug_duma_extract() {
    10     CT_Extract "duma_${CT_DUMA_VERSION}"
    11     CT_Pushd "${CT_SRC_DIR}/duma_${CT_DUMA_VERSION}"
    12     # Even if DUMA uses _ and not -, crosstool-NG uses the dash to split the
    13     # name from the version in order to find the appropriate patches
    14     # YEM: FIXME: make CT_Patch more intelligent, Eg.: CT_Patch duma _ "${CT_DUMA_VERSION}"
    15     CT_DoExecLog DEBUG touch "${CT_SRC_DIR}/.duma-${CT_DUMA_VERSION}.extracted"
    16     CT_Patch "duma-${CT_DUMA_VERSION}" nochdir
    17     CT_Popd
    18 }
    19 
    20 do_debug_duma_build() {
    21     CT_DoStep INFO "Installing D.U.M.A."
    22     CT_DoLog EXTRA "Copying sources"
    23     cp -a "${CT_SRC_DIR}/duma_${CT_DUMA_VERSION}" "${CT_BUILD_DIR}/build-duma"
    24     CT_Pushd "${CT_BUILD_DIR}/build-duma"
    25 
    26     DUMA_CPP=
    27     [ "${CT_CC_LANG_CXX}" = "y" ] && DUMA_CPP=1
    28 
    29     # The shared library needs some love: some version have libduma.so.0.0,
    30     # while others have libduma.so.0.0.0
    31     duma_so=$(make -n -p 2>&1 |grep -E '^libduma.so[^:]*:' |head -n 1 |cut -d : -f 1)
    32 
    33     libs=
    34     [ "${CT_DUMA_A}" = "y" ] && libs="${libs} libduma.a"
    35     [ "${CT_DUMA_SO}" = "y" ] && libs="${libs} ${duma_so}"
    36     libs="${libs# }"
    37     CT_DoLog EXTRA "Building libraries '${libs}'"
    38     CT_DoExecLog ALL                    \
    39     make HOSTCC="${CT_BUILD}-gcc"       \
    40          CC="${CT_TARGET}-gcc"          \
    41          CXX="${CT_TARGET}-gcc"         \
    42          RANLIB="${CT_TARGET}-ranlib"   \
    43          DUMA_CPP="${DUMA_CPP}"         \
    44          ${libs}
    45     CT_DoLog EXTRA "Installing libraries '${libs}'"
    46     CT_DoExecLog ALL install -m 644 ${libs} "${CT_SYSROOT_DIR}/usr/lib"
    47     if [ "${CT_DUMA_SO}" = "y" ]; then
    48         CT_DoLog EXTRA "Installing shared library link"
    49         ln -vsf ${duma_so} "${CT_SYSROOT_DIR}/usr/lib/libduma.so"   2>&1 |CT_DoLog ALL
    50         CT_DoLog EXTRA "Installing wrapper script"
    51         mkdir -p "${CT_DEBUGROOT_DIR}/usr/bin"
    52         # Install a simpler, smaller, safer wrapper than the one provided by D.U.M.A.
    53         sed -r -e 's:^LIBDUMA_SO=.*:LIBDUMA_SO=/usr/lib/'"${duma_so}"':;'   \
    54             "${CT_LIB_DIR}/scripts/build/debug/duma.in"                     \
    55             >"${CT_DEBUGROOT_DIR}/usr/bin/duma"
    56         chmod 755 "${CT_DEBUGROOT_DIR}/usr/bin/duma"
    57     fi
    58 
    59     CT_Popd
    60     CT_EndStep
    61 }
    62