stage3: Build xz before rpm, since rpm depends on xz.
[fedora-riscv.git] / 0001-RISCV-64-bit-riscv64-support.patch
1 From abe2459b56723a1ee1366056be5e8546a1a8facb Mon Sep 17 00:00:00 2001
2 From: "Richard W.M. Jones" <rjones@redhat.com>
3 Date: Tue, 9 Aug 2016 18:25:24 +0100
4 Subject: [PATCH 1/4] RISCV 64-bit (riscv64) support.
5
6 Based on Mark Salter's aarch64 support patch (commit 8e1ca16c58).
7
8 Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
9 ---
10  installplatform |  6 ++++++
11  rpmrc.in        | 15 +++++++++++++++
12  2 files changed, 21 insertions(+)
13
14 diff --git a/installplatform b/installplatform
15 index ebade42..12339fc 100755
16 --- a/installplatform
17 +++ b/installplatform
18 @@ -174,6 +174,12 @@ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do
19         CANONARCH=m68k
20         CANONCOLOR=0
21         ;;
22 +    riscv64)
23 +       ISANAME=riscv
24 +       ISABITS=64
25 +       CANONARCH=riscv64
26 +       CANONCOLOR=3
27 +       ;;
28      noarch)
29         CANONARCH=noarch
30         CANONCOLOR=0
31 diff --git a/rpmrc.in b/rpmrc.in
32 index e888b0f..830b9ed 100644
33 --- a/rpmrc.in
34 +++ b/rpmrc.in
35 @@ -99,6 +99,8 @@ optflags: sh4a -O2 -g -mieee
36  
37  optflags: aarch64 -O2 -g
38  
39 +optflags: riscv64 -O2 -g
40 +
41  #############################################################
42  # Architecture colors
43  
44 @@ -147,6 +149,8 @@ archcolor: sh4 1
45  
46  archcolor: aarch64 2
47  
48 +archcolor: riscv64 2
49 +
50  #############################################################
51  # Canonical arch names and numbers
52  
53 @@ -243,6 +247,8 @@ arch_canon: mipsr6el: mipsr6el      20
54  arch_canon:    mips64r6: mips64r6      21
55  arch_canon:    mips64r6el: mips64r6el  21
56  
57 +arch_canon:    riscv: riscv64  22
58 +
59  #############################################################
60  # Canonical OS names and numbers
61  
62 @@ -368,6 +374,9 @@ buildarchtranslate: sh4a: sh4
63  
64  buildarchtranslate: aarch64: aarch64
65  
66 +buildarchtranslate: riscv: riscv64
67 +buildarchtranslate: riscv64: riscv64
68 +
69  #############################################################
70  # Architecture compatibility
71  
72 @@ -473,6 +482,9 @@ arch_compat: sh4a: sh4
73  
74  arch_compat: aarch64: noarch
75  
76 +arch_compat: riscv: noarch
77 +arch_compat: riscv64: noarch
78 +
79  os_compat:   IRIX64: IRIX
80  os_compat: solaris2.7: solaris2.3 solaris2.4 solaris2.5 solaris2.6
81  os_compat: solaris2.6: solaris2.3 solaris2.4 solaris2.5
82 @@ -506,6 +518,9 @@ buildarch_compat: ia64: noarch
83  
84  buildarch_compat: aarch64: noarch
85  
86 +buildarch_compat: riscv: noarch
87 +buildarch_compat: riscv64: noarch
88 +
89  buildarch_compat: athlon: i686
90  buildarch_compat: geode: i586
91  buildarch_compat: pentium4: pentium3
92 -- 
93 2.7.4
94