From 35ff06240778435a861cec7c34d31ddc82ac32ba Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 24 Mar 2023 02:09:23 +0300 Subject: [PATCH] wscript: restore NSwitch and PSVita specific link and compiler flags --- wscript | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/wscript b/wscript index fc54f568..7eaecbcb 100644 --- a/wscript +++ b/wscript @@ -243,16 +243,16 @@ def configure(conf): # additionally, shared libs are linked without standard libs, we'll add those back in the engine wscript if conf.env.DEST_OS == 'nswitch': linkflags.remove('-Wl,--no-undefined') - linkflags.extend(['-nostdlib', '-nostartfiles']) - + conf.env.append_unique('LINKFLAGS_cshlib', ['-nostdlib', '-nostartfiles']) + conf.env.append_unique('LINKFLAGS_cxxshlib', ['-nostdlib', '-nostartfiles']) # same on the vita - if conf.env.DEST_OS == 'psvita': - cflags.append('-fPIC') - cxxflags.extend(['-fPIC', '-fno-use-cxa-atexit']) - linkflags.extend(['-nostdlib', '-Wl,--unresolved-symbols=ignore-all']) - + elif conf.env.DEST_OS == 'psvita': + conf.env.append_unique('CFLAGS_cshlib', ['-fPIC']) + conf.env.append_unique('CXXFLAGS_cxxshlib', ['-fPIC', '-fno-use-cxa-atexit']) + conf.env.append_unique('LINKFLAGS_cshlib', ['-nostdlib', '-Wl,--unresolved-symbols=ignore-all']) + conf.env.append_unique('LINKFLAGS_cxxshlib', ['-nostdlib', '-Wl,--unresolved-symbols=ignore-all']) # check if we need to use irix linkflags - if conf.env.DEST_OS == 'irix' and conf.env.COMPILER_CC == 'gcc': + elif conf.env.DEST_OS == 'irix' and conf.env.COMPILER_CC == 'gcc': linkflags.remove('-Wl,--no-undefined') linkflags.append('-Wl,--unresolved-symbols=ignore-all') # check if we're in a sgug environment