From db911197a051c678d671348fa9bb4a8ddfeb8577 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 7 Dec 2021 14:21:52 -0500 Subject: [PATCH] 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. --- src/system/libroot/Jamfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/system/libroot/Jamfile b/src/system/libroot/Jamfile index 1297bb1fc1..4d7970bef2 100644 --- a/src/system/libroot/Jamfile +++ b/src/system/libroot/Jamfile @@ -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