Configure issue with Clang/LLD 16
When using Clang 16 to build libmd, the "checking for --version-script linker flag" test fails because of LLD 16 enabling --no-undefined-version by default:
configure:13123: checking for --version-script linker flag
configure:13146: clang -o conftest -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed -Wl,--version-script=conftest.map conftest.c >&5
ld.lld: error: version script assignment of 'global' to symbol 'symbol' failed: symbol not defined
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
Explicitly adding -Wl,--undefined-version
to LDFLAGS fixes this.
This test failure for some reason causes src/libmd.map to not properly be copied into the build directory later on in the build process.
See also: https://bugs.gentoo.org/894010
Edited by vi-improved