[uClibc]error building mipsel-linux gmon.c

Liam Girdwood liam.girdwood at wolfsonmicro.com
Tue Apr 15 12:55:08 UTC 2003


On Mon, 2003-04-14 at 20:27, Erik Andersen wrote:

> I see no reason why removing the __attribute_used__ should
> cause you any problems.  Perhaps we need to add in something
> like
> 
>     #if __GNUC__ <= 3 && __GNUC_MINOR__ <= 1
> 
> before adding the __attribute_used__?
> 

I agree, this would be the best solution. Here is the patch

diff -u -r1.1 machine-gmon.h
--- libc/sysdeps/linux/mips/bits/machine-gmon.h 3 Mar 2003 20:58:25
-0000      1.1
+++ libc/sysdeps/linux/mips/bits/machine-gmon.h 15 Apr 2003 12:58:40
-0000
@@ -17,8 +17,13 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
  
+#if  __GNUC__ <= 3 && __GNUC_MINOR__ <= 1
 #define _MCOUNT_DECL(frompc,selfpc) \
 static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
+#else
+#define _MCOUNT_DECL(frompc,selfpc) \
+static void __mcount (u_long frompc, u_long selfpc)
+#endif
  
 /* Call __mcount with our the return PC for our caller,
    and the return PC our caller will return to.  */



However, it may only apply to a cross gcc3.2. Has anyone tried building
the current CVS using a native gcc3.2 ?

Cheers

Liam

-- 
Liam Girdwood <liam.girdwood at wolfsonmicro.com>



Wolfson Microelectronics plc
http://www.wolfsonmicro.com
t: +44 131 272-7000
f: +44 131 272-7001
Registered in Scotland 89839

This message may contain confidential or proprietary information. If you receive this message in error, please
immediately delete it, destroy all copies of it and notify the sender. Any views expressed in this message are those of the individual sender,
except where the message states otherwise. We take reasonable precautions to ensure our Emails are virus free.
However, we cannot accept responsibility for any virus transmitted by us
and recommend that you subject any incoming Email to your own virus
checking procedures.



More information about the uClibc mailing list