From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 14 07:10:57 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 553C0372; Tue, 14 Oct 2014 07:10:57 +0000 (UTC) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66DD0E8; Tue, 14 Oct 2014 07:10:56 +0000 (UTC) Received: from [89.204.137.254] (helo=unixarea.DDR.dd) by ms-10.1blu.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1XdwFw-0007hQ-IV; Tue, 14 Oct 2014 09:10:53 +0200 Received: from unixarea.DDR.dd (localhost [127.0.0.1]) by unixarea.DDR.dd (8.14.9/8.14.3) with ESMTP id s9E7Ai4E001627; Tue, 14 Oct 2014 09:10:45 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by unixarea.DDR.dd (8.14.9/8.14.3/Submit) id s9E7Af11001626; Tue, 14 Oct 2014 09:10:41 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: unixarea.DDR.dd: guru set sender to guru@unixarea.de using -f Date: Tue, 14 Oct 2014 09:10:40 +0200 From: Matthias Apitz To: Stefan Esser Subject: Re: gmake && file time precision of 1 second Message-ID: <20141014071040.GA1596@unixarea.DDR.dd> Reply-To: Matthias Apitz Mail-Followup-To: Matthias Apitz , Stefan Esser , freebsd-hackers@freebsd.org References: <20141013092018.GA2737@unixarea.DDR.dd> <543BCC97.7080608@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <543BCC97.7080608@freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT r269739 (i386) User-Agent: Mutt/1.5.23 (2014-03-12) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 89.204.137.254 Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 07:10:57 -0000 El día Monday, October 13, 2014 a las 02:59:03PM +0200, Stefan Esser escribió: > > after moving to a faster server it turned out that gmake sometimes forget > > to ar the *.o into the lib; I investigated it and it turned out that the > > *.o files have the same modification time (in seconds) as the target > > lib.a (which was produced/updated in the last directory worked on) and > > gmake thinks that the lib.a is uptodate. > > > > Any idea how to address this in the Makefiles? > > > > Well I could place (and it works) a 'sleep 1' into the loop, but I think > > that there is some better way. > > Could this be a solutionn for you: > > $ sysctl -d vfs.timestamp_precision > vfs.timestamp_precision: File timestamp precision (0: seconds, 1: sec + > ns accurate to 1/HZ, 2: sec + ns truncated to ms, 3+: sec + ns (max. > precision)) > > Beware: This is a global variable, higher resolution timestamps are > not supported on all filesystems, and not all programs check for the > sub-second part of the timestamp value ... Thanks. I was hoping that there is a Makefile solution in the sense that if objs and target lib have the same age (i.e. the same second of age), that gmake assumes that the obj is newer. We will re-think our Makefiles, write into different lib.a and merge them in a final step by unpacking the libs with ar again. Thx matthias -- Matthias Apitz | /"\ ASCII Ribbon Campaign: E-mail: guru@unixarea.de | \ / - No HTML/RTF in E-mail WWW: http://www.unixarea.de/ | X - No proprietary attachments phone: +49-170-4527211 | / \ - Respect for open standards | en.wikipedia.org/wiki/ASCII_Ribbon_Campaign