diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2013-03-26 21:55:00 -0700 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2013-03-26 21:55:00 -0700 |
commit | b159d4300781ae367096e05076df56b1467d0d9b (patch) | |
tree | 68ca3a029cc976de2dc25ef17fbaf96ce077f6db /gcc-4.6/gcc | |
parent | 3c138513fb44386c87bd5276725d5459f9243833 (diff) | |
download | toolchain_gcc-b159d4300781ae367096e05076df56b1467d0d9b.tar.gz toolchain_gcc-b159d4300781ae367096e05076df56b1467d0d9b.tar.bz2 toolchain_gcc-b159d4300781ae367096e05076df56b1467d0d9b.zip |
Use READELF_FOR_TARGET in GCC 4.6/4.7
In darwin where readelf isn't available, gcc/configure fails
to set HAVE_LD_PERSONALITY_RELAXATION for MIPS, causes
TARGET_WRITABLE_EH_FRAME=1 and flag_dwarf2_cfi_asm=0 (ie. disable
CFI directive), and fails ld.mcld
It's curious that the successful detection of the
/tmp/ndk-$USER/gcc/binutils-2.21/readelf requires binutils
to exist in the GCC's source tree, according to gcc/configure.
Other tools (objdump, nm, ld, as, etc) can be successfully
located because of OBJDUMP_FOR_TARGET, NM_FOR_TARGET, etc.
Fix to look for READELF_FOR_TARGET in gcc/configure
See
https://android-review.googlesource.com/#/c/54760
https://android-review.googlesource.com/#/c/54770
https://android-review.googlesource.com/#/c/54710
Change-Id: I8b057a70d43389d3d9d02b5c54b8365ebe6487d1
Diffstat (limited to 'gcc-4.6/gcc')
-rwxr-xr-x | gcc-4.6/gcc/configure | 6 | ||||
-rw-r--r-- | gcc-4.6/gcc/configure.ac | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc-4.6/gcc/configure b/gcc-4.6/gcc/configure index 240905cc5..9e040d9e0 100755 --- a/gcc-4.6/gcc/configure +++ b/gcc-4.6/gcc/configure @@ -21335,9 +21335,11 @@ if test -f $gcc_cv_binutils_srcdir/configure.in \ gcc_cv_readelf=../binutils/readelf$build_exeext elif test -x readelf$build_exeext; then gcc_cv_readelf=./readelf$build_exeext +elif ( set dummy $READELF_FOR_TARGET; test -x $2 ); then + gcc_cv_readelf="$READELF_FOR_TARGET" else - # Extract the first word of "readelf", so it can be a program name with args. -set dummy readelf; ac_word=$2 + # Extract the first word of "$READELF_FOR_TARGET", so it can be a program name with args. +set dummy $READELF_FOR_TARGET; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_gcc_cv_readelf+set}" = set; then : diff --git a/gcc-4.6/gcc/configure.ac b/gcc-4.6/gcc/configure.ac index 3bd294755..87314e700 100644 --- a/gcc-4.6/gcc/configure.ac +++ b/gcc-4.6/gcc/configure.ac @@ -2106,8 +2106,10 @@ if test -f $gcc_cv_binutils_srcdir/configure.in \ gcc_cv_readelf=../binutils/readelf$build_exeext elif test -x readelf$build_exeext; then gcc_cv_readelf=./readelf$build_exeext +elif ( set dummy $READELF_FOR_TARGET; test -x $[2] ); then + gcc_cv_readelf="$READELF_FOR_TARGET" else - AC_PATH_PROG(gcc_cv_readelf, readelf) + AC_PATH_PROG(gcc_cv_readelf, $READELF_FOR_TARGET) fi]) AC_MSG_CHECKING(what readelf to use) |