From 46fd43c868d4bcffb7f4b63e98996dd955793b32 Mon Sep 17 00:00:00 2001 From: Packit Date: Sep 18 2020 15:00:19 +0000 Subject: Apply patch 0001-Merge-RISCV-32-64-bit-configurations-definition.patch patch_name: 0001-Merge-RISCV-32-64-bit-configurations-definition.patch present_in_specfile: true location_in_specfile: 2 --- diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 2cd9821..ef9f9e2 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -603,13 +603,8 @@ # define mach_type_known # endif # if defined(__riscv) && defined(LINUX) -# if __riscv_xlen == 32 -# define RISCV32 -# define mach_type_known -# elif __riscv_xlen == 64 -# define RISCV64 -# define mach_type_known -# endif +# define RISCV +# define mach_type_known # endif /* Feel free to add more clauses here */ @@ -2659,23 +2654,10 @@ # endif # endif -# ifdef RISCV32 -# define CPP_WORDSZ 32 -# define MACH_TYPE "RISC-V32" -# define ALIGNMENT 4 -# ifdef LINUX -# define OS_TYPE "LINUX" - extern int __data_start[]; -# define DATASTART ((ptr_t)__data_start) -# define LINUX_STACKBOTTOM -# define DYNAMIC_LOADING -# endif -# endif /* RISCV32 */ - -# ifdef RISCV64 -# define CPP_WORDSZ 64 -# define MACH_TYPE "RISC-V64" -# define ALIGNMENT 8 +# ifdef RISCV +# define MACH_TYPE "RISC-V" +# define CPP_WORDSZ __riscv_xlen /* 32 or 64 */ +# define ALIGNMENT (CPP_WORDSZ/8) # ifdef LINUX # define OS_TYPE "LINUX" extern int __data_start[]; @@ -2683,7 +2665,7 @@ # define LINUX_STACKBOTTOM # define DYNAMIC_LOADING # endif -# endif /* RISCV64 */ +# endif /* RISCV */ #if defined(__GLIBC__) && !defined(DONT_USE_LIBC_PRIVATES) /* Use glibc's stack-end marker. */