public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [PATCH] configure: Don't check whether -m64 works for 32bit host biarch check
Date: Mon, 21 Mar 2022 00:47:51 +0100	[thread overview]
Message-ID: <20220320234751.175910-1-mark@klomp.org> (raw)

Running a 32bit backtrace test against a 64bit binary doesn't work.
Only a 64bit binary can backtrace a 32bit binary. So disable the
biarch check that inserts -m64 for a 32bit host.

https://sourceware.org/bugzilla/show_bug.cgi?id=24158

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 ChangeLog    | 5 +++++
 configure.ac | 2 --
 m4/ChangeLog | 4 ++++
 m4/biarch.m4 | 2 +-
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2f46f903..3357f69b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-03-20  Mark Wielaard  <mark@klomp.org>
+
+	* configure.ac: Remove -m64 on 32bit target comments for
+	utrace_BIARCH check.
+
 2021-03-14  Mark Wielaard  <mark@klomp.org>
 
 	* configure.ac: Use AS_HELP_STRING instead of AC_HELP_STRING.
diff --git a/configure.ac b/configure.ac
index 1aff9f30..2418d474 100644
--- a/configure.ac
+++ b/configure.ac
@@ -706,9 +706,7 @@ if test "$sys_user_has_user_regs" = "yes"; then
 fi
 
 # On a 64-bit host where can can use $CC -m32, we'll run two sets of tests.
-# Likewise in a 32-bit build on a host where $CC -m64 works.
 utrace_BIARCH
-# `$utrace_biarch' will be `-m64' even on an uniarch i386 machine.
 CC_BIARCH="$CC $utrace_biarch"
 AC_SUBST([CC_BIARCH])
 
diff --git a/m4/ChangeLog b/m4/ChangeLog
index d4c3c28c..8729f58c 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,7 @@
+2022-03-20  Mark Wielaard  <mark@klomp.org>
+
+	* biarch.m4: Don't check whether -m64 works for 32bit host.
+
 2022-03-14  Mark Wielaard  <mark@klomp.org>
 
 	* biarch.m4: Use AS_HELP_STRING instead of AC_HELP_STRING.
diff --git a/m4/biarch.m4 b/m4/biarch.m4
index 68618473..c7baead7 100644
--- a/m4/biarch.m4
+++ b/m4/biarch.m4
@@ -34,7 +34,7 @@ AC_ARG_WITH([biarch],
 AS_IF([test $utrace_biarch_forced = yes], [dnl
 utrace_cv_cc_biarch=yes
 AC_MSG_NOTICE([enabling biarch tests regardless using $biarch_CC])], [dnl
-AS_IF([test x$utrace_cv_CC_m32 != xnone], [dnl
+AS_IF([test x$utrace_cv_CC_m32 != xnone -a x$utrace_cv_host64 != xno], [dnl
 AC_CACHE_CHECK([whether $biarch_CC makes executables we can run],
 	       utrace_cv_cc_biarch, [dnl
 save_CC="$CC"
-- 
2.30.2


             reply	other threads:[~2022-03-20 23:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-20 23:47 Mark Wielaard [this message]
2022-03-24 11:35 ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220320234751.175910-1-mark@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).