diff --git a/glibc/sysdeps/riscv/rv64/bits/wordsize.h b/glibc/sysdeps/riscv/bits/wordsize.h similarity index 94% rename from glibc/sysdeps/riscv/rv64/bits/wordsize.h rename to glibc/sysdeps/riscv/bits/wordsize.h index 1f643137..67bb48f5 100644 --- a/glibc/sysdeps/riscv/rv64/bits/wordsize.h +++ b/glibc/sysdeps/riscv/bits/wordsize.h @@ -16,5 +16,9 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#if defined __riscv64 #define __WORDSIZE 64 #define __WORDSIZE_TIME64_COMPAT32 1 +#else +#define __WORDSIZE 32 +#endif diff --git a/glibc/sysdeps/riscv/preconfigure b/glibc/sysdeps/riscv/preconfigure index 4e8364ab..5863d2dc 100644 --- a/glibc/sysdeps/riscv/preconfigure +++ b/glibc/sysdeps/riscv/preconfigure @@ -1,5 +1,8 @@ case "$machine" in -riscv64*) +riscv32*) base_machine=riscv machine=riscv/rv32 + machine=$machine/$config_machine + ;; +riscv*) case "$CC $CFLAGS $CPPFLAGS " in *" -m32 "*) riscv_cc_abi=32 ;; *" -m64 "*) riscv_cc_abi=64 ;; @@ -22,7 +25,4 @@ riscv64*) CPPFLAGS="$CPPFLAGS -m$riscv_config_abi" fi ;; -riscv*) base_machine=riscv machine=riscv/rv32 - machine=$machine/$config_machine - ;; esac diff --git a/glibc/sysdeps/riscv/rv32/bits/wordsize.h b/glibc/sysdeps/riscv/rv32/bits/wordsize.h deleted file mode 100644 index 184080c5..00000000 --- a/glibc/sysdeps/riscv/rv32/bits/wordsize.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __WORDSIZE 32