From owner-freebsd-arch@FreeBSD.ORG Thu Apr 10 15:46:04 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46711615 for ; Thu, 10 Apr 2014 15:46:04 +0000 (UTC) Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 19DA91225 for ; Thu, 10 Apr 2014 15:46:03 +0000 (UTC) Received: by mail-pb0-f42.google.com with SMTP id rr13so4162685pbb.1 for ; Thu, 10 Apr 2014 08:45:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=X+FtFpL3jYqJcTRY7nURVpJHnVMoJeelwIMF//SVdI0=; b=Ohcj2w4w0r3k3AMCnygPf0pJBksn3XkINz8COnt8jeD9aMehC5nEr1E1hHiCrmQQTb 6S/kgMRMumQ06qH0bcIyibMEF7DRFI4q4EgqUrcjy1Ar6p3BrX/Vk9ThErMhMRQm8Z9Z VNIM400OFeAsniyIoWyXxTcnJfb9ZN1040uRb2ObcK09XYHtqoglsyKyVzg2HbDW0CXt THG0BlZyAqMVHd4Avy94yW7QsOXQsgBD5zNU9WPchXWDu1JQ/VqatFsWhLSeA28KZI79 1/6bkpRVRQtecnhTfoN9AjDQCTufBxBOzfd+hjWqjjB58pFWEZlOyvbC4y02A7r/YXun ZNsg== X-Gm-Message-State: ALoCoQnQndTWlg+eNRa5h4Unc3vIBJ5D0oLrBVFfrYqHqgYxsVwtbzwKlht0/lOc7dqOCQPxi0/k X-Received: by 10.66.192.73 with SMTP id he9mr20626961pac.88.1397144757204; Thu, 10 Apr 2014 08:45:57 -0700 (PDT) Received: from [10.64.24.116] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id dn1sm9852600pbb.54.2014.04.10.08.45.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 08:45:56 -0700 (PDT) Sender: Warner Losh Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: ar and ranlib -D From: Warner Losh In-Reply-To: <86eh15usv2.fsf@nine.des.no> Date: Thu, 10 Apr 2014 09:45:53 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <79CBA7AC-998E-46EE-8F94-F92C7C00FF75@bsdimp.com> References: <86eh15usv2.fsf@nine.des.no> To: =?windows-1252?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1874) Cc: arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2014 15:46:04 -0000 My only concern is with the %POSIX section. That change isn=92t needed = for reproducible builds. Warner On Apr 10, 2014, at 9:06 AM, Dag-Erling Sm=F8rgrav wrote: > The attached patch adds -D to ARFLAGS and introduces RANLIBFLAGS which > defaults to -D. This ensures that all timestamps inside static > libraries in the base system are hardcoded to 0 (aka the epoch), which > is a huge step towards fully reproducible builds. Any objections? >=20 > DES > --=20 > Dag-Erling Sm=F8rgrav - des@des.no >=20 > Index: share/mk/bsd.lib.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- share/mk/bsd.lib.mk (revision 264317) > +++ share/mk/bsd.lib.mk (working copy) > @@ -172,7 +172,7 @@ > .else > @${AR} ${ARFLAGS} ${.TARGET} `NM=3D'${NM}' lorder ${OBJS} = ${STATICOBJS} | tsort -q` ${ARADD} > .endif > - ${RANLIB} ${.TARGET} > + ${RANLIB} ${RANLIBFLAGS} ${.TARGET} > .endif >=20 > .if !defined(INTERNALLIB) > @@ -189,7 +189,7 @@ > .else > @${AR} ${ARFLAGS} ${.TARGET} `NM=3D'${NM}' lorder ${POBJS} | = tsort -q` ${ARADD} > .endif > - ${RANLIB} ${.TARGET} > + ${RANLIB} ${RANLIBFLAGS} ${.TARGET} > .endif >=20 > .if defined(SHLIB_NAME) || \ > @@ -246,7 +246,7 @@ > @${ECHO} building special pic ${LIB} library > @rm -f ${.TARGET} > @${AR} ${ARFLAGS} ${.TARGET} ${SOBJS} ${ARADD} > - ${RANLIB} ${.TARGET} > + ${RANLIB} ${RANLIBFLAGS} ${.TARGET} > .endif >=20 > .if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && = !empty(LIB) > Index: share/mk/sys.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- share/mk/sys.mk (revision 264317) > +++ share/mk/sys.mk (working copy) > @@ -37,11 +37,12 @@ >=20 > AR ?=3D ar > .if defined(%POSIX) > -ARFLAGS ?=3D -rv > +ARFLAGS ?=3D -rDv > .else > -ARFLAGS ?=3D cru > +ARFLAGS ?=3D crD > .endif > RANLIB ?=3D ranlib > +RANLIBFLAGS ?=3D -D >=20 > AS ?=3D as > AFLAGS ?=3D > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to = "freebsd-arch-unsubscribe@freebsd.org"