All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/6 V4] common: Add symbol handling for generic lists into Makefile
Date: Sat, 20 Oct 2012 22:20:23 -0700	[thread overview]
Message-ID: <20121021052023.GA17937@bill-the-cat> (raw)
In-Reply-To: <201210202056.00725.marex@denx.de>

On Sat, Oct 20, 2012 at 08:56:00PM +0200, Marek Vasut wrote:
> Dear Tom Rini,
> 
> > 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?
> 
> I can ... shall I redo the patches just for the heck of it with no obvious 
> benefit at all ... when the $$UNDEF_SYM is removed in 5/5 anyway?

Well, 5/5 would have also been a little cleaner too, since you would
have just been re-using UNDEF_SYM (which it still is, a list of symbols
to mark as undefined), and if you did the lst regex first, it'd be a one
line change to the Makefile (if you keep the sort and uniq on a separate
line for readability).  I am however, not that evil.  But please do keep
in mind all the comments you receive and don't just discard them because
you discard the section later.  You might end up with nicer looking
final changes.

-- 
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/31eaa5dd/attachment.pgp>

  reply	other threads:[~2012-10-21  5:20 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-30  0:17 [U-Boot] [PATCH 0/5] Linker-generated arrays (take 2) Marek Vasut
2012-09-30  0:17 ` [U-Boot] [PATCH 1/5] common: Add symbol handling for generic lists into Makefile Marek Vasut
2012-10-02 23:40   ` Joe Hershberger
2012-09-30  0:17 ` [U-Boot] [PATCH 2/5] common: Implement support for linker-generated arrays Marek Vasut
2012-10-02 23:40   ` Joe Hershberger
2012-09-30  0:17 ` [U-Boot] [PATCH 3/5] common: Add .u_boot_list into all linker files Marek Vasut
2012-10-02 23:41   ` Joe Hershberger
2012-10-03 14:55   ` Daniel Schwierzeck
2012-10-03 15:01     ` Marek Vasut
2012-10-03 15:21       ` Daniel Schwierzeck
2012-10-03 16:44         ` Marek Vasut
2012-10-03 18:05           ` Daniel Schwierzeck
2012-10-03 20:49   ` [U-Boot] [PATCH 3/5 V2] " Marek Vasut
2012-09-30  0:17 ` [U-Boot] [PATCH 4/5] common: Convert the U-Boot commands to LG-arrays Marek Vasut
2012-10-02 23:43   ` Joe Hershberger
2012-09-30  0:17 ` [U-Boot] [PATCH 5/5] common: Discard the __u_boot_cmd section Marek Vasut
2012-10-02 23:43   ` Joe Hershberger
2012-10-03 14:56   ` Daniel Schwierzeck
2012-10-03 20:50   ` [U-Boot] [PATCH 5/5 V2] " Marek Vasut
2012-10-07  0:06 ` [U-Boot] [PATCH 0/6 V2] Linker-generated arrays (take 2) Marek Vasut
2012-10-07  0:06   ` [U-Boot] [PATCH 1/6 V2] common: Add symbol handling for generic lists into Makefile Marek Vasut
2012-10-07  0:06   ` [U-Boot] [PATCH 2/6 V2] common: Implement support for linker-generated arrays Marek Vasut
2012-10-07  0:06   ` [U-Boot] [PATCH 3/6 V2] common: Add .u_boot_list into all linker files Marek Vasut
2012-10-07  0:06   ` [U-Boot] [PATCH 4/6 V2] common: Convert the U-Boot commands to LG-arrays Marek Vasut
2012-10-07  0:06   ` [U-Boot] [PATCH 5/6 V2] common: Discard the __u_boot_cmd section Marek Vasut
2012-10-07  0:06   ` [U-Boot] [PATCH 6/6 V2] kerneldoc: tmpl: Implement template for LG-arrays Marek Vasut
2012-10-12 20:27   ` [U-Boot] [PATCH 0/6 V3] Linker-generated arrays (take 2) Marek Vasut
2012-10-12 20:27     ` [U-Boot] [PATCH 1/6 V3] common: Add symbol handling for generic lists into Makefile Marek Vasut
2012-10-14 23:28       ` Daniel Schwierzeck
2012-10-15  1:49         ` Marek Vasut
2012-10-15  2:04           ` Daniel Schwierzeck
2012-10-15  2:09             ` Marek Vasut
2012-10-17 10:43       ` [U-Boot] [PATCH 1/6 V4] " Marek Vasut
2012-10-18 19:40         ` Wolfgang Denk
2012-10-19 13:19           ` Marek Vasut
2012-10-20 17:46             ` Tom Rini
2012-10-20 18:56               ` Marek Vasut
2012-10-21  5:20                 ` Tom Rini [this message]
2012-10-19 15:00         ` [U-Boot] [PATCH 1/6 V5] " Marek Vasut
2012-10-19 15:45           ` Joe Hershberger
2012-10-19 15:48           ` Joe Hershberger
2012-10-22 21:04           ` Tom Rini
2012-10-12 20:27     ` [U-Boot] [PATCH 2/6 V3] common: Implement support for linker-generated arrays Marek Vasut
2012-10-12 20:27     ` [U-Boot] [PATCH 3/6 V3] common: Add .u_boot_list into all linker files Marek Vasut
2012-10-12 20:27     ` [U-Boot] [PATCH 4/6 V3] common: Convert the U-Boot commands to LG-arrays Marek Vasut
2012-10-12 20:27     ` [U-Boot] [PATCH 5/6 V3] common: Discard the __u_boot_cmd section Marek Vasut
2012-10-17 10:45       ` [U-Boot] [PATCH 5/6 V4] " Marek Vasut
2012-10-12 20:27     ` [U-Boot] [PATCH 6/6 V3] kerneldoc: tmpl: Implement template for LG-arrays Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121021052023.GA17937@bill-the-cat \
    --to=trini@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.