Add D.U.M.A., the Electric Fence successor.
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/config/debug/duma.in Thu Jul 12 08:47:15 2007 +0000
1.3 @@ -0,0 +1,44 @@
1.4 +# D.U.M.A. - Detect Unintended Memory Access - Memory checker
1.5 +
1.6 +menuconfig DUMA
1.7 + bool
1.8 + prompt "D.U.M.A."
1.9 + default n
1.10 + depends on EXPERIMENTAL
1.11 + help
1.12 + D.U.M.A. - Detect Unintended Memory Access
1.13 + A memory bound checker, with additional features.
1.14 + Formerly known as Electric Fence.
1.15 +
1.16 +if DUMA
1.17 +
1.18 +config DUMA_A
1.19 + bool
1.20 + prompt "Build a static library"
1.21 + default y
1.22 +
1.23 +config DUMA_SO
1.24 + bool
1.25 + prompt "Build a shared library"
1.26 + default y if SHARED_LIBS
1.27 + default n if ! SHARED_LIBS
1.28 +
1.29 +choice
1.30 + bool
1.31 + prompt "D.U.M.A. version"
1.32 +
1.33 +config DUMA_V_2_5_1
1.34 + bool
1.35 + prompt "2_5_1"
1.36 +
1.37 +# CT_INSERT_VERSION_ABOVE
1.38 +# Don't remove above line!
1.39 +endchoice
1.40 +
1.41 +config DUMA_VERSION
1.42 + string
1.43 + default "2_5_1" if DUMA_V_2_5_1
1.44 +# CT_INSERT_VERSION_STRING_ABOVE
1.45 +# Don't remove above line!
1.46 +
1.47 +endif
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/duma/2_5_1/100-cross-compile.patch Thu Jul 12 08:47:15 2007 +0000
2.3 @@ -0,0 +1,110 @@
2.4 +diff -dur duma_2_5_1/Makefile duma_2_5_1.orig/Makefile
2.5 +--- duma_2_5_1/Makefile 2006-06-18 06:02:13.000000000 +0200
2.6 ++++ duma_2_5_1.orig/Makefile 2007-07-11 17:49:43.000000000 +0200
2.7 +@@ -98,10 +98,6 @@
2.8 + LIBS=-lpthread
2.9 + endif
2.10 +
2.11 +-
2.12 +-CC=gcc
2.13 +-CXX=g++
2.14 +-AR=ar
2.15 + INSTALL=install
2.16 +
2.17 + ############################################################
2.18 +@@ -169,31 +165,31 @@
2.19 +
2.20 + createconf: createconf.o
2.21 + - rm -f createconf
2.22 +- $(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf
2.23 ++ $(HOSTCC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf
2.24 +
2.25 + tstheap: libduma.a tstheap.o
2.26 + - rm -f tstheap
2.27 +- $(CC) $(CFLAGS) tstheap.o libduma.a -o tstheap $(LIBS)
2.28 ++ $(HOSTCC) $(CFLAGS) tstheap.o libduma.a -o tstheap $(LIBS)
2.29 +
2.30 + dumatest: libduma.a dumatest.o
2.31 + - rm -f dumatest
2.32 +- $(CC) $(CFLAGS) dumatest.o libduma.a -o dumatest $(LIBS)
2.33 ++ $(HOSTCC) $(CFLAGS) dumatest.o libduma.a -o dumatest $(LIBS)
2.34 +
2.35 + dumatestpp: libduma.a dumatestpp.o dumapp.h
2.36 + - rm -f dumatestpp
2.37 +- $(CXX) $(CPPFLAGS) dumatestpp.o libduma.a -o dumatestpp $(LIBS)
2.38 ++ $(HOSTCXX) $(CPPFLAGS) dumatestpp.o libduma.a -o dumatestpp $(LIBS)
2.39 +
2.40 + testoperators: libduma.a testoperators.o dumapp.h
2.41 + - rm -f testoperators
2.42 +- $(CXX) $(CPPFLAGS) testoperators.o libduma.a -o testoperators $(LIBS)
2.43 ++ $(HOSTCXX) $(CPPFLAGS) testoperators.o libduma.a -o testoperators $(LIBS)
2.44 +
2.45 + tstheap_so: tstheap_so.o
2.46 + - rm -f tstheap_so
2.47 +- $(CC) $(CFLAGS) tstheap_so.o -o tstheap_so $(LIBS)
2.48 ++ $(HOSTCC) $(CFLAGS) tstheap_so.o -o tstheap_so $(LIBS)
2.49 +
2.50 + dumatestpp_so: dumatestpp_so.o
2.51 + - rm -f dumatestpp_so
2.52 +- $(CXX) $(CPPFLAGS) dumatestpp_so.o -o dumatestpp_so $(LIBS)
2.53 ++ $(HOSTCXX) $(CPPFLAGS) dumatestpp_so.o -o dumatestpp_so $(LIBS)
2.54 +
2.55 +
2.56 + $(OBJECTS) tstheap.o dumatest.o dumatestpp.o: duma.h
2.57 +@@ -211,7 +207,7 @@
2.58 + # define rules how to build objects for createconf
2.59 + #
2.60 + createconf.o:
2.61 +- $(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
2.62 ++ $(HOSTCC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
2.63 +
2.64 +
2.65 + #
2.66 +@@ -230,13 +226,6 @@
2.67 + print_so.o: print.c print.h
2.68 + $(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c print.c -o $@
2.69 +
2.70 +-# DUMA_SO_OPTIONS needed cause duma.h is included explicitly
2.71 +-tstheap_so.o:
2.72 +- $(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c tstheap.c -o $@
2.73 +-
2.74 +-dumatestpp_so.o:
2.75 +- $(CXX) $(CPPFLAGS) $(DUMA_SO_OPTIONS) -c dumatestpp.cpp -o $@
2.76 +-
2.77 + #
2.78 + # define rules how to build objects for static library
2.79 + #
2.80 +@@ -259,17 +248,23 @@
2.81 + #
2.82 +
2.83 + dumatest.o: dumatest.c duma.h duma_config.h
2.84 +- $(CC) $(CFLAGS) -c dumatest.c -o $@
2.85 ++ $(HOSTCC) $(CFLAGS) -c dumatest.c -o $@
2.86 +
2.87 + dumatestpp.o: dumatestpp.cpp duma.h dumapp.h duma_config.h
2.88 +- $(CXX) $(CPPFLAGS) -c dumatestpp.cpp -o $@
2.89 ++ $(HOSTCXX) $(CPPFLAGS) -c dumatestpp.cpp -o $@
2.90 +
2.91 + tstheap.o: tstheap.c duma.h duma_config.h
2.92 +- $(CC) $(CFLAGS) -c tstheap.c -o $@
2.93 ++ $(HOSTCC) $(CFLAGS) -c tstheap.c -o $@
2.94 +
2.95 + testoperators.o: testoperators.cpp duma.h dumapp.h duma_config.h
2.96 +- $(CXX) $(CPPFLAGS) -c testoperators.cpp -o $@
2.97 ++ $(HOSTCXX) $(CPPFLAGS) -c testoperators.cpp -o $@
2.98 ++
2.99 ++# DUMA_SO_OPTIONS needed cause duma.h is included explicitly
2.100 ++tstheap_so.o:
2.101 ++ $(HOSTCC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c tstheap.c -o $@
2.102 +
2.103 ++dumatestpp_so.o:
2.104 ++ $(HOSTCXX) $(CPPFLAGS) $(DUMA_SO_OPTIONS) -c dumatestpp.cpp -o $@
2.105 +
2.106 + #
2.107 + # default rules
2.108 +@@ -280,5 +275,3 @@
2.109 + #.cpp.o:
2.110 + # $(CXX) $(CPPFLAGS) -c $< -o $@
2.111 + #
2.112 +-
2.113 +-
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/patches/duma/2_5_1/200-separate_cpp.patch Thu Jul 12 08:47:15 2007 +0000
3.3 @@ -0,0 +1,20 @@
3.4 +diff -dur duma_2_5_1.orig/Makefile duma_2_5_1/Makefile
3.5 +--- duma_2_5_1.orig/Makefile 2007-07-11 17:49:43.000000000 +0200
3.6 ++++ duma_2_5_1/Makefile 2007-07-11 17:50:46.000000000 +0200
3.7 +@@ -115,9 +115,14 @@
3.8 + dumatest.c tstheap.c dumatestpp.cpp testoperators.cpp \
3.9 + createconf.c
3.10 +
3.11 +-OBJECTS = dumapp.o duma.o sem_inc.o print.o
3.12 ++OBJECTS = duma.o sem_inc.o print.o
3.13 ++SO_OBJECTS = duma_so.o sem_inc_so.o print_so.o
3.14 ++
3.15 ++ifeq ($(DUMA_CPP),1)
3.16 ++OBJECTS += dumapp.o
3.17 ++SO_OBJECTS += dumapp_so.o
3.18 ++endif
3.19 +
3.20 +-SO_OBJECTS = dumapp_so.o duma_so.o sem_inc_so.o print_so.o
3.21 +
3.22 + all: libduma.a $(DUMASO) tstheap dumatest dumatestpp testoperators tstheap_so dumatestpp_so
3.23 + @ echo "Testing DUMA."
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/scripts/build/debug/duma.sh Thu Jul 12 08:47:15 2007 +0000
4.3 @@ -0,0 +1,64 @@
4.4 +# Biuld script for D.U.M.A.
4.5 +
4.6 +is_enabled="${CT_DUMA}"
4.7 +
4.8 +do_print_filename() {
4.9 + [ "${CT_DUMA}" = "y" ] || return 0
4.10 + echo "duma_${CT_DUMA_VERSION}"
4.11 +}
4.12 +
4.13 +do_debug_duma_get() {
4.14 + CT_GetFile "duma_${CT_DUMA_VERSION}" http://mesh.dl.sourceforge.net/sourceforge/duma/
4.15 + # D.U.M.A. doesn't separate its name from its version with a dash,
4.16 + # but with an underscore. Create a link so that crosstool-NG can
4.17 + # work correctly:
4.18 + cd "${CT_TARBALLS_DIR}"
4.19 + duma_ext=`CT_GetFileExtension "duma_${CT_DUMA_VERSION}"`
4.20 + rm -f "duma-${CT_DUMA_VERSION}${duma_ext}"
4.21 + ln -sf "duma_${CT_DUMA_VERSION}${duma_ext}" "duma-${CT_DUMA_VERSION}${duma_ext}"
4.22 +}
4.23 +
4.24 +do_debug_duma_extract() {
4.25 + CT_ExtractAndPatch "duma-${CT_DUMA_VERSION}"
4.26 + cd "${CT_SRC_DIR}"
4.27 + rm -f "duma-${CT_DUMA_VERSION}"
4.28 + ln -sf "duma_${CT_DUMA_VERSION}" "duma-${CT_DUMA_VERSION}"
4.29 +}
4.30 +
4.31 +do_debug_duma_build() {
4.32 + CT_DoStep INFO "Installing D.U.M.A."
4.33 + CT_DoLog EXTRA "Copying sources"
4.34 + cp -a "${CT_SRC_DIR}/duma_${CT_DUMA_VERSION}" "${CT_BUILD_DIR}/build-duma"
4.35 + CT_Pushd "${CT_BUILD_DIR}/build-duma"
4.36 +
4.37 + DUMA_CPP=
4.38 + [ "${CT_CC_LANG_CXX}" = "y" ] && DUMA_CPP=1
4.39 +
4.40 + libs=
4.41 + [ "${CT_DUMA_A}" = "y" ] && libs="${libs} libduma.a"
4.42 + [ "${CT_DUMA_SO}" = "y" ] && libs="${libs} libduma.so.0.0"
4.43 + for lib in ${libs}; do
4.44 + CT_DoLog EXTRA "Building library \"${lib}\""
4.45 + make HOSTCC="${CT_CC_NATIVE}" \
4.46 + HOSTCXX="${CT_CC_NATIVE}" \
4.47 + CC="${CT_TARGET}-gcc" \
4.48 + CXX="${CT_TARGET}-gcc" \
4.49 + DUMA_CPP="${DUMA_CPP}" \
4.50 + ${lib} 2>&1 |CT_DoLog ALL
4.51 + CT_DoLog EXTRA "Installing library \"${lib}\""
4.52 + install -m 644 "${lib}" "${CT_SYSROOT_DIR}/usr/lib" 2>&1 |CT_DoLog ALL
4.53 + done
4.54 + if [ "${CT_DUMA_SO}" = "y" ]; then
4.55 + CT_DoLog EXTRA "Installing shared library links"
4.56 + ln -vsf libduma.so.0.0 "${CT_SYSROOT_DIR}/usr/lib/libduma.so.0" 2>&1 |CT_DoLog ALL
4.57 + ln -vsf libduma.so.0.0 "${CT_SYSROOT_DIR}/usr/lib/libduma.so" 2>&1 |CT_DoLog ALL
4.58 + fi
4.59 + CT_DoLog EXTRA "Installing LD_PRELOAD wrapper script"
4.60 + mkdir -p "${CT_DEBUG_INSTALL_DIR}/usr/bin"
4.61 + cp -v duma.sh \
4.62 + "${CT_DEBUG_INSTALL_DIR}/usr/bin/duma" 2>&1 |CT_DoLog ALL
4.63 +
4.64 + CT_EndStep
4.65 + CT_Popd
4.66 +}
4.67 +
5.1 --- a/tools/addToolVersion.sh Thu Jul 12 08:46:50 2007 +0000
5.2 +++ b/tools/addToolVersion.sh Thu Jul 12 08:47:15 2007 +0000
5.3 @@ -8,7 +8,7 @@
5.4 Usage: ${myname} <tool> [option] <version>
5.5 'tool' in one of:
5.6 --gcc, --binutils, --glibc, --uClibc, --linux,
5.7 - --gdb, --dmalloc
5.8 + --gdb, --dmalloc, --duma
5.9
5.10 Valid options for all tools:
5.11 --experimental, -x
5.12 @@ -55,6 +55,7 @@
5.13 --linux) cat=KERNEL; tool=linux; tool_prefix=kernel_; tool_suffix=;;
5.14 --gdb) cat=GDB; tool=gdb; tool_prefix=debug/ tool_suffix=;;
5.15 --dmalloc) cat=DMALLOC; tool=dmalloc; tool_prefix=debug/ tool_suffix=;;
5.16 + --duma) cat=DUMA; tool=duma; tool_prefix=debug/ tool_suffix=;;
5.17 # Tools options:
5.18 -x|--experimental) EXP=1; OBS=;;
5.19 -o|--obsolete) OBS=1; EXP=;;