Commit aba96951 authored by earthdok's avatar earthdok Committed by Commit bot

Instrumented libraries: fix NSS build.

Unset LDFLAGS before building. Otherwise we override the default LDFLAGS in the
makefile, breaking the build. We want to append our flags to the default flags
instead.

BUG=418175
TBR=glider@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#297200}
parent 60d2c270
......@@ -121,13 +121,16 @@ def nss_make_and_copy(parsed_arguments, environment, install_prefix):
make_args.append('CC="%s %s"' % (environment['CC'], environment['CFLAGS']))
make_args.append('CXX="%s %s"' %
(environment['CXX'], environment['CXXFLAGS']))
# We need to override ZDEFS_FLAGS at least to prevent -Wl,-z,defs.
# Might as well use this to pass the linker flags, since ZDEF_FLAGS is always
# We need to override ZDEFS_FLAG at least to prevent -Wl,-z,defs.
# Might as well use this to pass the linker flags, since ZDEF_FLAG is always
# added during linking on Linux.
make_args.append('ZDEFS_FLAG="-Wl,-z,nodefs %s"' % environment['LDFLAGS'])
make_args.append('NSPR_INCLUDE_DIR=/usr/include/nspr')
make_args.append('NSPR_LIB_DIR=%s/lib' % install_prefix)
make_args.append('NSS_ENABLE_ECC=1')
# Make sure we don't override the default flags.
for variable in ['CFLAGS', 'CXXFLAGS', 'LDFLAGS']:
del environment[variable]
with ScopedChangeDirectory('nss') as cd_nss:
# -j is not supported
shell_call('make %s' % ' '.join(make_args), parsed_arguments.verbose,
......
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