Commit 10acda89 authored by sbc's avatar sbc Committed by Commit bot

[NaCl SDK] Compile libppapi_stub.a with -fPIC

This fixes a linker error when combining -shared and -lppapi.

BUG=479262
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_nacl_sdk;tryserver.chromium.mac:mac_nacl_sdk

Review URL: https://codereview.chromium.org/1094103003

Cr-Commit-Position: refs/heads/master@{#327550}
parent 629e82ae
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
assert(is_nacl, assert(is_nacl,
"These targets must only be built using the untrusted NaCl toolchains.") "These targets must only be built using the untrusted NaCl toolchains.")
# TODO(sbc): Make sure this library gets built with -fPIC. Right not it
# doesn't seem that is built at all.
source_set("ppapi_stub_lib") { source_set("ppapi_stub_lib") {
sources = [ sources = [
"plugin_main_irt.c", "plugin_main_irt.c",
......
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
'build_newlib': 1, 'build_newlib': 1,
'build_pnacl_newlib': 1, 'build_pnacl_newlib': 1,
}, },
# Always compile libppapi_stub with -fPIC so that -lppapi can be linked
# into shared libraries (libppapi.so is a linker script that pulls in
# ppapi_stub).
'compile_flags': [ '-fPIC' ],
'include_dirs': [ 'include_dirs': [
'../../../..', '../../../..',
], ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment