Tags: Patch

Hi!

There is a new project called J-Core that is working on reimplementing the old
SuperH architecture as an open source architecture. They are currently 
supporting
the SH-2 CPU (called J-2) and are working to release the more powerful J-3
CPU which is based on the SH-3 design.

In order to bootstrap Debian on "sh3", we need to add it as a compilation target
to guile. This is done by the attached patch which adds the case for "sh3" for
cpu-endianness and triplet-pointer-size in module/system/base/target.scm.

Would be great to have this applied to be able to support Debian on an actual
open source CPU.

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
>From 43d106a816a11c1f732935b49259677e13ba9b97 Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de>
Date: Sat, 21 Jan 2017 12:49:31 +0100
Subject: [PATCH] Recognize sh3 as compilation targets

* module/system/base/target.scm (cpu-endianness, triplet-pointer-size):
  Add case for "sh3".

Signed-off-by: John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de>
---
 module/system/base/target.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/module/system/base/target.scm b/module/system/base/target.scm
index 02febf8e4..e80bf84e4 100644
--- a/module/system/base/target.scm
+++ b/module/system/base/target.scm
@@ -63,7 +63,7 @@
       (cond ((string-match "^i[0-9]86$" cpu)
              (endianness little))
             ((member cpu '("x86_64" "ia64"
-                           "powerpcle" "powerpc64le" "mipsel" "mips64el" "nios2" "sh4" "alpha"))
+                           "powerpcle" "powerpc64le" "mipsel" "mips64el" "nios2" "sh3" "sh4" "alpha"))
              (endianness little))
             ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
                            "mips" "mips64" "m68k" "s390x"))
@@ -102,7 +102,7 @@
 
           ((string-match "64$" cpu) 8)
           ((string-match "64_?[lbe][lbe]$" cpu) 8)
-          ((member cpu '("sparc" "powerpc" "mips" "mipsel" "nios2" "m68k" "sh4")) 4)
+          ((member cpu '("sparc" "powerpc" "mips" "mipsel" "nios2" "m68k" "sh3" "sh4")) 4)
           ((member cpu '("s390x" "alpha")) 8)
           ((string-match "^arm.*" cpu) 4)
           (else (error "unknown CPU word size" cpu)))))
-- 
2.11.0

Reply via email to