Skip to content

Commit

Permalink
Instrumented libraries: fix NSS build.
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
earthdok authored and Commit bot committed Sep 29, 2014
1 parent 60d2c27 commit aba9695
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions third_party/instrumented_libraries/download_build_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit aba9695

Please sign in to comment.