Blame SOURCES/0001-Merge-RISCV-32-64-bit-configurations-definition.patch

a1bfde
diff -ur gc-7.6.4.old/include/private/gcconfig.h gc-7.6.4/include/private/gcconfig.h
a1bfde
--- gc-7.6.4.old/include/private/gcconfig.h	2018-02-27 09:35:01.074561443 +0000
a1bfde
+++ gc-7.6.4/include/private/gcconfig.h	2018-02-27 09:35:38.571522689 +0000
a1bfde
@@ -603,13 +603,8 @@
a1bfde
 #   define mach_type_known
a1bfde
 # endif
a1bfde
 # if defined(__riscv) && defined(LINUX)
a1bfde
-#   if __riscv_xlen == 32
a1bfde
-#     define RISCV32
a1bfde
-#     define mach_type_known
a1bfde
-#   elif __riscv_xlen == 64
a1bfde
-#     define RISCV64
a1bfde
-#     define mach_type_known
a1bfde
-#   endif
a1bfde
+#   define RISCV
a1bfde
+#   define mach_type_known
a1bfde
 # endif
a1bfde
 
a1bfde
 /* Feel free to add more clauses here */
a1bfde
@@ -2659,23 +2654,10 @@
a1bfde
 #   endif
a1bfde
 # endif
a1bfde
 
a1bfde
-# ifdef RISCV32
a1bfde
-#   define CPP_WORDSZ 32
a1bfde
-#   define MACH_TYPE "RISC-V32"
a1bfde
-#   define ALIGNMENT 4
a1bfde
-#   ifdef LINUX
a1bfde
-#     define OS_TYPE "LINUX"
a1bfde
-      extern int __data_start[];
a1bfde
-#     define DATASTART ((ptr_t)__data_start)
a1bfde
-#     define LINUX_STACKBOTTOM
a1bfde
-#     define DYNAMIC_LOADING
a1bfde
-#   endif
a1bfde
-# endif /* RISCV32 */
a1bfde
-
a1bfde
-# ifdef RISCV64
a1bfde
-#   define CPP_WORDSZ 64
a1bfde
-#   define MACH_TYPE "RISC-V64"
a1bfde
-#   define ALIGNMENT 8
a1bfde
+# ifdef RISCV
a1bfde
+#   define MACH_TYPE "RISC-V"
a1bfde
+#   define CPP_WORDSZ __riscv_xlen /* 32 or 64 */
a1bfde
+#   define ALIGNMENT (CPP_WORDSZ/8)
a1bfde
 #   ifdef LINUX
a1bfde
 #     define OS_TYPE "LINUX"
a1bfde
       extern int __data_start[];
a1bfde
@@ -2683,7 +2665,7 @@
a1bfde
 #     define LINUX_STACKBOTTOM
a1bfde
 #     define DYNAMIC_LOADING
a1bfde
 #   endif
a1bfde
-# endif /* RISCV64 */
a1bfde
+# endif /* RISCV */
a1bfde
 
a1bfde
 #if defined(__GLIBC__) && !defined(DONT_USE_LIBC_PRIVATES)
a1bfde
   /* Use glibc's stack-end marker. */