ar and ranlib -D

Warner Losh imp at bsdimp.com
Thu Apr 10 16:43:22 UTC 2014


On Apr 10, 2014, at 9:57 AM, Dag-Erling Smørgrav <des at des.no> wrote:

> Warner Losh <imp at bsdimp.com> writes:
>> My only concern is with the %POSIX section. That change isn’t needed
>> for reproducible builds.
> 
> Is it harmful?
> 
> (what is that, anyway?  It's not documented in make(1))

Short answer: It isn’t defined by POSIX 1003.2, so yes.

POSIX mode, which is barely documented in the .POSIX target, causes
make(1) to try hard to comply with POSIX requirements.  Make, itself, winds
up setting %POSIX to “1003.2” and not remaking the Makefiles.  The global
sys.mk system responds to this variable by only using commands defined
by POSIX 1003.2, so it uses c89, instead of cc. It adds the dash to the ar
command, and a bunch of other silly differences that are none-the-less
mandated by POSIX. Since -D isn’t defined by POSIX ar, your change
breaks that and so is harmful...

Warner



More information about the freebsd-arch mailing list