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

package info (click to toggle)
racket 8.16%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 167,812 kB
  • sloc: ansic: 306,492; lisp: 211,972; pascal: 79,874; sh: 20,446; asm: 15,252; makefile: 1,738; cpp: 1,715; javascript: 1,340; exp: 789; python: 452; csh: 369; perl: 275; 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"