Bug 775182 - Use readelf from the toolchain, using TOOLCHAIN_PREFIX. r=khuey
authorMike Hommey <mh+mozilla@glandium.org>
Mon, 23 Jul 2012 07:42:22 +0200
changeset 100108 35b1c3152753285b7ac5943abf65dae678f7b16f
parent 100107 41f7e82c794c9ec73dbe0c343a60bebc4d2d9615
child 100109 e2e5bc1bcbbdb4654c8cbf28c2ec01bb618de596
push id12332
push usermh@glandium.org
push dateMon, 23 Jul 2012 05:42:43 +0000
treeherdermozilla-inbound@ec9fd0a08b8b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs775182
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 775182 - Use readelf from the toolchain, using TOOLCHAIN_PREFIX. r=khuey
configure.in
--- a/configure.in
+++ b/configure.in
@@ -3637,17 +3637,17 @@ dnl __cxa_finalize when the library does
 dnl safe not to link crtbegin. Besides, previous versions of the NDK didn't
 dnl link crtbegin and crtend at all.
 if test -n "$MOZ_LINKER" -a -z "$MOZ_OLD_LINKER" -a "$OS_TARGET" = "Android"; then
   AC_CACHE_CHECK([whether the CRT objects have text relocations],
     ac_cv_crt_has_text_relocations,
     [echo 'int foo() { return 0; }' > conftest.cpp
      if AC_TRY_COMMAND(${CXX-g++} -o conftest${DLL_SUFFIX} $CXXFLAGS $DSO_LDOPTS $LDFLAGS conftest.cpp $LIBS 1>&5) &&
         test -s conftest${DLL_SUFFIX}; then
-       if readelf -d conftest${DLL_SUFFIX} | grep TEXTREL > /dev/null; then
+       if ${TOOLCHAIN_PREFIX}readelf -d conftest${DLL_SUFFIX} | grep TEXTREL > /dev/null; then
          ac_cv_crt_has_text_relocations=yes
        else
          ac_cv_crt_has_text_relocations=no
        fi
      else
        AC_ERROR([couldn't compile a simple C file])
      fi
      rm -rf conftest*])
@@ -7203,17 +7203,17 @@ if test "$USE_ELF_HACK" = 1; then
     dnl we have we PT_GNU_RELRO (e.g. bug 664366), and until elfhack can deal
     dnl with PT_GNU_RELRO segments, it's just simpler to disable elfhack when
     dnl the linker creates PT_GNU_RELRO segments.
     AC_CACHE_CHECK([whether linker creates PT_GNU_RELRO segments],
         LINK_WITH_PT_GNU_RELRO,
         [echo "int main() {return 0;}" > conftest.${ac_ext}
          if AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.${ac_ext} $LIBS 1>&2) &&
             test -s conftest${ac_exeext}; then
-            if readelf -l conftest${ac_exeext} | grep GNU_RELRO > /dev/null; then
+            if ${TOOLCHAIN_PREFIX}readelf -l conftest${ac_exeext} | grep GNU_RELRO > /dev/null; then
                 LINK_WITH_PT_GNU_RELRO=yes
             else
                 LINK_WITH_PT_GNU_RELRO=no
             fi
          else
              dnl We really don't expect to get here, but just in case
              AC_ERROR([couldn't compile a simple C file])
          fi