From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 27 Aug 2015 12:28:36 +0200 Subject: [U-Boot] [RFC PATCH] Makefile: search for GNU date In-Reply-To: <55DED1DF.4010600@gmail.com> References: <55DC2C19.1000809@gmail.com> <201508271028.47523.marex@denx.de> <55DED1DF.4010600@gmail.com> Message-ID: <201508271228.36649.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday, August 27, 2015 at 11:01:19 AM, Andreas Bie?mann wrote: > Hi Marek, Hi! > On 08/27/2015 10:28 AM, Marek Vasut wrote: > > On Thursday, August 27, 2015 at 10:13:49 AM, Andreas Bie?mann wrote: > >> The SOURCE_DATE_EPOCH mechanism for reproducible builds requires the GNU > >> variant of date. > > > > Why does it require the GNU date ? > > Cause of the -d switch. It is used in GNU date variants to set the time > to print the string from. On the other hand *BSD variants use it to set > the DST flag. This sort of stuff should be in the commit message :) > >> Respect this and search it, error on missing GNU date. > > > > Wouldn't it make more sense to fix the code to NOT depend on GNU > > extensions ? > > That would be great, but so we need to check for the tool and use the > right switches depending on that. > I think forcing the user to provide the right tool here is Ok. I think we don't have a better option here anyway, right ? Maybe try checking uname ? But you can have linux with bsd userspace ... and probably BSD with GNU userspace, meh. Best regards, Marek Vasut