diff --git a/debian/changelog b/debian/changelog index 5cae5f6..d01647e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xutils-dev (1:7.7.2-deepin1) unstable; urgency=medium + + * Add support for RISC-V 64 + + -- Clansty Mon, 09 Jan 2023 17:25:04 +0800 + xutils-dev (1:7.7.1-1+dde) UNRELEASED; urgency=medium * update diff --git a/debian/patches/10_riscv_support.patch b/debian/patches/10_riscv_support.patch new file mode 100644 index 0000000..d720102 --- /dev/null +++ b/debian/patches/10_riscv_support.patch @@ -0,0 +1,75 @@ +From: https://github.com/bmwiedemann/openSUSE/blob/4eded4be9125b3e8b4e2e0730d07b4f1e536b052/packages/x/xorg-cf-files/u_riscv.patch +Author: Andreas Schwab +Subject: Add support for riscv64 +Date: Mon, 09 Jan 2023 17:25:04 +0800 + +Index: xutils-dev/xorg-cf-files/Imake.cf +=================================================================== +--- xutils-dev.orig/xorg-cf-files/Imake.cf ++++ xutils-dev/xorg-cf-files/Imake.cf +@@ -1047,6 +1047,11 @@ XCOMM Keep cpp from replacing path eleme + # endif + # undef __sw_64__ + # endif /* __sw_64__ */ ++# 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: xutils-dev/xorg-cf-files/linux.cf +=================================================================== +--- xutils-dev.orig/xorg-cf-files/linux.cf ++++ xutils-dev/xorg-cf-files/linux.cf +@@ -1139,6 +1139,15 @@ InstallNamedTargetNoClobber(install,file + # endif + #endif /* Sw64Architecture */ + ++#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: xutils-dev/xorg-cf-files/xfree86.cf +=================================================================== +--- xutils-dev.orig/xorg-cf-files/xfree86.cf ++++ xutils-dev/xorg-cf-files/xfree86.cf +@@ -2091,6 +2091,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: xutils-dev/xorg-cf-files/xorg.cf +=================================================================== +--- xutils-dev.orig/xorg-cf-files/xorg.cf ++++ xutils-dev/xorg-cf-files/xorg.cf +@@ -1663,6 +1663,12 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japane + # endif + #endif + ++#if HasGcc2 && defined(RiscV64Architecture) ++# ifndef DefaultGcc2RiscV64Opt ++# define DefaultGcc2RiscV64Opt -O2 GccAliasingArgs ++# endif ++#endif ++ + #ifndef DefaultGcc2DebugOpt + # define DefaultGcc2DebugOpt -g + #endif diff --git a/debian/patches/series b/debian/patches/series index 370be0c..f5c56de 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 06_font_path.diff 07_gnu_manpath.diff 09-add-sunway-support.diff +10_riscv_support.patch