From: Keith Smiley Subject: ld.bfd: accept -no-pie as an alias for -nopie To: tech@openbsd.org Date: Wed, 2 Sep 2026 17:30:58 -0700 With /usr/bin/ld being lld, it already supports the dashed -no-pie spelling, which is the more commonly used spelling for this option. Currently the -nopie spelling only exists in OpenBSD's patches, which make it harder to cross compile. This change adds -no-pie as an alias for -nopie in ld.bfd for users who end up using this spelling which works fine with lld, but are still using ld.bfd. diff --git gnu/usr.bin/binutils-2.17/ld/lexsup.c gnu/usr.bin/binutils-2.17/ld/lexsup.c index 2e3a6e901fb..2f285af9f37 100644 --- gnu/usr.bin/binutils-2.17/ld/lexsup.c +++ gnu/usr.bin/binutils-2.17/ld/lexsup.c @@ -457,6 +457,8 @@ static const struct ld_option ld_options[] = '\0', NULL, NULL, TWO_DASHES }, { {"nopie", no_argument, NULL, OPTION_NOPIE}, '\0', NULL, N_("Do not create a position independent executable"), ONE_DASH }, + { {"no-pie", no_argument, NULL, OPTION_NOPIE}, + '\0', NULL, NULL, ONE_DASH }, { {"sort-common", no_argument, NULL, OPTION_SORT_COMMON}, '\0', NULL, N_("Sort common symbols by size"), TWO_DASHES }, { {"sort_common", no_argument, NULL, OPTION_SORT_COMMON}, -- Keith Smiley