This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Enable libmudflap for bfin-uclinux


I've committed the following patch, which enables mudflap on
bfin-uclinux.  The MFWRAP_SPEC needed overriding so that we always wrap
symbols the way mudflap expects for a static link (no real shared
libraries with flat-format binaries).

I've not enabled other *-uclinux targets, since they probably need the
same specs change.

Bootstrapped on i686-linux.


Bernd
-- 
This footer brought to you by insane German lawmakers.
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 125716)
+++ ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2007-06-14  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	* configure.ac: Don't add target-libmudflap to noconfigdirs for
+	bfin*-*-uclinux* targets.
+	* configure: Regenerate.
+
 2007-06-14  Ian Lance Taylor  <iant@google.com>
 
 	* MAINTAINERS: Add myself as non-algorithmic global write
Index: configure
===================================================================
--- configure	(revision 125716)
+++ configure	(working copy)
@@ -2075,7 +2075,7 @@ esac
 # Disable libmudflap on some systems.
 if test x$enable_libmudflap = x ; then
     case "${target}" in
-    *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+    *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | bfin*-*-uclinux*)
         # Enable libmudflap by default in GNU and friends.
 	;;
     *-*-freebsd*)
Index: configure.ac
===================================================================
--- configure.ac	(revision 125716)
+++ configure.ac	(working copy)
@@ -364,7 +364,7 @@ esac
 # Disable libmudflap on some systems.
 if test x$enable_libmudflap = x ; then
     case "${target}" in
-    *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+    *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | bfin*-*-uclinux*)
         # Enable libmudflap by default in GNU and friends.
 	;;
     *-*-freebsd*)
Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 125716)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2007-06-14  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	* config/bfin/uclinux.h (MFWRAP_SPEC): New.
+
 2007-06-14  Rask Ingemann Lambertsen  <rask@sygehus.dk>
 
 	PR target/32341
Index: gcc/config/bfin/uclinux.h
===================================================================
--- gcc/config/bfin/uclinux.h	(revision 125716)
+++ gcc/config/bfin/uclinux.h	(working copy)
@@ -43,3 +43,11 @@ asm (TEXT_SECTION_ASM_OP);
 	  }					\
     }						\
   while (0)
+
+/* Like the definition in gcc.c, but for purposes of uClinux, every link is
+   static.  */
+#define MFWRAP_SPEC " %{fmudflap|fmudflapth: \
+ --wrap=malloc --wrap=free --wrap=calloc --wrap=realloc\
+ --wrap=mmap --wrap=munmap --wrap=alloca\
+ %{fmudflapth: --wrap=pthread_create\
+}} %{fmudflap|fmudflapth: --wrap=main}"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]