This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RFA: Add a weak definition of mep_di to MeP's libgloss
- From: Nick Clifton <nickc at redhat dot com>
- To: dj at redhat dot com
- Cc: newlib at sourceware dot org
- Date: Wed, 04 Feb 2009 08:00:27 +0000
- Subject: RFA: Add a weak definition of mep_di to MeP's libgloss
Hi DJ,
Whilst trying to compile some of the gcc testsuite for the MeP
target I ran into a problem with libgloss. Specifically the
_handler_RESET function in libgloss/mep/h_reset.c references a
function called "mep_di" which does not seem to be defined
anywhere. My guess was that this is a board specific function to
disable interrupts, but since I was only using the simulator I was
not really concerned with interrupt handling.
So I created the patch below to add a weak, empty definition of the
mep_di function. With this patch applied I was able to compile and
link the gcc testsuite testcases.
What do you think. Is the patch suitable for application to the
libgloss sources or should there be some other way of providing the
mep_di function ?
Cheers
Nick
libgloss/ChangeLog
2009-02-04 Nick Clifton <nickc@redhat.com>
* mep/h_reset.c: Add a weak definition of mep_di.
Index: libgloss/mep/h_reset.c
===================================================================
RCS file: /cvs/src/src/libgloss/mep/h_reset.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 h_reset.c
*** libgloss/mep/h_reset.c 8 Feb 2007 21:22:05 -0000 1.1
--- libgloss/mep/h_reset.c 4 Feb 2009 07:58:53 -0000
***************
*** 13,18 ****
--- 13,22 ----
* the express permission of Red Hat, Inc.
*/
+ #pragma weak mep_di
+ void mep_di (void) __attribute__((section(".hwinit")));
+ void mep_di (void) { }
+
#pragma weak _handler_RESET
void _handler_RESET(void) __attribute__((section(".hwinit")));