[U-Boot] [PATCH 1/6 V4] common: Add symbol handling for generic lists into Makefile

Tom Rini trini at ti.com
Sat Oct 20 19:46:22 CEST 2012


On Fri, Oct 19, 2012 at 03:19:19PM +0200, Marek Vasut wrote:
> Dear Wolfgang Denk,
> 
> [...]
> 
> > Maybe we can sae one call to objdump by storing the intermediate
> > result?
> 
> I removed the other call in subsequent patch anyway, so this is fine now.
> 
> > > +		cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \
> > > +			$$UNDEF_SYM $$UNDEF_LST $(__OBJS) \
> > 
> > Hm.... we use UNDEF_SYM and UNDEF_LST in exactly the same way?  The
> > why cannot we do this all in a single run, like:
> > 
> > 	UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
> > 	sed  -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p' \
> > 		-e 's/.*\($(SYM_PREFIX)_u_boot_list_.*\)/-u\1/p' | sort | uniq`;
> \
> > 	cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM $(__OBJS) \
> > 	...
> > 
> > ?
> 
> See above, otherwise I do agree.

It's not a big deal, in the end.  But, why can't you dump the file once
and pass two regexps to sed rather than dump it twice, regex it twice
and reference two variables?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121020/75518667/attachment.pgp>


More information about the U-Boot mailing list