The current documentation states: "%X Output the accumulated linker options specified by -Wl or a ‘%x’ spec string." The part about -Wl has been obsolete for 27 years, since this change: Author: Torbjorn Granlund Date: Thu Oct 27 18:04:25 1994 +0000 (process_command): Handle -Wl, and -Xlinker similar to -l, i.e., preserve their order with respect to linker input files. Technically speaking, the arguments of -l, -Wl and -Xlinker are input files. Tested on x86-64/Linux, applied on all active branches as obvious. 2021-10-28 Eric Botcazou * doc/invoke.texi (%X): Remove obsolete reference to -Wl. -- Eric Botcazou