From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 8F1723858C50 for ; Fri, 2 Dec 2022 23:10:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8F1723858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=linux.vnet.ibm.com Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B2N3mji018852 for ; Fri, 2 Dec 2022 23:10:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=sPfTiqsNXiJSFpSuIgWB9MbcIAPAqfT67WTlzsr8Onw=; b=LfCebxQUUEy4geCD2vjYjcRYfj4Fo0EpO0wMg4LwDN9EKATF36i0sRrVrWjxXS8htN/E XDV/lDNWyuMS552/tatUHn65Ubb6qKfXox2TeXvkwfownt15Of7M12MIktwgNMpys1BA 9e35rpfGflNANhPnXtzxf20zYByloWpJFmPDJPWGexiX9O1LhcqEhDXhaYnea805O77d 6mn/VoyNMTzZf+7kx82nHGGgMOgm2fUbI1MXSVO9Aemf2n6583AtDROQ/3Wo/puT19wy 0Rh5/HP4cd0VQK+qD0Ka9iowfRQ1eJIyDH1xREfZCG/91FYghQnm5wcRhgQcyvhHurNt Dw== Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3m7tq10428-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 02 Dec 2022 23:10:40 +0000 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2B2N67pn029114 for ; Fri, 2 Dec 2022 23:10:40 GMT Received: from smtprelay06.wdc07v.mail.ibm.com ([9.208.129.118]) by ppma02dal.us.ibm.com with ESMTP id 3m3aeafmxw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 02 Dec 2022 23:10:40 +0000 Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104]) by smtprelay06.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B2NAcKV63111450 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 2 Dec 2022 23:10:38 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9069358067 for ; Fri, 2 Dec 2022 23:10:38 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E2B05804C for ; Fri, 2 Dec 2022 23:10:38 +0000 (GMT) Received: from [9.211.124.62] (unknown [9.211.124.62]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP for ; Fri, 2 Dec 2022 23:10:38 +0000 (GMT) Message-ID: <0c4e4d95-f9e1-43c1-8092-357742bec2d9@linux.vnet.ibm.com> Date: Fri, 2 Dec 2022 17:10:38 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH 6/6] configure: Move nm, objdump, and readelf to LIBC_PROG_BINUTILS Content-Language: en-US To: libc-alpha@sourceware.org References: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> <20221202190030.1671870-7-adhemerval.zanella@linaro.org> From: Rajalakshmi Srinivasaraghavan In-Reply-To: <20221202190030.1671870-7-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: iCBKfV3LSqK9Gpu9uznTvUp99FSUcotY X-Proofpoint-GUID: iCBKfV3LSqK9Gpu9uznTvUp99FSUcotY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-02_12,2022-12-01_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 phishscore=0 clxscore=1015 adultscore=0 mlxscore=0 bulkscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212020181 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/2/22 1:00 PM, Adhemerval Zanella via Libc-alpha wrote: > It allows to be overriden on configure tie the tools with the cross > compiler used. > --- > aclocal.m4 | 12 +++ > configure | 295 +++------------------------------------------------ > configure.ac | 4 - > 3 files changed, 27 insertions(+), 284 deletions(-) > > diff --git a/aclocal.m4 b/aclocal.m4 > index cbe3c4698a..c7fea8a722 100644 > --- a/aclocal.m4 > +++ b/aclocal.m4 > @@ -133,6 +133,18 @@ if test -z "$GPROF"; then > GPROF=`$CC -print-prog-name=gprof` > fi > AC_SUBST(GPROF) > +if test -z "$READELF"; then > + GPROF=`$CC -print-prog-name=readelf` > +fi > +AC_SUBST(READELF) > +if test -z "$OBJDUMP"; then > + GPROF=`$CC -print-prog-name=objdump` > +fi > +AC_SUBST(OBJDUMP) > +if test -z "$NM"; then > + GPROF=`$CC -print-prog-name=nm` > +fi Typo here. It should be READELF, OBJDUMP and NM instead of GPROF. > +AC_SUBST(NM) > ]) > > dnl Run a static link test with -nostdlib -nostartfiles. > diff --git a/configure b/configure > index 8f91bb6e11..5967e5bf67 100755 > --- a/configure > +++ b/configure > @@ -646,7 +646,6 @@ libc_cv_with_fp > PYTHON > PYTHON_PROG > AUTOCONF > -NM > BISON > AWK > SED > @@ -654,6 +653,9 @@ MAKEINFO > MSGFMT > MAKE > LD > +NM > +OBJDUMP > +READELF > GPROF > OBJCOPY > AR > @@ -683,8 +685,6 @@ sysheaders > ac_ct_CXX > CXXFLAGS > CXX > -OBJDUMP > -READELF > CPP > cross_compiling > BUILD_CC > @@ -2870,190 +2870,6 @@ if test -z "$CPP"; then > CPP="$CC -E" > fi > > -if test -n "$ac_tool_prefix"; then > - # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args. > -set dummy ${ac_tool_prefix}readelf; ac_word=$2 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 > -$as_echo_n "checking for $ac_word... " >&6; } > -if ${ac_cv_prog_READELF+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - if test -n "$READELF"; then > - ac_cv_prog_READELF="$READELF" # Let the user override the test. > -else > -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR > -for as_dir in $PATH > -do > - IFS=$as_save_IFS > - test -z "$as_dir" && as_dir=. > - for ac_exec_ext in '' $ac_executable_extensions; do > - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > - ac_cv_prog_READELF="${ac_tool_prefix}readelf" > - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 > - break 2 > - fi > -done > - done > -IFS=$as_save_IFS > - > -fi > -fi > -READELF=$ac_cv_prog_READELF > -if test -n "$READELF"; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 > -$as_echo "$READELF" >&6; } > -else > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 > -$as_echo "no" >&6; } > -fi > - > - > -fi > -if test -z "$ac_cv_prog_READELF"; then > - ac_ct_READELF=$READELF > - # Extract the first word of "readelf", so it can be a program name with args. > -set dummy readelf; ac_word=$2 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 > -$as_echo_n "checking for $ac_word... " >&6; } > -if ${ac_cv_prog_ac_ct_READELF+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - if test -n "$ac_ct_READELF"; then > - ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test. > -else > -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR > -for as_dir in $PATH > -do > - IFS=$as_save_IFS > - test -z "$as_dir" && as_dir=. > - for ac_exec_ext in '' $ac_executable_extensions; do > - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > - ac_cv_prog_ac_ct_READELF="readelf" > - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 > - break 2 > - fi > -done > - done > -IFS=$as_save_IFS > - > -fi > -fi > -ac_ct_READELF=$ac_cv_prog_ac_ct_READELF > -if test -n "$ac_ct_READELF"; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5 > -$as_echo "$ac_ct_READELF" >&6; } > -else > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 > -$as_echo "no" >&6; } > -fi > - > - if test "x$ac_ct_READELF" = x; then > - READELF="false" > - else > - case $cross_compiling:$ac_tool_warned in > -yes:) > -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 > -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} > -ac_tool_warned=yes ;; > -esac > - READELF=$ac_ct_READELF > - fi > -else > - READELF="$ac_cv_prog_READELF" > -fi > - > -if test -n "$ac_tool_prefix"; then > - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. > -set dummy ${ac_tool_prefix}objdump; ac_word=$2 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 > -$as_echo_n "checking for $ac_word... " >&6; } > -if ${ac_cv_prog_OBJDUMP+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - if test -n "$OBJDUMP"; then > - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. > -else > -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR > -for as_dir in $PATH > -do > - IFS=$as_save_IFS > - test -z "$as_dir" && as_dir=. > - for ac_exec_ext in '' $ac_executable_extensions; do > - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" > - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 > - break 2 > - fi > -done > - done > -IFS=$as_save_IFS > - > -fi > -fi > -OBJDUMP=$ac_cv_prog_OBJDUMP > -if test -n "$OBJDUMP"; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 > -$as_echo "$OBJDUMP" >&6; } > -else > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 > -$as_echo "no" >&6; } > -fi > - > - > -fi > -if test -z "$ac_cv_prog_OBJDUMP"; then > - ac_ct_OBJDUMP=$OBJDUMP > - # Extract the first word of "objdump", so it can be a program name with args. > -set dummy objdump; ac_word=$2 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 > -$as_echo_n "checking for $ac_word... " >&6; } > -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - if test -n "$ac_ct_OBJDUMP"; then > - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. > -else > -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR > -for as_dir in $PATH > -do > - IFS=$as_save_IFS > - test -z "$as_dir" && as_dir=. > - for ac_exec_ext in '' $ac_executable_extensions; do > - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > - ac_cv_prog_ac_ct_OBJDUMP="objdump" > - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 > - break 2 > - fi > -done > - done > -IFS=$as_save_IFS > - > -fi > -fi > -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP > -if test -n "$ac_ct_OBJDUMP"; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 > -$as_echo "$ac_ct_OBJDUMP" >&6; } > -else > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 > -$as_echo "no" >&6; } > -fi > - > - if test "x$ac_ct_OBJDUMP" = x; then > - OBJDUMP="false" > - else > - case $cross_compiling:$ac_tool_warned in > -yes:) > -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 > -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} > -ac_tool_warned=yes ;; > -esac > - OBJDUMP=$ac_ct_OBJDUMP > - fi > -else > - OBJDUMP="$ac_cv_prog_OBJDUMP" > -fi > - > > # We need the C++ compiler only for testing. > ac_ext=cpp > @@ -4160,6 +3976,18 @@ if test -z "$GPROF"; then > GPROF=`$CC -print-prog-name=gprof` > fi > > +if test -z "$READELF"; then > + GPROF=`$CC -print-prog-name=readelf` > +fi > + > +if test -z "$OBJDUMP"; then > + GPROF=`$CC -print-prog-name=objdump` > +fi > + > +if test -z "$NM"; then > + GPROF=`$CC -print-prog-name=nm` > +fi > + Likewise. > > > # Accept binutils 2.25 or newer. > @@ -4781,99 +4609,6 @@ if test $libc_cv_compiler_ok != yes; then : > critic_missing="$critic_missing compiler" > fi > > -if test -n "$ac_tool_prefix"; then > - # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. > -set dummy ${ac_tool_prefix}nm; ac_word=$2 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 > -$as_echo_n "checking for $ac_word... " >&6; } > -if ${ac_cv_prog_NM+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - if test -n "$NM"; then > - ac_cv_prog_NM="$NM" # Let the user override the test. > -else > -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR > -for as_dir in $PATH > -do > - IFS=$as_save_IFS > - test -z "$as_dir" && as_dir=. > - for ac_exec_ext in '' $ac_executable_extensions; do > - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > - ac_cv_prog_NM="${ac_tool_prefix}nm" > - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 > - break 2 > - fi > -done > - done > -IFS=$as_save_IFS > - > -fi > -fi > -NM=$ac_cv_prog_NM > -if test -n "$NM"; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 > -$as_echo "$NM" >&6; } > -else > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 > -$as_echo "no" >&6; } > -fi > - > - > -fi > -if test -z "$ac_cv_prog_NM"; then > - ac_ct_NM=$NM > - # Extract the first word of "nm", so it can be a program name with args. > -set dummy nm; ac_word=$2 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 > -$as_echo_n "checking for $ac_word... " >&6; } > -if ${ac_cv_prog_ac_ct_NM+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - if test -n "$ac_ct_NM"; then > - ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. > -else > -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR > -for as_dir in $PATH > -do > - IFS=$as_save_IFS > - test -z "$as_dir" && as_dir=. > - for ac_exec_ext in '' $ac_executable_extensions; do > - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > - ac_cv_prog_ac_ct_NM="nm" > - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 > - break 2 > - fi > -done > - done > -IFS=$as_save_IFS > - > -fi > -fi > -ac_ct_NM=$ac_cv_prog_ac_ct_NM > -if test -n "$ac_ct_NM"; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 > -$as_echo "$ac_ct_NM" >&6; } > -else > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 > -$as_echo "no" >&6; } > -fi > - > - if test "x$ac_ct_NM" = x; then > - NM="false" > - else > - case $cross_compiling:$ac_tool_warned in > -yes:) > -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 > -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} > -ac_tool_warned=yes ;; > -esac > - NM=$ac_ct_NM > - fi > -else > - NM="$ac_cv_prog_NM" > -fi > - > - > if test "x$maintainer" = "xyes"; then > for ac_prog in autoconf > do > diff --git a/configure.ac b/configure.ac > index 022b8f68bc..011844a3d4 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -51,8 +51,6 @@ if test $host != $build; then > fi > AC_SUBST(cross_compiling) > AC_PROG_CPP > -AC_CHECK_TOOL(READELF, readelf, false) > -AC_CHECK_TOOL(OBJDUMP, objdump, false) > > # We need the C++ compiler only for testing. > AC_PROG_CXX > @@ -632,8 +630,6 @@ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]], [[ > AS_IF([test $libc_cv_compiler_ok != yes], > [critic_missing="$critic_missing compiler"]) > > -AC_CHECK_TOOL(NM, nm, false) > - > if test "x$maintainer" = "xyes"; then > AC_CHECK_PROGS(AUTOCONF, autoconf, no) > case "x$AUTOCONF" in