Add -Wl,--undefined-version when using newer lld

to work around errors like

    version script assignment of 'GLIBC_2.4' to symbol '__stack_chk_guard' failed: symbol not defined
This commit is contained in:
Fangrui Song 2023-08-29 03:30:46 +00:00
parent 2dda6eab52
commit 3697387eab

View File

@ -936,6 +936,7 @@ ifeq ($(with-lld),yes)
LDFLAGS.so += -fuse-ld=lld
LDFLAGS-rtld += -fuse-ld=lld
LDFLAGS += -fuse-ld=lld
LDFLAGS += -Wl,--undefined-version
endif
endif # with-clang == yes