summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/cc/gcc.in.214
-rw-r--r--scripts/build/cc/gcc.sh6
2 files changed, 20 insertions, 0 deletions
diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2
index 33cbbc5..d682769 100644
--- a/config/cc/gcc.in.2
+++ b/config/cc/gcc.in.2
@@ -51,3 +51,17 @@ config CC_GCC_SJLJ_EXCEPTIONS
It can happen that ./configure is wrong in some cases. Known
case is for ARM big endian, where you should say 'N'.
+
+config CC_GCC_LIBMUDFLAP
+ bool
+ prompt "Compile libmudflap"
+ default n
+ help
+ libmudflap is a pointer-use checking tool, which can detect
+ various mis-usages of pointers in C and (to some extents) C++.
+
+ You should say 'N' here, as libmduflap generates instrumented
+ code (thus it is a bit bigger and a bit slower) and requires
+ re-compilation and re-link, while it exists better run-time
+ alternatives (eg. DUMA, dmalloc...) that need neither re-
+ compilation nor re-link.
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index af21e96..f11517c 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -195,6 +195,7 @@ do_cc_core() {
--prefix="${core_prefix_dir}" \
--with-local-prefix="${CT_SYSROOT_DIR}" \
--disable-multilib \
+ --disable-libmudflap \
${CC_CORE_SYSROOT_ARG} \
"${extra_config[@]}" \
--disable-nls \
@@ -340,6 +341,11 @@ do_cc() {
if [ -n "${CC_ENABLE_CXX_FLAGS}" ]; then
extra_config+=("--enable-cxx-flags=${CC_ENABLE_CXX_FLAGS}")
fi
+ if [ "${CT_CC_GCC_LIBMUDFLAP}" = "y" ]; then
+ extra_config+=(--enable-libmudflap)
+ else
+ extra_config+=(--disable-libmudflap)
+ fi
# When companion libraries are build static (eg !shared),
# the libstdc++ is not pulled automatically, although it