[U-Boot] [PATCH] ppc: Move conditional compilation of kgdb.c to Makefile

Peter Tyser ptyser at xes-inc.com
Wed Nov 4 06:31:07 CET 2009


Signed-off-by: Peter Tyser <ptyser at xes-inc.com>
---
 lib_ppc/Makefile |    2 +-
 lib_ppc/kgdb.c   |    5 -----
 2 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/lib_ppc/Makefile b/lib_ppc/Makefile
index 452107c..68b70b0 100644
--- a/lib_ppc/Makefile
+++ b/lib_ppc/Makefile
@@ -35,7 +35,7 @@ COBJS-y	+= bootm.o
 COBJS-y	+= cache.o
 COBJS-y	+= extable.o
 COBJS-y	+= interrupts.o
-COBJS-y	+= kgdb.o
+COBJS-$(CONFIG_CMD_KGDB) += kgdb.o
 COBJS-y	+= time.o
 
 SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
diff --git a/lib_ppc/kgdb.c b/lib_ppc/kgdb.c
index 78c2f0c..d3eb1f3 100644
--- a/lib_ppc/kgdb.c
+++ b/lib_ppc/kgdb.c
@@ -1,8 +1,5 @@
 #include <common.h>
 #include <command.h>
-
-#if defined(CONFIG_CMD_KGDB)
-
 #include <kgdb.h>
 #include <asm/signal.h>
 #include <asm/processor.h>
@@ -322,5 +319,3 @@ kgdb_breakpoint(int argc, char *argv[])
 	     breakinst: .long 0x7d821008\n\
 	    ");
 }
-
-#endif
-- 
1.6.2.1



More information about the U-Boot mailing list