From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Wed, 10 Nov 2010 01:57:30 -0500 Subject: [U-Boot] [PATCH] Switch from archive libraries to partial linking In-Reply-To: <1289253872-16891-1-git-send-email-sebastien.carlier@gmail.com> References: <1289253872-16891-1-git-send-email-sebastien.carlier@gmail.com> Message-ID: <201011100157.31202.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday, November 08, 2010 17:04:32 Sebastien Carlier wrote: > This commit changes all Makefiles to use partial linking (ld -r) instead of > creating library archives, which forces all symbols to participate in > linking, allowing non-weak symbols to override weak symbols as intended. > This approach is also used by Linux, from which the gmake function > cmd_link_o_target (added at the end of config.mk and used in all > Makefiles) is inspired. wish we could integrate this into one place already. all these Makefile's duplicating targets sucks a lot. but guess that could be a future change. the config.mk looks weird: +cmd_link_o_target = $(if $(strip $1),\ + $(LD) -r -o $@ $1 ,\ + rm -f $@; $(AR) rcs $@ ) why do you need the rm/ar ? > post/board/lwmon/Makefile | 2 +- > post/board/lwmon5/Makefile | 2 +- > post/board/netta/Makefile | 2 +- > post/board/pdm360ng/Makefile | 2 +- > post/cpu/mpc83xx/Makefile | 2 +- > post/cpu/mpc8xx/Makefile | 2 +- > post/cpu/ppc4xx/Makefile | 2 +- > post/drivers/Makefile | 2 +- > post/lib_powerpc/Makefile | 2 +- > post/lib_powerpc/fpu/Makefile | 2 +- > post/rules.mk | 2 +- these look like useless whitespace changes. a lot of the LIB= changes have similar useless changes. looks like your sed needs a little more smarts to retain whitespace: -e '/^LIB/s:[.]a$:.o:' -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20101110/3804df2b/attachment.pgp