From be8ade23e81d258e8c90f91c31f71eb288039f2c Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 2 Dec 2023 19:21:44 +0300 Subject: [PATCH] engine: wscript: add -nostdlib++ for nswitch so we avoid implicit linking to standard C++ library (we link it explicitly ourselves) --- engine/wscript | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/wscript b/engine/wscript index 6f009913..4cebf752 100644 --- a/engine/wscript +++ b/engine/wscript @@ -189,7 +189,8 @@ def build(bld): # HACK: link in the entirety of libstdc++ so that dynamic libs could use all of it without manual exporting # we can't do this right away because std::filesystem will complain about not having pathconf(), # which we have defined in sys_nswitch.c - bld.env.LDFLAGS += ['-Wl,--whole-archive', '-lstdc++', '-Wl,--no-whole-archive', '-lm'] + # HACKHACK: disable implicit linking with libstdc++ to make the hack above work when linking as C++ program + bld.env.LDFLAGS += ['-nostdlib++', '-Wl,--whole-archive', '-lstdc++', '-Wl,--no-whole-archive', '-lm'] if bld.env.DEST_OS == 'psvita': libs += [ 'VRTLD' ]