Upstream LLVM decided to drop the -dc flag and keep its -d alias for
some time:
https://github.com/llvm/llvm-project/commit/
0688b00fc39fe87ec6dd3d37a732d067ff487f16
So this is only a workaround to let us update llvm to a recent release.
We'll probably need another fix not so distant future. Another approach
would be to just drop -dc from the linker invocation, and use
cc -fno-common when building instbin with base-gcc (already the default
with base-clang). But this approach needs more testing than I can
provide, as deraadt@ feared it would break in subtle ways.
ld -d compat alias pointed out by robert@, ok robert@
-/* $OpenBSD: crunchgen.c,v 1.26 2023/04/16 19:57:01 deraadt Exp $ */
+/* $OpenBSD: crunchgen.c,v 1.27 2023/09/14 16:39:00 jca Exp $ */
/*
* Copyright (c) 1994 University of Maryland
fprintf(outmk, "CFLAGS+=-fno-asynchronous-unwind-tables\n");
fprintf(outmk, "LDFLAGS+=$(NOPIE_LDFLAGS)\n");
fprintf(outmk, "STRIP?=strip\n");
- fprintf(outmk, "LINK=$(LD) -dc -r ${LDFLAGS}\n");
+ fprintf(outmk, "LINK=$(LD) -d -r ${LDFLAGS}\n");
fprintf(outmk, "LIBS=");
for (l = libdirs; l != NULL; l = l->next)
fprintf(outmk, " -L%s", l->str);