Skip to content

Commit

Permalink
engine: wscript: add -nostdlib++ for nswitch so we avoid implicit lin…
Browse files Browse the repository at this point in the history
…king to standard C++ library (we link it explicitly ourselves)
  • Loading branch information
a1batross committed Dec 2, 2023
1 parent 6814908 commit be8ade2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engine/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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' ]
Expand Down

0 comments on commit be8ade2

Please sign in to comment.