ar(1) on Solnix vs Linux and the BSDs

A default Solnix system runs the illumos ar at /usr/bin/ar, not the GNU ar that pkgs.solnix.binutils publishes. The illumos ar uses dash options (-r, -q, -x) and has no GNU long options, thin archives or -M. FreeBSD's ar page is llvm-ar, which writes deterministic archives by default.

What Solnix runs

The published page is GNU ar from pkgs.solnix.binutils, with GNU long options (--plugin, --target, --output, --record-libdeps, --thin), -X32_64 and modifier syntax like `ar rcs`. The command on PATH is the illumos /usr/bin/ar. /usr/xpg4/bin/ar is also shipped. It differs in three ways: -v writes no message to standard error when writing to an archive, its -q takes only -c, -v and -V, and it has no -s operation form. Only the published GNU page and the illumos page are described here. The bundle text is trimmed, so some xpg4 details are not shown.

Differences

Compared withTopicWhat differs
Linuxsame program as the published page, different from PATHThe published Solnix page is the same GNU ar text as Linux (same SYNOPSIS and operations). The illumos ar on PATH is a different program, so Linux GNU ar scripts that use GNU-only features can fail on a default Solnix system.
Source: Solnix ar(1) published SYNOPSIS; Linux ar(1) SYNOPSIS; illumos ar(1) SYNOPSIS
Linuxoption syntaxillumos /usr/bin/ar takes the operation as a dash option (ar -r, ar -q, ar -x) with separate option letters. GNU ar takes a keyletter with modifiers in the first argument, optionally with a leading dash, and mixes them in any order (ar rcs).
Source: illumos ar(1) SYNOPSIS; Solnix (GNU) ar(1) OPTIONS first paragraphs
LinuxGNU long options and thin archivesThe illumos ar page documents no --plugin, --target, --output, --record-libdeps or --thin, no -M MRI script mode and no -X32_64. GNU ar documents all of these. Thin archives and --output extraction are not available from /usr/bin/ar on the evidence of its page.
Source: illumos ar(1) SYNOPSIS and OPTIONS; Solnix (GNU) ar(1) SYNOPSIS, DESCRIPTION (thin archive, -M)
Linuxsymbol table with -sillumos ar -s forces regeneration of the symbol table and is a standalone form (ar -s archive). It is meant for restoring the table after strip(1). In GNU ar, s is a keyletter or modifier that adds or updates the index; GNU also rebuilds the table on a quick append.
Source: illumos ar(1) -s, SYNOPSIS; Solnix (GNU) ar(1) s, q
Linux-u meaningThe illumos page says -u with -r replaces a file only if its modification time is at least as new as the member's. The same page's -r text says only files later than the archive files are replaced. The page contradicts itself; the GNU u text is not shown in the bundle.
Source: illumos ar(1) -r, -u
Linux, FreeBSDextracting long names: -T and -Cillumos ar -x has -T (truncate names too long for the file system; otherwise it is an error and the file is not extracted) and -C (do not overwrite existing files). The Linux and FreeBSD pages in the bundle show no -T or -C modifier for extraction. In llvm-ar, T applies to d, q and r, not x.
Source: illumos ar(1) -T, -C; FreeBSD ar(1) Operations (d [NT], q [LT], r [abTu], x [oP])
FreeBSDFreeBSD ar is llvm-arThe FreeBSD 15.1 ar(1) page documents llvm-ar. Its synopsis is llvm-ar [-]{dmpqrstx}[abcDilLNoOPsSTuUvV] and it supports the --format option. illumos ar documents no --format option.
Source: FreeBSD ar(1) NAME, SYNOPSIS; illumos ar(1) SYNOPSIS
FreeBSDdeterministic archives by defaultllvm-ar writes zero timestamps and UIDs/GIDs by default (as if D were set). Pass U to store real values. The illumos page states no such default and preserves file dates for -u comparisons, so archives from the two differ.
Source: FreeBSD ar(1) Deterministic Archives; illumos ar(1) -u, -r
FreeBSDunsupported and ignored modifiersllvm-ar does not support the f modifier (truncate inserted filenames) and ignores l and --plugin. It also uses the L modifier for appending archive members, which is not in the illumos page.
Source: FreeBSD ar(1) DESCRIPTION (departs from previous ar implementations), q [LT]
FreeBSDarchive formatsllvm-ar reads SVR4, GNU, BSD, Big Archive and Darwin formats and writes GNU, BSD, Big Archive and Darwin styles. The illumos page describes only the portable format in ar.h(3HEAD).
Source: FreeBSD ar(1) DESCRIPTION; illumos ar(1) DESCRIPTION
FreeBSD-v and -VOn illumos /usr/bin/ar, -V prints the version on standard error. In llvm-ar, V is a synonym for --version. The xpg4 ar -v writes no message to standard error when writing an archive.
Source: illumos ar(1) -V, -v and /usr/xpg4/bin/ar -v; FreeBSD ar(1) Operations (V)
OpenBSD, NetBSDno OpenBSD or NetBSD page in the bundleThe bundle holds no OpenBSD or NetBSD ar(1) page, so no difference against those systems can be stated.
Source: bundle header COUNTERPART lines (linux, freebsd only)

Standards

  • POSIX: ar is a POSIX.1-2024 utility.
  • Solnix: The standards text of the illumos ar page is not in the trimmed bundle. A separate /usr/xpg4/bin/ar is shipped.

Writing portable scripts

  • Use only the dash forms common to POSIX: ar -r, ar -q, ar -d, ar -t, ar -x, ar -p. Avoid GNU long options, thin archives and -M.
  • Do not rely on archive timestamps or UIDs being preserved or zeroed: llvm-ar zeros them by default and GNU ar keeps them. Run ranlib or ar -s after strip(1) if you need a symbol table.

Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.