]> git.sur5r.net Git - u-boot/blobdiff - Makefile
* Code cleanup:
[u-boot] / Makefile
index af1404292692b3216aedb64d1180a002e2c1fa11..b2231611ea33fd4172aa2d86a87dbd4f6500c1cd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -134,7 +134,8 @@ u-boot.dis: u-boot
                $(OBJDUMP) -d $< > $@
 
 u-boot:                depend subdirs $(OBJS) $(LIBS) $(LDSCRIPT)
-               $(LD) $(LDFLAGS) $(OBJS) \
+               UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
+               $(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
                        --start-group $(LIBS) --end-group \
                        -Map u-boot.map -o u-boot
 
@@ -741,7 +742,7 @@ ep7312_config       :       unconfig
 #########################################################################
 
 cradle_config  :       unconfig
-       @./mkconfig $(@:_config=) arm pxa cradle 
+       @./mkconfig $(@:_config=) arm pxa cradle
 
 csb226_config  :       unconfig
        @./mkconfig $(@:_config=) arm pxa csb226