From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2287 invoked by alias); 14 May 2015 10:41:07 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 2272 invoked by uid 89); 14 May 2015 10:41:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 May 2015 10:41:04 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1YsqZY-0002RD-16 from ChungLin_Tang@mentor.com ; Thu, 14 May 2015 03:41:00 -0700 Received: from 110-29-68-188.adsl.fetnet.net (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Thu, 14 May 2015 03:40:59 -0700 Message-ID: <55547BB9.4010003@codesourcery.com> Date: Thu, 14 May 2015 10:41:00 -0000 From: Chung-Lin Tang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ilya Malakhov , , CC: Sandra Loosemore Subject: Re: ELF options may be missing from `ld --help' output after migration to ld_list_options References: <20150410085450.GK27812@bubble.grove.modra.org> In-Reply-To: <20150410085450.GK27812@bubble.grove.modra.org> Content-Type: multipart/mixed; boundary="------------030808020308010903060209" X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00128.txt.bz2 --------------030808020308010903060209 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Content-length: 1508 On 15/4/10 4:54 PM, Alan Modra wrote: > On Fri, Apr 10, 2015 at 11:05:45AM +0300, Ilya Malakhov wrote: >> One should probably check whether to set elf_list_options and others to TRUE >> in `*)' case rather than in `*" e${i}.o "*)' one within ld/configure.ac in >> master branch of binutils-gdb.git: > > Indeed. Thanks! > > * configure.ac: Set elf_list_options etc. in proper case. > * configure: Regenerate. I have another case that needs fixing related to ld_list_options. 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. The name of emulation didn't play this part when I created "nios2linux" from "nios2elf", so this is a recent breakage (glibc configure failed for me too :P). I can change the emulation name to something like "nios2elf_linux" if required, but may I suggest that configuration uses emulparams/*.sh contents too? The attached patch also enables the ELF options when "TEMPLATE_NAME=elf32" is found inside the emulparams file as well. This should make things more robust. Thanks, Chung-Lin 2015-05-14 Chung-Lin Tang * 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. --------------030808020308010903060209 Content-Type: text/x-patch; name="ld-config.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ld-config.patch" Content-length: 938 diff --git a/ld/configure.ac b/ld/configure.ac index e120a05..54bfb86 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 @@ -324,8 +325,14 @@ do test -z "$result" && result=$targ_alias echo tdir_$i=$result >> tdirs case "${i}" in - *elf*) - elf_list_options=TRUE + *elf*) elf_list_options=TRUE ;; + *) + if test `$GREP "TEMPLATE_NAME=elf32" ${srcdir}/emulparams/${i}.sh`; 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 +340,7 @@ do if test x${PLT_UNWIND} = xyes; then elf_plt_unwind_list_options=TRUE fi - ;; - esac + fi ;; esac done --------------030808020308010903060209--