From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 57BBC3858C83 for ; Wed, 11 Jan 2023 20:30:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 57BBC3858C83 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673469027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=krxWf8kYkKg9D7sLNWiJs8ds83pDV6ASSMrdI7tycEQ=; b=T4T+JfSnkrsZC323pDIgoslq2ZM6rfIXXuwUS7aaszEXVo+6UFVRRfPdbAIeCR3nq4VPsO /VWnZA+5FP8cPkfr74zz82yomJUN3jyMNxJimo4O5mxuliXfQQVWl41QAeZQMx+hTBZDr/ sGtd7whaih7oUxBL0M6xRSjWQpTfFI4= Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-354-pDIopUsgMB-7u9QVjqy2zw-1; Wed, 11 Jan 2023 15:30:15 -0500 X-MC-Unique: pDIopUsgMB-7u9QVjqy2zw-1 Received: by mail-il1-f199.google.com with SMTP id n15-20020a056e021baf00b0030387c2e1d3so11711687ili.5 for ; Wed, 11 Jan 2023 12:30:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=krxWf8kYkKg9D7sLNWiJs8ds83pDV6ASSMrdI7tycEQ=; b=aMW6WvqRX4Httq8CG5MA4G/pQB2pdfIJ7YHbbkK9qq8zf7s+zou2k9ixL80DRvPwCI KkVVgZFxjhadt87fp720JbxLsMo/SAjuZK7B5OQ8QnoCskVifyCTIIlSTNtRnTxr27JL id+RVf6aJ5leakCQQKZ2wOPPk5xLS41DZr7a4IE30eIfyzECsbCF+U8JmhZa4Z7ftEBx 3wO4bBfkyP3x4QRh14ehwZdpuYAGgVmZOJDAjMcUTdFyRY/njljgH2gGan03trV6wSyq mK9pXesfzZW6U25K5AAy68+/rcaBeAyL+8OHh1rKtSbm5+hBFVu6NAeEmcQwKLjljH2g tFWw== X-Gm-Message-State: AFqh2kqLzvEjCVg/81sH9EcGR5UVoLoVFcdQkrfJxBbiPid/fDZ8job7 +v5uvYtq1hC5E4jdrVlMOfFlmNWdwF7vjtR93g/OIxUbwNi3QV7dIykh9BXvmo6Zezs74N1iRSH 9c1FAP7CvrmxbdlvwPM59 X-Received: by 2002:a6b:d117:0:b0:6e3:1588:83d9 with SMTP id l23-20020a6bd117000000b006e3158883d9mr49888609iob.0.1673469013941; Wed, 11 Jan 2023 12:30:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXv25+tmDUi72ftnXOTm3ilSDdHjmNYdlKnrL2pMQ2x+TxXqHTTRGrlZJsX2CZaqlyx+2HIIKQ== X-Received: by 2002:a6b:d117:0:b0:6e3:1588:83d9 with SMTP id l23-20020a6bd117000000b006e3158883d9mr49888595iob.0.1673469013549; Wed, 11 Jan 2023 12:30:13 -0800 (PST) Received: from [192.168.0.241] (192-0-145-146.cpe.teksavvy.com. [192.0.145.146]) by smtp.gmail.com with ESMTPSA id m23-20020a026d17000000b003585ff0233asm4719148jac.150.2023.01.11.12.30.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Jan 2023 12:30:13 -0800 (PST) Message-ID: <3aa5972e-695e-9f98-4fb0-9cd7cda9cc29@redhat.com> Date: Wed, 11 Jan 2023 15:30:12 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v2 2/3] configure: Move nm, objdump, and readelf to LIBC_PROG_BINUTILS To: Adhemerval Zanella , libc-alpha@sourceware.org, Vineet Gupta , =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <20221206160243.455627-1-adhemerval.zanella@linaro.org> <20221206160243.455627-3-adhemerval.zanella@linaro.org> From: Carlos O'Donell Organization: Red Hat In-Reply-To: <20221206160243.455627-3-adhemerval.zanella@linaro.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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/6/22 11:02, Adhemerval Zanella wrote: > It allows to be overriden on configure tie the tools with the cross > compiler used. Please repost just this patch with the right commit message and I'll ACK that. The other two patches can go in right now IMO. > --- > aclocal.m4 | 12 ++ > configure | 295 ++--------------------------------- > configure.ac | 4 - > scripts/build-many-glibcs.py | 3 - > 4 files changed, 27 insertions(+), 287 deletions(-) > > diff --git a/aclocal.m4 b/aclocal.m4 > index cbe3c4698a..213835e1d5 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 > + READELF=`$CC -print-prog-name=readelf` > +fi > +AC_SUBST(READELF) > +if test -z "$OBJDUMP"; then > + OBJDUMP=`$CC -print-prog-name=objdump` > +fi > +AC_SUBST(OBJDUMP) > +if test -z "$NM"; then > + NM=`$CC -print-prog-name=nm` > +fi > +AC_SUBST(NM) OK. > ]) > > dnl Run a static link test with -nostdlib -nostartfiles. > diff --git a/configure b/configure > index 8f91bb6e11..efb891456a 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 > + READELF=`$CC -print-prog-name=readelf` > +fi > + > +if test -z "$OBJDUMP"; then > + OBJDUMP=`$CC -print-prog-name=objdump` > +fi > + > +if test -z "$NM"; then > + NM=`$CC -print-prog-name=nm` > +fi > + > > > # 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 > diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py > index 887ef7b6d5..a49f50b792 100755 > --- a/scripts/build-many-glibcs.py > +++ b/scripts/build-many-glibcs.py > @@ -1521,10 +1521,7 @@ class GlibcPolicyDefault(object): > '--host=%s' % glibc.triplet, > 'CC=%s' % glibc.tool_name('gcc'), > 'CXX=%s' % glibc.tool_name('g++'), > - 'NM=%s' % glibc.tool_name('nm'), > - 'OBJDUMP=%s' % glibc.tool_name('objdump'), > 'RANLIB=%s' % glibc.tool_name('ranlib'), > - 'READELF=%s' % glibc.tool_name('readelf'), OK. Cleanup bmg. Nice! :-) > 'STRIP=%s' % glibc.tool_name('strip'), > ] > if glibc.os == 'gnu': -- Cheers, Carlos.