mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-09 11:17:37 +01:00
build: Fix version script linker support detection
When the linker uses --no-undefined-version either specified by the user or as the default behavior (such as with newer clang >= 16 releases), a missing symbol definition will cause a linker error if that symbol is listed in the version script.
This commit is contained in:
parent
fe21244b05
commit
dec783dce5
@ -39,7 +39,11 @@ AC_CACHE_CHECK([if ld supports --version-script flag],
|
|||||||
save_LDFLAGS=$LDFLAGS
|
save_LDFLAGS=$LDFLAGS
|
||||||
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
|
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
|
||||||
AC_LINK_IFELSE([
|
AC_LINK_IFELSE([
|
||||||
AC_LANG_PROGRAM([], [])
|
AC_LANG_PROGRAM([[
|
||||||
|
extern int symbol(void);
|
||||||
|
int symbol(void) { return 0; }
|
||||||
|
]], [[
|
||||||
|
]])
|
||||||
], [
|
], [
|
||||||
libbsd_cv_version_script=yes
|
libbsd_cv_version_script=yes
|
||||||
], [
|
], [
|
||||||
|
Loading…
Reference in New Issue
Block a user