Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit b41f129

Browse files
Auto-merge pull request #7032 from livecodeian/feature-prebuilt-thirdparty-PIC
[[ Prebuilt ]] Ensure linux thirdparty libs are prebuilt with position-independent code This patch modifies the Linux configuration settings so all static libraries are compiled using the `fPIC` gcc flag. This ensures the thirdparty prebuilt libraries can be used by toolchains that produce position-independent executables by default.
2 parents 6ef08c9 + 8629f0a commit b41f129

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

config/linux-settings.gypi

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@
2929
# need to be compiled with the correct compilation flags
3030
'target_conditions':
3131
[
32-
[
33-
'_type' == "executable" or '_type == "loadable_module" or _type == "shared_library" or (_type == "static_library" and library_for_module != 0)',
34-
{
35-
'cflags':
36-
[
37-
'-fPIC',
38-
],
39-
},
40-
],
4132
[
4233
'server_mode == 0',
4334
{
@@ -100,6 +91,7 @@
10091

10192
'cflags':
10293
[
94+
'-fPIC',
10395
'-fstrict-aliasing',
10496
'-fvisibility=hidden',
10597
],
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PIC

0 commit comments

Comments
 (0)