diff --git a/engine/wscript b/engine/wscript index dae2546c..98d1cb23 100644 --- a/engine/wscript +++ b/engine/wscript @@ -49,14 +49,14 @@ def configure(conf): # re-enable undefined reference errors conf.env.CXXFLAGS += ['-Wl,--no-undefined'] conf.env.CFLAGS += ['-Wl,--no-undefined'] - # allow the SDL2 sanity check to complete properly by linking in libstdc++ and lm normally - conf.env.LDFLAGS += ['-lstdc++', '-lm'] + # allow the SDL2 sanity check to complete properly by linking in lm normally + conf.env.LDFLAGS += ['-lm'] conf.load('sdl2') if not conf.env.HAVE_SDL2: conf.fatal('SDL2 not availiable! Install switch-sdl2!') conf.define('XASH_SDL', 2) # then remove them to avoid them getting linked to shared objects - conf.env.LDFLAGS.remove('-lstdc++') + conf.env.LIB_SDL2.remove('stdc++') # remove libstdc++ linking from SDL2, we link it later conf.env.LDFLAGS.remove('-lm') elif conf.env.DEST_OS == 'psvita': # allow the SDL2 sanity check to complete properly by linking in some deps missing from the pkg-config file @@ -189,7 +189,7 @@ 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'] + bld.env.LDFLAGS += ['-v', '-Wl,--whole-archive', '-lstdc++', '-Wl,--no-whole-archive', '-lm'] if bld.env.DEST_OS == 'psvita': libs += [ 'VRTLD' ] @@ -225,13 +225,9 @@ def build(bld): # Switch and PSVita have custom parameters if bld.env.DEST_OS in ['nswitch', 'psvita']: - program = 'cxxprogram' - if bld.env.DEST_OS == 'nswitch': - program = 'cprogram' # avoid linking with g++, we link standard library explicitly - bld(source = source, target = 'xash', - features = ['c', program], + features = 'c cxxprogram', includes = includes, use = libs, install_path = None,