Date: Thu, 10 Apr 2014 09:45:53 -0600 From: Warner Losh <imp@bsdimp.com> To: =?windows-1252?Q?Dag-Erling_Sm=F8rgrav?= <des@des.no> Cc: arch@freebsd.org Subject: Re: ar and ranlib -D Message-ID: <79CBA7AC-998E-46EE-8F94-F92C7C00FF75@bsdimp.com> In-Reply-To: <86eh15usv2.fsf@nine.des.no> References: <86eh15usv2.fsf@nine.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <des@des.no> 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?79CBA7AC-998E-46EE-8F94-F92C7C00FF75>
