mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-22 21:04:14 +00:00
game_launch: force link libm on Linux to workaround HL25 bug
HL25 doesn't link libm probably because of toolchain updates, where --Wl,--as-needed became the default. hl_linux is linked to libm which is why they probably didn't noticed this bug. Workaround until Valve fixes it: https://github.com/ValveSoftware/halflife/issues/3492
This commit is contained in:
parent
0aa8a2891c
commit
a2e1071808
@ -21,21 +21,19 @@ def configure(conf):
|
|||||||
conf.define_cond('XASH_DISABLE_MENU_CHANGEGAME', conf.options.DISABLE_MENU_CHANGEGAME)
|
conf.define_cond('XASH_DISABLE_MENU_CHANGEGAME', conf.options.DISABLE_MENU_CHANGEGAME)
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
libs = ['sdk_includes']
|
|
||||||
source = ['game.cpp']
|
source = ['game.cpp']
|
||||||
defines = []
|
|
||||||
|
|
||||||
if bld.env.DEST_OS != 'win32':
|
if bld.env.DEST_OS == 'win32':
|
||||||
libs += [ 'DL' ]
|
|
||||||
else:
|
|
||||||
libs += ['USER32', 'SHELL32']
|
|
||||||
source += ['game.rc']
|
source += ['game.rc']
|
||||||
|
|
||||||
|
# Half-Life 25th anniversary update doesn't have server library explicitly linked to libm
|
||||||
|
if bld.env.DEST_OS == 'linux':
|
||||||
|
bld.env.LDFLAGS += ['-Wl,--no-as-needed', '-lm']
|
||||||
|
|
||||||
bld(source = source,
|
bld(source = source,
|
||||||
target = 'xash3d', # hl.exe
|
target = 'xash3d', # hl.exe
|
||||||
features = 'c cxx cxxprogram',
|
features = 'c cxx cxxprogram',
|
||||||
use = libs,
|
use = 'sdk_includes DL USER32 SHELL32',
|
||||||
defines = defines,
|
|
||||||
rpath = bld.env.DEFAULT_RPATH,
|
rpath = bld.env.DEFAULT_RPATH,
|
||||||
install_path = bld.env.BINDIR,
|
install_path = bld.env.BINDIR,
|
||||||
subsystem = bld.env.MSVC_SUBSYSTEM
|
subsystem = bld.env.MSVC_SUBSYSTEM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user