| Index: build/common.gypi
|
| diff --git a/build/common.gypi b/build/common.gypi
|
| index e498d3eb467aeb94a8a835357a32be77ddc4f7f1..b0afc9ce3047f538a9635d82a716052d0d15327c 100644
|
| --- a/build/common.gypi
|
| +++ b/build/common.gypi
|
| @@ -4148,7 +4148,7 @@
|
| '-g',
|
| ],
|
| 'ldflags': [
|
| - # We want to statically link libstdc++/libgcc_s.
|
| + # We want to statically link libstdc++/libgcc.
|
| '-static-libstdc++',
|
| '-static-libgcc',
|
| ],
|
| @@ -4160,6 +4160,34 @@
|
| '-march=armv7-a',
|
| '-mtune=cortex-a8',
|
| ],
|
| + 'target_conditions': [
|
| + [ '_type=="executable"', {
|
| + # Statically link whole libstdc++ and libgcc in
|
| + # executables to ensure only one copy at runtime.
|
| + 'ldflags': [
|
| + # Note executables also get -static-stdlibc++/libgcc.
|
| + # Despite including libstdc++/libgcc archives, we
|
| + # still need to specify static linking for them in
|
| + # order to prevent the executable from having a
|
| + # dynamic dependency on them.
|
| +
|
| + # Export stdlibc++ and libgcc symbols to force shlibs
|
| + # to refer to these symbols from the executable.
|
| + '-Wl,--export-dynamic',
|
| +
|
| + '-lm', # stdlibc++ requires math.h
|
| +
|
| + # In case we redefined stdlibc++ symbols
|
| + # (e.g. tc_malloc)
|
| + '-Wl,--allow-multiple-definition',
|
| +
|
| + '-Wl,--whole-archive',
|
| + '-l:libstdc++.a',
|
| + '-l:libgcc.a',
|
| + '-Wl,--no-whole-archive',
|
| + ],
|
| + }]
|
| + ],
|
| }],
|
| ],
|
| }],
|
|
|