Bug 818903 - Also link NSPR and NSS with --build-id when available. r=ted

This commit is contained in:
Mike Hommey 2012-12-10 19:00:38 +01:00
parent 8ad2aea837
commit 0a68e859a3
2 changed files with 8 additions and 3 deletions

View File

@ -1429,7 +1429,8 @@ if test "$GNU_CC"; then
AC_MSG_CHECKING([for --build-id option to ld])
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,--build-id"
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
AC_TRY_LINK(,,AC_MSG_RESULT([yes])
NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,--build-id",
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)
@ -3763,7 +3764,7 @@ if test -n "$MOZ_LINKER" -a -z "$MOZ_OLD_LINKER" -a "$OS_TARGET" = "Android"; th
dnl Using LDFLAGS in nspr is safe, since we only really build
dnl libraries there.
DSO_LDOPTS="$DSO_LDOPTS -nostartfiles"
NSPR_LDFLAGS=-nostartfiles
NSPR_LDFLAGS="$NSPR_LDFLAGS -nostartfiles"
fi
fi

View File

@ -285,10 +285,14 @@ NSS_DIRS += \
$(NULL)
endif
ifneq (,$(filter %--build-id,$(LDFLAGS)))
DEFAULT_GMAKE_ENV = LDFLAGS=-Wl,--build-id
endif
ifndef MOZ_NATIVE_NSS
define build_rules
libs::
$$(MAKE) -C $$(NSS_SRCDIR)/security/$(1) $$(DEFAULT_GMAKE_FLAGS)
$$(DEFAULT_GMAKE_ENV) $$(MAKE) -C $$(NSS_SRCDIR)/security/$(1) $$(DEFAULT_GMAKE_FLAGS)
clean clobber clobber_all realclean distclean depend::
$$(MAKE) -C $$(NSS_SRCDIR)/security/$(1) $$(DEFAULT_GMAKE_FLAGS) clean