Skip to contentSkip to conversation

gcc: provide an option to enable mudflap support

PATCH New Thomas Petazzoni 2 participants 2 messages Jul 11, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gcc: provide an option to enable mudflap support

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.

---
 package/gcc/Config.in.host | 12 ++++++++++++
 package/gcc/gcc.mk         |  6 ++++++
 2 files changed, 18 insertions(+)
package/gcc/Config.in.host +12 -0
index 0836f9f..86f7fdc 100644
@@ -118,3 +118,15 @@ config BR2_GCC_ENABLE_OPENMP
 	depends on !BR2_PTHREADS_NONE && !BR2_avr32 && !BR2_arc
 	help
 	  Enable OpenMP support for the compiler
+
+config BR2_GCC_ENABLE_LIBMUDFLAP
+	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.
package/gcc/gcc.mk +6 -0
index d3e9bc0..608fa95 100644
@@ -117,6 +117,12 @@ else
 HOST_GCC_COMMON_CONF_OPT += --disable-tls
 endif
 
+ifeq ($(BR2_GCC_ENABLE_LIBMUDFLAP),y)
+HOST_GCC_COMMON_CONF_OPT += --enable-libmudflap
+else
+HOST_GCC_COMMON_CONF_OPT += --disable-libmudflap
+endif
+
 ifeq ($(BR2_PTHREADS_NONE),y)
 HOST_GCC_COMMON_CONF_OPT += \
 	--disable-threads \
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 gcc: provide an option to enable mudflap support

Quoted 7 lines · Thomas Petazzoni

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.

Nobody used it i think because libmudfap*.so* isn't copied to the target and it won't work without it.
V2 incoming? ;)
Regards.