ar: accept but ignore 'T' option

In previous versions of BSD ar -T was an alias for -f -- use only the
first 15 characters of archive member names.  In GNU ar and LLVM ar -T
creates a thin archive.

The -f / old BSD ar -T functionality is not particularly useful, and
ignoring -T still results in a usable and compatible (but not thin)
archive.

An exp-run found a few ports invoking ar -T but they all expect thin
archives.  In addition, -T will be used to specify thin archives after
a migration to LLVM-ar.

PR:             260523 [exp-run]
Reviewed by:	markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D33553
This commit is contained in:
Ed Maste 2022-01-03 11:32:52 -05:00
parent 9fe79f2f2b
commit 1a0a41b105
2 changed files with 3 additions and 5 deletions

View File

@ -23,7 +23,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd December 29, 2021
.Dd January 3, 2022
.Dt AR 1
.Os
.Sh NAME
@ -314,8 +314,7 @@ List the files specified by arguments
in the order in which they appear in the archive, one per line.
If no files are specified, all files in the archive are listed.
.It Fl T
Deprecated alias for
.Fl f .
This option is accepted but ignored.
In other implementations of
.Nm ,
.Fl T

View File

@ -227,8 +227,7 @@ main(int argc, char **argv)
bsdar->options |= AR_S;
break;
case 'T':
warnx("-T is deprecated");
bsdar->options |= AR_TR;
/* ignored */
break;
case 't':
set_mode(bsdar, opt);