Statically link libstdc++

Otherwise binaries build on GitHub Actions fail to load on NixOS as
dynamically linked libstdc++ cannot be found.
This commit is contained in:
Leroy Hopson 2022-08-27 20:39:32 +12:00
parent 5e89dbd4ea
commit 5273ccf05b
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA

View file

@ -94,7 +94,7 @@ if env['platform'] == 'linux':
env['LIBSUFFIX'] = '.a' env['LIBSUFFIX'] = '.a'
env.Append(CCFLAGS=['-fPIC', '-Wwrite-strings']) env.Append(CCFLAGS=['-fPIC', '-Wwrite-strings'])
env.Append(LINKFLAGS=["-Wl,-R'$$ORIGIN'"]) env.Append(LINKFLAGS=["-Wl,-R'$$ORIGIN'", '-static-libstdc++'])
if env['target'] == 'debug': if env['target'] == 'debug':
env.Append(CCFLAGS=['-Og', '-g']) env.Append(CCFLAGS=['-Og', '-g'])