From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2041) id 828773858D32; Thu, 7 Jul 2022 05:37:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 828773858D32 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Vladimir Mezentsev To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] gprofng: adjust GPROFNG_VARIANT X-Act-Checkin: binutils-gdb X-Git-Author: Vladimir Mezentsev X-Git-Refname: refs/heads/master X-Git-Oldrev: 3d5d6bd55433735c4fc620a47b543065582d06ae X-Git-Newrev: 1bb1f55d648e9c32bbead00afc95761646a6d050 Message-Id: <20220707053740.828773858D32@sourceware.org> Date: Thu, 7 Jul 2022 05:37:40 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2022 05:37:40 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D1bb1f55d648e= 9c32bbead00afc95761646a6d050 commit 1bb1f55d648e9c32bbead00afc95761646a6d050 Author: Vladimir Mezentsev Date: Wed Jul 6 13:52:57 2022 -0700 gprofng: adjust GPROFNG_VARIANT =20 GPROFNG_VARIANT depends on compiler options, not on $(host). =20 gprofng/ChangeLog 2022-07-06 Vladimir Mezentsev =20 PR gprofng/29116 * libcollector/configure.ac: Adjust GPROFNG_VARIANT. * libcollector/configure: Rebuild. Diff: --- gprofng/libcollector/configure | 23 +++++++++++++---------- gprofng/libcollector/configure.ac | 23 +++++++++++++---------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/gprofng/libcollector/configure b/gprofng/libcollector/configure index 52d9892fadd..cbb20405ffd 100755 --- a/gprofng/libcollector/configure +++ b/gprofng/libcollector/configure @@ -15476,17 +15476,20 @@ $as_echo "$as_me: WARNING: Cannot set --enable-sh= ared for gprofng/libcollector. fi =20 GPROFNG_VARIANT=3Dunknown -case "${host}" in - x86_64-*-linux*) - GPROFNG_VARIANT=3Damd64-Linux - ;; - i?86-*-linux*) +x=3D`echo | $CC $CFLAGS -dM -E - | grep -w __x86_64` +if test -n "$x"; then + GPROFNG_VARIANT=3Damd64-Linux +else + x=3D`echo | $CC $CFLAGS -dM -E - | grep -w __i386__` + if test -n "$x"; then GPROFNG_VARIANT=3Dintel-Linux - ;; - aarch64-*-linux*) - GPROFNG_VARIANT=3Daarch64-Linux - ;; -esac + else + x=3D`echo | $CC $CFLAGS -dM -E - | grep -w __aarch64__` + if test -n "$x"; then + GPROFNG_VARIANT=3Daarch64-Linux + fi + fi +fi =20 =20 ac_ext=3Dc diff --git a/gprofng/libcollector/configure.ac b/gprofng/libcollector/confi= gure.ac index 2e67e740c9e..d3c6bd5588d 100644 --- a/gprofng/libcollector/configure.ac +++ b/gprofng/libcollector/configure.ac @@ -42,17 +42,20 @@ if test "$enable_shared" !=3D "yes"; then fi =20 GPROFNG_VARIANT=3Dunknown -case "${host}" in - x86_64-*-linux*) - GPROFNG_VARIANT=3Damd64-Linux - ;; - i?86-*-linux*) +x=3D`echo | $CC $CFLAGS -dM -E - | grep -w __x86_64` +if test -n "$x"; then + GPROFNG_VARIANT=3Damd64-Linux +else + x=3D`echo | $CC $CFLAGS -dM -E - | grep -w __i386__` + if test -n "$x"; then GPROFNG_VARIANT=3Dintel-Linux - ;; - aarch64-*-linux*) - GPROFNG_VARIANT=3Daarch64-Linux - ;; -esac + else + x=3D`echo | $CC $CFLAGS -dM -E - | grep -w __aarch64__` + if test -n "$x"; then + GPROFNG_VARIANT=3Daarch64-Linux + fi + fi +fi AC_SUBST(GPROFNG_VARIANT) =20 ACX_PROG_CC_WARNING_OPTS([-Wno-nonnull-compare], [GPROFNG_NO_NONNULL_COMPA= RE_CFLAGS])