public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug general/28975] New: run-large-elf-file.sh fails in 32-bit cross-compile on 64-bit machine
@ 2022-03-17 20:40 eric.boehm at broadcom dot com
  2022-03-20 23:19 ` [Bug general/28975] " mark at klomp dot org
  2022-03-24 11:34 ` mark at klomp dot org
  0 siblings, 2 replies; 3+ messages in thread
From: eric.boehm at broadcom dot com @ 2022-03-17 20:40 UTC (permalink / raw)
  To: elfutils-devel

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

            Bug ID: 28975
           Summary: run-large-elf-file.sh fails in 32-bit cross-compile on
                    64-bit machine
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: general
          Assignee: unassigned at sourceware dot org
          Reporter: eric.boehm at broadcom dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

run-large-elf-file.sh should not run if it is a 32-bit cross-compile on a
64-bit machine.

The shell script checks

long_bit=$(getconf LONG_BIT)

which will return 64 even if it is a 32-bit compile

Here's a patch which is a bit of a hack. There are probably more appropriate
ways to fix this.

This affects versions 0.181-0.186

--- elfutils-0.181/tests/run-large-elf-file.sh.orig     2020-09-08
04:45:06.000000000 -0700
+++ elfutils-0.181/tests/run-large-elf-file.sh  2022-03-17 12:23:53.967607000
-0700
@@ -21,3 +21,8 @@
 # ELF files.
-long_bit=$(getconf LONG_BIT)
+if [[ $CC =~ "-m32" ]]
+then
+    long_bit=32
+else
+    long_bit=$(getconf LONG_BIT)
+fi
 echo "long_bit: $long_bit"

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-24 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 20:40 [Bug general/28975] New: run-large-elf-file.sh fails in 32-bit cross-compile on 64-bit machine eric.boehm at broadcom dot com
2022-03-20 23:19 ` [Bug general/28975] " mark at klomp dot org
2022-03-24 11:34 ` mark at klomp dot org

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).