Skip to content

Commit a4ed72b

Browse files
committed
linux: link libstdc++ statically for gcc
1 parent c63c476 commit a4ed72b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ jobs:
8585
sudo rm -rf /Library/Frameworks/Python.framework/
8686
brew install --force python3 && brew unlink python3 && brew unlink python3 && brew link --overwrite python3
8787
88-
8988
- name: Setup meson (MacOS)
9089
if: matrix.config.os == 'macos'
9190
run: |

binding.gyp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# type: ignore
22
{
3+
"variables": {
4+
"oopetris_compiler": "<!(pkg-config oopetris-recordings --variable=compiler)",
5+
},
36
"targets": [
47
{
58
"target_name": "oopetris",
@@ -40,6 +43,15 @@
4043
}
4144
},
4245
],
46+
[
47+
'OS == "linux" and oopetris_compiler == "gcc"',
48+
{
49+
"cflags_cc": [
50+
"-static-libgcc", # to build with a static libgcc (libgcc_s)
51+
"-static-libstdc++", # to build with a static libstdc++
52+
]
53+
},
54+
],
4355
[
4456
'OS != "win"',
4557
{
@@ -81,7 +93,7 @@
8193
"VCLinkerTool": {
8294
"AdditionalDependencies": [
8395
# adjust to the default setting, namely lib<name>.a via some sed magic
84-
"<!@(pkg-config oopetris-recordings --libs-only-l | sed s/-l/lib/g | sed \"s/\\s/.a /g\")",
96+
'<!@(pkg-config oopetris-recordings --libs-only-l | sed s/-l/lib/g | sed "s/\\s/.a /g")',
8597
],
8698
},
8799
},

0 commit comments

Comments
 (0)