Add option -D for ranlib(1). When -D is speicified, ranlib(1) will generate

a deterministic archive symbol table (i.e. timestamp for the symbol table
member header is set to 0).

Submitted by: 	 Erik Cederstrand
This commit is contained in:
Kai Wang 2010-11-28 18:53:57 +00:00
parent 1510a2b019
commit 773810fb45
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216014
2 changed files with 5 additions and 1 deletions

View File

@ -92,6 +92,7 @@
.Ar archive .Ar archive
.Op Ar files ... .Op Ar files ...
.Nm ranlib .Nm ranlib
.Op Fl D
.Ar archive ... .Ar archive ...
.Sh DESCRIPTION .Sh DESCRIPTION
The The

View File

@ -113,12 +113,15 @@ main(int argc, char **argv)
len = strlen(bsdar->progname); len = strlen(bsdar->progname);
if (len >= strlen("ranlib") && if (len >= strlen("ranlib") &&
strcmp(bsdar->progname + len - strlen("ranlib"), "ranlib") == 0) { strcmp(bsdar->progname + len - strlen("ranlib"), "ranlib") == 0) {
while ((opt = getopt_long(argc, argv, "tV", longopts, while ((opt = getopt_long(argc, argv, "tDV", longopts,
NULL)) != -1) { NULL)) != -1) {
switch(opt) { switch(opt) {
case 't': case 't':
/* Ignored. */ /* Ignored. */
break; break;
case 'D':
bsdar->options |= AR_D;
break;
case 'V': case 'V':
ranlib_version(); ranlib_version();
break; break;