From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Mon, 28 Jan 2008 16:16:03 -0500 Subject: [U-Boot-Users] [PATCH] Use `ln -sf` rather than `rm -f && ln -s` In-Reply-To: <20080128205603.5863B24781@gemini.denx.de> References: <20080128205603.5863B24781@gemini.denx.de> Message-ID: <200801281616.04178.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 28 January 2008, Wolfgang Denk wrote: > In message <200801280638.59012.vapier@gentoo.org> you wrote: > > odd ... git-send-email ate the explanatory text ... > > --- > > The -f option to `ln` should give the same behavior as the -f option to > > the `rm` command. It is better to do this in one shot so as to avoid > > race conditions when building in parallel. I build on a quad G5 and > > without this change, it isn't uncommon for the build to fail when using > > -j8 due to this small window where the files don't actually exist. > > Note that "ln -s -f" will come down to two separate system calls as > well: > > ... > unlink(); > symlink(); > ... > > So you don't avoid the race condition; you're just making it a little > less likely at the cost of reduced portability. yes, i know it's much less likely, but that difference on my system has been from 1-in-20 build failures to 1-in-none-so-far-out-of-hundreds. the real fix is to overhaul the u-boot build system, but that'll take quite a bit of time and this change is for all practical purposes, Good Enough. i dont know what portability issues you refer to considering the -f flag is in POSIX and has been supported on all Linux systems since before that (pre-2000). -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 827 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20080128/8f778de0/attachment.pgp