emaste created this revision. emaste requested review of this revision. REVISION SUMMARY Our ar has a different function for `-T` compared to GNU ar and LLVM ar. We specify `-T` as `Use only the first fifteen characters of the archive member name or command line file name argument when naming archive members.` `-f` provides the same functionality. GNU ar and LLVM ar use `-T` to specify creation of thin archives. PR: 260523 [exp-run] LLVM issue: https://github.com/llvm/llvm-project/issues/25899
REVISION DETAIL https://reviews.freebsd.org/D33553 AFFECTED FILES usr.bin/ar/ar.1 usr.bin/ar/ar.c EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: emaste Cc: freebsd-toolchain-list
diff --git a/usr.bin/ar/ar.c b/usr.bin/ar/ar.c --- a/usr.bin/ar/ar.c +++ b/usr.bin/ar/ar.c @@ -66,6 +66,7 @@ #include <sys/queue.h> #include <sys/types.h> #include <archive.h> +#include <err.h> #include <errno.h> #include <getopt.h> #include <libgen.h> @@ -193,7 +194,6 @@ Uflag = 0; break; case 'f': - case 'T': bsdar->options |= AR_TR; break; case 'j': @@ -226,6 +226,9 @@ case 's': bsdar->options |= AR_S; break; + case 'T': + errx(1, "-T option is not supported"); + break; case 't': set_mode(bsdar, opt); break; diff --git a/usr.bin/ar/ar.1 b/usr.bin/ar/ar.1 --- a/usr.bin/ar/ar.1 +++ b/usr.bin/ar/ar.1 @@ -222,8 +222,8 @@ .Fl U options are specified on the command line, the final one takes precedence. .It Fl f -Synonymous with option -.Fl T . +Use only the first fifteen characters of the archive member name or +command line file name argument when naming archive members. .It Fl i Ar member-before Synonymous with option .Fl b . @@ -314,8 +314,14 @@ 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 -Use only the first fifteen characters of the archive member name or -command line file name argument when naming archive members. +Not supported. +In earlier versions of +.Nm . +it was an alias for +.Fl f . +In other implementations of +.Nm +it creates a "thin" archive. .It Fl u Conditionally update the archive or extract members. When used with the
