Index: cpukit/ChangeLog
===================================================================
--- cpukit/ChangeLog	(revision db0df7b6df2415f3f218f9a893ac2d30d7e0b04a)
+++ cpukit/ChangeLog	(revision 93f7ea15e5df69c8a453d725126cde863898204a)
@@ -1,2 +1,9 @@
+2009-08-19	Joel Sherrill <joel.sherrill@OARcorp.com>
+
+	* sapi/include/confdefs.h, score/Makefile.am,
+	score/include/rtems/score/thread.h: Only instantiate
+	_Thread_Idle_body() if it is going ot be used.
+	* score/src/threadidlebody.c: Removed.
+
 2009-08-19	Joel Sherrill <joel.sherrill@OARcorp.com>
 
Index: cpukit/sapi/include/confdefs.h
===================================================================
--- cpukit/sapi/include/confdefs.h	(revision db0df7b6df2415f3f218f9a893ac2d30d7e0b04a)
+++ cpukit/sapi/include/confdefs.h	(revision 93f7ea15e5df69c8a453d725126cde863898204a)
@@ -324,4 +324,12 @@
     #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body
   #else
+    /* only instantiate and compile if used */
+    #ifdef CONFIGURE_INIT
+      void *_Thread_Idle_body(uintptr_t ignored)
+      {
+        for( ; ; ) ;
+        return 0;   /* to avoid warning */
+      }
+    #endif
     #define CONFIGURE_IDLE_TASK_BODY _Thread_Idle_body
   #endif
Index: cpukit/score/Makefile.am
===================================================================
--- cpukit/score/Makefile.am	(revision db0df7b6df2415f3f218f9a893ac2d30d7e0b04a)
+++ cpukit/score/Makefile.am	(revision 93f7ea15e5df69c8a453d725126cde863898204a)
@@ -149,13 +149,12 @@
     src/threadclearstate.c src/threadclose.c src/threadcreateidle.c \
     src/threaddelayended.c src/threaddispatch.c src/threadevaluatemode.c \
-    src/threadget.c src/threadhandler.c src/threadidlebody.c \
-    src/threadinitialize.c src/threadloadenv.c src/threadready.c \
-    src/threadresettimeslice.c src/threadreset.c src/threadrestart.c \
-    src/threadresume.c src/threadsetpriority.c src/threadsetstate.c \
-    src/threadsettransient.c src/threadstackallocate.c \
-    src/threadstackfree.c src/threadstart.c src/threadstartmultitasking.c \
-    src/threadsuspend.c src/threadtickletimeslice.c \
-    src/threadyieldprocessor.c src/iterateoverthreads.c \
-    src/threadblockingoperationcancel.c
+    src/threadget.c src/threadhandler.c src/threadinitialize.c \
+    src/threadloadenv.c src/threadready.c src/threadresettimeslice.c \
+    src/threadreset.c src/threadrestart.c src/threadresume.c \
+    src/threadsetpriority.c src/threadsetstate.c src/threadsettransient.c \
+    src/threadstackallocate.c src/threadstackfree.c src/threadstart.c \
+    src/threadstartmultitasking.c src/threadsuspend.c \
+    src/threadtickletimeslice.c src/threadyieldprocessor.c \
+    src/iterateoverthreads.c src/threadblockingoperationcancel.c
 
 ## THREAD_C_FILES only used by ITRON API
Index: cpukit/score/include/rtems/score/thread.h
===================================================================
--- cpukit/score/include/rtems/score/thread.h	(revision db0df7b6df2415f3f218f9a893ac2d30d7e0b04a)
+++ cpukit/score/include/rtems/score/thread.h	(revision 93f7ea15e5df69c8a453d725126cde863898204a)
@@ -776,4 +776,6 @@
 /**
  *  This routine is the body of the system idle thread.
+ *
+ *  NOTE: This routine is actually instantiated by confdefs.h when needed.
  */
 void *_Thread_Idle_body(
Index: cpukit/score/src/threadidlebody.c
===================================================================
--- cpukit/score/src/threadidlebody.c	(revision db0df7b6df2415f3f218f9a893ac2d30d7e0b04a)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
- *  Thread Handler
- *
- *
- *  COPYRIGHT (c) 1989-1999.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in found in the file LICENSE in this distribution or at
- *  http://www.rtems.com/license/LICENSE.
- *
- *  $Id$
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- *  _Thread_Idle_body
- *
- *  This kernel routine is the idle thread.  The idle thread runs any time
- *  no other thread is ready to run.  This thread loops forever with
- *  interrupts enabled.
- *
- *  Input parameters:
- *    ignored - this parameter is ignored
- *
- *  Output parameters:  NONE
- */
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE)
-void *_Thread_Idle_body(
-  uintptr_t  ignored
-)
-{
-  for( ; ; ) ;
-  return 0;   /* to avoid warning */
-}
-#endif
