File: cs-repairs-for-detecting-big-endian-mode.patch

package info (click to toggle)
racket 8.14%2Bdfsg1-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 167,832 kB
  • sloc: ansic: 300,640; lisp: 219,493; pascal: 79,842; sh: 20,087; asm: 13,494; makefile: 1,766; cpp: 1,713; javascript: 1,243; exp: 756; csh: 368; perl: 275; python: 270; xml: 106
file content (28 lines) | stat: -rw-r--r-- 988 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Matthew Flatt <mflatt@racket-lang.org>
Date: Mon, 11 Mar 2024 07:58:42 -0600
Subject: CS: repairs for detecting big-endian mode in boot file embedding

Fill out the list of big-endian platforms. I considered changes to
avoid depending on a list when not cross-compiling, but decided that
it is probably better to find out during a non-cross compile if the
list gets out-of-date.

Related to #4951
---
 src/cs/c/embed-boot.rkt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/cs/c/embed-boot.rkt b/src/cs/c/embed-boot.rkt
index 24ed404..7b8860e 100644
--- a/src/cs/c/embed-boot.rkt
+++ b/src/cs/c/embed-boot.rkt
@@ -127,7 +127,8 @@
      (define terminator-len (bytes-length terminator))
 
      (define big-endian?
-       (if target
+       (if (and target
+                (not (equal? target (symbol->string (system-type 'target-machine)))))
            (case target
              [("tppc32osx" "ppc32osx"
                           "tppc32le" "ppc32le"