From 0d40357b93b43e468f3ab083264487b01b97ee96 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 13 Apr 2026 10:19:49 +0500 Subject: [PATCH] ref: common: wscript: fix psvita build --- ref/common/wscript | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ref/common/wscript b/ref/common/wscript index 49930baf..6e7cb04f 100644 --- a/ref/common/wscript +++ b/ref/common/wscript @@ -1,8 +1,6 @@ #! /usr/bin/env python # encoding: utf-8 -top = '.' - def options(opt): pass @@ -10,11 +8,20 @@ def configure(conf): pass def build(bld): + use = ['engine_includes', 'sdk_includes', 'werror'] + + # FIXME: figure out why psvita needs it and how can we avoid it + if bld.env.DEST_OS == 'psvita': + bld.env.CFLAGS_cstlib.remove('-fno-PIC') + bld.env.CFLAGS += ['-fPIC'] + else: + use += ['public'] + bld.stlib(source = bld.path.ant_glob('*.c'), target = 'ref_common', includes = '.', export_includes = '.', defines = 'REF_DLL=1', - use = 'engine_includes public werror', + use = use, subsystem = bld.env.MSVC_SUBSYSTEM )