xorg-cf-files/u_riscv.patch
Stefan Dirsch 65fd274b74 - Update to version 1.0.7
* This is a minor update to resolve a compatibility issue with
    GNU binutils 2.36.
- supersedes u_ar-clq-Imake.tmpl-binutils_2.36.patch 
- refreshed u_riscv.patch, u_xorg-cf-files-D_DEFAULT_SOURCE.patch

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-cf-files?expand=0&rev=24
2021-08-02 10:44:22 +00:00

84 lines
2.9 KiB
Diff

Author: Andreas Schwab <schwab@suse.de>
Subject: Add support for riscv64
Patch-Mainline: To be upstreamed
Index: xorg-cf-files-1.0.7/Imake.cf
===================================================================
--- xorg-cf-files-1.0.7.orig/Imake.cf
+++ xorg-cf-files-1.0.7/Imake.cf
@@ -1037,6 +1037,11 @@ XCOMM Keep cpp from replacing path eleme
# define AArch64Architecture
# undef __aarch64__
# endif
+# if defined(__riscv) && __riscv_xlen == 64
+# define RiscV64Architecture
+# undef __riscv
+# undef __riscv_xlen
+# endif
#endif /* linux || __GLIBC__ */
#if (defined(__Lynx__) || defined(Lynx)) && (defined(i386) || defined(__i386__) || defined(__x86__) || defined(__powerpc__) || defined(__sparc__) || defined(sparc))
Index: xorg-cf-files-1.0.7/linux.cf
===================================================================
--- xorg-cf-files-1.0.7.orig/linux.cf
+++ xorg-cf-files-1.0.7/linux.cf
@@ -584,7 +584,7 @@ InstallNamedTargetNoClobber(install,file
#define MkdirHierCmd mkdir -p
#ifndef HaveLib64
-# if defined (AMD64Architecture) || defined (s390xArchitecture) || defined (Ppc64Architecture) || defined (AArch64Architecture)
+# if defined (AMD64Architecture) || defined (s390xArchitecture) || defined (Ppc64Architecture) || defined (AArch64Architecture) || defined(RiscV64Architecture)
# define HaveLib64 YES
# else
# define HaveLib64 NO
@@ -1000,6 +1000,15 @@ InstallNamedTargetNoClobber(install,file
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#endif /* AArch64Architecture */
+#ifdef RiscV64Architecture
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2RiscV64Opt
+# endif
+# define LinuxMachineDefines -D__riscv -D__riscv_xlen=64
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
+#endif /* RiscV64Architecture */
+
#ifndef StandardDefines
# ifdef __linux__
# define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
Index: xorg-cf-files-1.0.7/xfree86.cf
===================================================================
--- xorg-cf-files-1.0.7.orig/xfree86.cf
+++ xorg-cf-files-1.0.7/xfree86.cf
@@ -2052,6 +2052,12 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japane
# endif
#endif
+#if HasGcc2 && defined(RiscV64Architecture)
+# ifndef DefaultGcc2RiscV64Opt
+# define DefaultGcc2RiscV64Opt -O2 GccAliasingArgs
+# endif
+#endif
+
#ifndef DefaultGcc2DebugOpt
# define DefaultGcc2DebugOpt -g
#endif
Index: xorg-cf-files-1.0.7/xorg.cf
===================================================================
--- xorg-cf-files-1.0.7.orig/xorg.cf
+++ xorg-cf-files-1.0.7/xorg.cf
@@ -1603,6 +1603,12 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japane
# endif
#endif
+#if HasGcc2 && defined(RiscV64Architecture)
+# ifndef DefaultGcc2RiscV64Opt
+# define DefaultGcc2RiscV64Opt -O2 GccAliasingArgs
+# endif
+#endif
+
#ifndef DefaultGcc2DebugOpt
# define DefaultGcc2DebugOpt -g
#endif