libroot: Force __cxa_pure_virtual to be linked in.

In GCC 8 builds it is by default, in GCC 11 builds it is weakly
defined, which runtime_loader does not yet support properly,
so we force it to be included.
This commit is contained in:
Augustin Cavalier 2021-12-07 14:21:52 -05:00
parent 7ce3c9283e
commit db911197a0

View File

@ -77,6 +77,12 @@ for architectureObject in [ MultiArchSubDirSetup ] {
SetVersionScript $(libroot) : libroot_versions ;
SetVersionScript $(librootDebug) : libroot_versions ;
if $(architecture) != x86_gcc2 {
# force __cxa_pure_virtual to be linked instead of weak
# TODO: remove once we handle weak symbols correctly!
LINKFLAGS on $(libroot) += -Wl,-u,__cxa_pure_virtual ;
}
SharedLibrary $(libroot)
:
libroot_init.c