[Buildroot] [PATCH] gcc: provide an option to enable mudflap support

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Thu Jul 11 13:51:33 UTC 2013

The mudflap library is only useful if one uses the -fmudflap gcc
option, to do more checks on pointers/arrays, which is typically not
the case. Until now, it was always being built. This commit disables
it by default to save a little bit of build time, and provides an
option to enable it when needed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
 package/gcc/Config.in.host | 12 ++++++++++++
 package/gcc/gcc.mk         |  6 ++++++
 2 files changed, 18 insertions(+)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 0836f9f..86f7fdc 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -118,3 +118,15 @@ config BR2_GCC_ENABLE_OPENMP
 	depends on !BR2_PTHREADS_NONE && !BR2_avr32 && !BR2_arc
 	  Enable OpenMP support for the compiler
+	bool "Enable libmudflap support"
+	help
+	  libmudflap is a gcc library used for the mudflap pointer
+	  debugging functionality. It is only needed if you intend to
+	  use the -fmudflap gcc flag.
+	  See http://gcc.gnu.org/wiki/Mudflap_Pointer_Debugging and
+	  the help of the gcc -fmudflap option for more details.
+	  If you're unsure, leave this option disabled.
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index d3e9bc0..608fa95 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -117,6 +117,12 @@ else
 HOST_GCC_COMMON_CONF_OPT += --disable-tls
+HOST_GCC_COMMON_CONF_OPT += --enable-libmudflap
+HOST_GCC_COMMON_CONF_OPT += --disable-libmudflap
 ifeq ($(BR2_PTHREADS_NONE),y)
 	--disable-threads \

More information about the buildroot mailing list