|
1
|
+Description: Add support for riscv64
|
|
2
|
+ Upstream is not interested in adding these patches, they rejected changes when
|
|
3
|
+ proposed by people from Fedora.
|
|
4
|
+ .
|
|
5
|
+ They were already reluctant to add support back in 2014 for other arches,
|
|
6
|
+ e.g. OpenRISC or1k (I sent the support then).
|
|
7
|
+Author: Manuel A. Fernandez Montecelo <mafm@debian.org>
|
|
8
|
+Last-Update: 2018-05-03
|
|
9
|
+--- a/xorg-cf-files/Imake.cf
|
|
10
|
++++ b/xorg-cf-files/Imake.cf
|
|
11
|
+@@ -1037,6 +1037,10 @@
|
|
12
|
+ # define AArch64Architecture
|
|
13
|
+ # undef __aarch64__
|
|
14
|
+ # endif
|
|
15
|
++# if defined(__riscv) && (__riscv_xlen == 64)
|
|
16
|
++# define RISCV64Architecture
|
|
17
|
++# /* undef __riscv */
|
|
18
|
++# endif
|
|
19
|
+ #endif /* linux || __GLIBC__ */
|
|
20
|
+
|
|
21
|
+ #if (defined(__Lynx__) || defined(Lynx)) && (defined(i386) || defined(__i386__) || defined(__x86__) || defined(__powerpc__) || defined(__sparc__) || defined(sparc))
|
|
22
|
+--- a/xorg-cf-files/linux.cf
|
|
23
|
++++ b/xorg-cf-files/linux.cf
|
|
24
|
+@@ -1117,6 +1117,15 @@
|
|
25
|
+ # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
|
|
26
|
+ #endif /* AArch64Architecture */
|
|
27
|
+
|
|
28
|
++#ifdef RISCV64Architecture
|
|
29
|
++# ifndef OptimizedCDebugFlags
|
|
30
|
++# define OptimizedCDebugFlags DefaultGcc2RISCV64Opt DefaultGcc2OptimizeOpt GccAliasingArgs
|
|
31
|
++# endif
|
|
32
|
++# define LinuxMachineDefines -D__riscv
|
|
33
|
++# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
|
|
34
|
++# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
|
|
35
|
++#endif /* RISCV64Architecture */
|
|
36
|
++
|
|
37
|
+ #ifndef StandardDefines
|
|
38
|
+ # ifdef __linux__
|
|
39
|
+ # define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
|
|
40
|
+--- a/xorg-cf-files/xfree86.cf
|
|
41
|
++++ b/xorg-cf-files/xfree86.cf
|
|
42
|
+@@ -2067,6 +2067,12 @@
|
|
43
|
+ # endif
|
|
44
|
+ #endif
|
|
45
|
+
|
|
46
|
++#if HasGcc2 && defined(RISCV64Architecture)
|
|
47
|
++# ifndef DefaultGcc2RISCV64Opt
|
|
48
|
++# define DefaultGcc2RISCV64Opt DefaultGcc2OptimizeOpt GccAliasingArgs
|
|
49
|
++# endif
|
|
50
|
++#endif
|
|
51
|
++
|
|
52
|
+ #if HasGcc2 && defined(AlphaArchitecture)
|
|
53
|
+ # ifndef DefaultGcc2AxpOpt
|
|
54
|
+ # define DefaultGcc2AxpOpt DefaultGcc2OptimizeOpt GccAliasingArgs
|
|
55
|
+--- a/xorg-cf-files/xorg.cf
|
|
56
|
++++ b/xorg-cf-files/xorg.cf
|
|
57
|
+@@ -1584,6 +1584,12 @@
|
|
58
|
+ # endif
|
|
59
|
+ #endif
|
|
60
|
+
|
|
61
|
++#if HasGcc2 && defined(RISCV64Architecture)
|
|
62
|
++# ifndef DefaultGcc2RISCV64Opt
|
|
63
|
++# define DefaultGcc2RISCV64Opt DefaultGcc2OptimizeOpt GccAliasingArgs
|
|
64
|
++# endif
|
|
65
|
++#endif
|
|
66
|
++
|
|
67
|
+ #if HasGcc2 && defined(AMD64Architecture)
|
|
68
|
+ # ifndef DefaultGcc2AMD64Opt
|
|
69
|
+ # define DefaultGcc2AMD64Opt DefaultGcc2OptimizeOpt GccAliasingArgs |