From d10477877d2144b0a3d02a11a3a6fc8c9f22422d Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 5 Nov 2008 21:50:11 +0000 Subject: [PATCH] 2008-11-05 Joel Sherrill * score/src/threadhandler.c: M32R uses different name for init. --- cpukit/ChangeLog | 4 ++++ cpukit/score/src/threadhandler.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 551c595bfc..d3107a8ceb 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,7 @@ +2008-11-05 Joel Sherrill + + * score/src/threadhandler.c: M32R uses different name for init. + 2008-11-05 Joel Sherrill * posix/Makefile.am: Add _execve() so we can use newlib posix support diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c index 22c9f141cc..cc46f9801a 100644 --- a/cpukit/score/src/threadhandler.c +++ b/cpukit/score/src/threadhandler.c @@ -35,7 +35,13 @@ #endif #if defined(__USE_INIT_FINI__) - extern void _init(void); + #if defined(__M32R__) + #define INIT_NAME __init + #else + #define INIT_NAME _init + #endif + + extern void INIT_NAME(void); #endif #if defined(__USE__MAIN__) extern void _main(void); @@ -131,7 +137,7 @@ void _Thread_Handler( void ) */ if (!doneCons) /* && (volatile void *)_init) */ { - _init (); + INIT_NAME (); } #endif #if defined(__USE__MAIN__)