diff --git a/Makefile.in b/Makefile.in index 082e69d3eec2..8f5d33bdca7b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -172,6 +172,9 @@ export SYMBOL_INDEX_NAME = \ buildsymbols: ifdef MOZ_CRASHREPORTER +ifdef USE_ELF_HACK + $(MAKE) -C $(MOZ_BUILD_APP)/installer elfhack +endif echo building symbol store $(RM) -rf $(DIST)/crashreporter-symbols $(RM) -f "$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip" diff --git a/build/unix/Makefile.in b/build/unix/Makefile.in index 571262b02f85..2fc964ba4f14 100644 --- a/build/unix/Makefile.in +++ b/build/unix/Makefile.in @@ -45,11 +45,9 @@ include $(DEPTH)/config/autoconf.mk MODULE = build -ifeq ($(USE_ELF_HACK)$(HOST_OS_ARCH)$(OS_ARCH),1LinuxLinux) -ifneq (,$(filter %86 x86_64 arm,$(OS_TEST))) +ifdef USE_ELF_HACK DIRS = elfhack endif -endif include $(topsrcdir)/config/rules.mk diff --git a/configure.in b/configure.in index 78d4d92c60a0..61333196dfc1 100644 --- a/configure.in +++ b/configure.in @@ -7714,6 +7714,25 @@ MOZ_ARG_DISABLE_BOOL(elf-hack, USE_ELF_HACK=, USE_ELF_HACK=1) +# Only enable elfhack where supported +if test "$USE_ELF_HACK" = 1; then + case "${HOST_OS_ARCH},${OS_ARCH}" in + Linux,Linux) + case "${CPU_ARCH}" in + arm | x86 | x86_64) + USE_ELF_HACK=1 + ;; + *) + USE_ELF_HACK= + ;; + esac + ;; + *) + USE_ELF_HACK= + ;; + esac +fi + dnl ======================================================== dnl = dnl = Profiling and Instrumenting diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index a2469d699645..7d2bf94cd360 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -491,7 +491,17 @@ ifdef MOZ_OPTIONAL_PKG_LIST @cd $(DEPTH)/installer-stage/optional/extensions; find -maxdepth 1 -mindepth 1 -exec rm -r ../../core/extensions/{} \; endif -stage-package: $(MOZ_PKG_MANIFEST) $(MOZ_PKG_REMOVALS_GEN) +elfhack: +ifdef USE_ELF_HACK + @echo === + @echo === If you get failures below, please file a bug describing the error + @echo === and your environment \(compiler and linker versions\), and use + @echo === --disable-elf-hack until this is fixed. + @echo === + cd $(DIST)/bin; find . -name "*$(DLL_SUFFIX)" | xargs $(DEPTH)/build/unix/elfhack/elfhack +endif + +stage-package: $(MOZ_PKG_MANIFEST) $(MOZ_PKG_REMOVALS_GEN) elfhack @rm -rf $(DIST)/$(MOZ_PKG_DIR) $(DIST)/$(PKG_PATH)$(PKG_BASENAME).tar $(DIST)/$(PKG_PATH)$(PKG_BASENAME).dmg $@ $(EXCLUDE_LIST) # NOTE: this must be a tar now that dist links into the tree so that we # do not strip the binaries actually in the tree. @@ -537,16 +547,6 @@ endif # DMG endif # MOZ_PKG_MANIFEST endif # UNIVERSAL_BINARY $(OPTIMIZE_JARS_CMD) --optimize $(DIST)/jarlog/ $(DIST)/bin/chrome $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)/chrome -ifeq ($(USE_ELF_HACK)$(HOST_OS_ARCH)$(OS_ARCH),1LinuxLinux) -ifneq (,$(filter %86 x86_64 arm,$(OS_TEST))) - @echo === - @echo === If you get failures below, please file a bug describing the error - @echo === and your environment \(compiler and linker versions\), and use - @echo === --disable-elf-hack until this is fixed. - @echo === - cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR); find . -name "*$(DLL_SUFFIX)" | xargs $(DEPTH)/build/unix/elfhack/elfhack -endif -endif ifndef PKG_SKIP_STRIP @echo "Stripping package directory..." @cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR); find . ! -type d \