From 68880f311c1d5629c47c3ab9749061fe3138be63 Mon Sep 17 00:00:00 2001 From: Chung-Lin Tang Date: Thu, 14 May 2015 18:40:57 +0800 Subject: ELF options may be missing from `ld --help' output nios2-linux has an emulation named "nios2linux", and happens to not include another extra emulation with a name matching *elf*. This makes nios2-linux left out of the ELF options printing targets, which is unintended. * configure.ac (AC_PROG_GREP): Check for grep program. (elf_list_options,elf_shlib_list_options,elf_plt_unwind_list_options): Enable ELF option printing for emulations containing 'TEMPLATE_NAME=elf32'. * configure: Regenerate. --- ld/configure.ac | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ld/configure.ac') diff --git a/ld/configure.ac b/ld/configure.ac index e120a05c64d..62aed09aed9 100644 --- a/ld/configure.ac +++ b/ld/configure.ac @@ -31,6 +31,7 @@ AM_MAINTAINER_MODE AC_PROG_CC AC_PROG_CXX +AC_PROG_GREP AC_GNU_SOURCE AC_USE_SYSTEM_EXTENSIONS AC_PROG_INSTALL @@ -326,6 +327,14 @@ do case "${i}" in *elf*) elf_list_options=TRUE + ;; + *) + if $GREP "TEMPLATE_NAME=elf32" ${srcdir}/emulparams/${i}.sh >/dev/null 2>/dev/null; then + elf_list_options=TRUE + fi + ;; + esac + if test "$elf_list_options" = "TRUE"; then . ${srcdir}/emulparams/${i}.sh if test x${GENERATE_SHLIB_SCRIPT} = xyes; then elf_shlib_list_options=TRUE @@ -333,8 +342,7 @@ do if test x${PLT_UNWIND} = xyes; then elf_plt_unwind_list_options=TRUE fi - ;; - esac + fi ;; esac done -- cgit v1.2.1