Skip to content

Commit b0cdf15

Browse files
committed
Use correct double-dashes for ld(1)'s build-id option
(Old) linkers such as BFD's ld(1) aka. GNU ld (version 2.17 on OpenBSD) don't know `--build-id`, but they know `-b input-format` which patchelf triggers by ommitting the second dash. LLD's ld(1) seems to cope with this, although it's incorrect usage. Use the double dash for correctness to get accurate error messages with such incompatible linkers: -/usr/bin/ld: invalid BFD target `uild-id' +/usr/bin/ld: unrecognized option '--build-id' +/usr/bin/ld: use the --help option for usage information
1 parent bf3f37e commit b0cdf15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ check_PROGRAMS += libfoo.so libfoo-scoped.so libbar.so libbar-scoped.so libsimpl
108108
phdr-corruption.so
109109

110110
libbuildid_so_SOURCES = simple.c
111-
libbuildid_so_LDFLAGS = $(LDFLAGS_sharedlib) -Wl,-build-id
111+
libbuildid_so_LDFLAGS = $(LDFLAGS_sharedlib) -Wl,--build-id
112112

113113
libfoo_so_SOURCES = foo.c
114114
libfoo_so_LDADD = -lbar $(AM_LDADD)

0 commit comments

Comments
 (0)