@@ -254,7 +254,7 @@ case $basic_machine in
| ba \
| be32 | be64 \
| bfin \
- | c4x | c8051 | clipper \
+ | c4x | c8051 | clipper | csky \
| d10v | d30v | dlx | dsp16xx \
| e2k | epiphany \
| fido | fr30 | frv | ft32 \
@@ -378,7 +378,7 @@ case $basic_machine in
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | c8051-* | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
new file mode 100644
@@ -0,0 +1,4 @@
+wordsize-32
+# CSKY uses IEEE 754 floating point.
+ieee754/flt-32
+ieee754/dbl-64
new file mode 100644
@@ -0,0 +1,13 @@
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
+
+ifeq ($(subdir),debug)
+CFLAGS-backtrace.c += -funwind-tables
+endif
+
+ASFLAGS-.os += $(pic-ccflag)
+
+ifeq ($(subdir),gmon)
+sysdep_routines += csky-mcount
+endif
new file mode 100644
@@ -0,0 +1,4 @@
+# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/riscv/elf.
+
+$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
new file mode 100644
@@ -0,0 +1,4 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/riscv/elf.
+
+AC_DEFINE(PI_STATIC_AND_HIDDEN)
new file mode 100644
@@ -0,0 +1,20 @@
+# Copyright (C) 2018 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, see
+# <http://www.gnu.org/licenses/>.
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
new file mode 100644
@@ -0,0 +1,4 @@
+case "$machine" in
+csky*) base_machine=csky
+ machine=csky
+esac
new file mode 100644
@@ -0,0 +1,23 @@
+/* Definitions for testing PLT entry/exit auditing. C-SKY version.
+ Copyright (C) 2018 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#define pltenter la_csky_gnu_pltenter
+#define pltexit la_csky_gnu_pltexit
+#define La_regs La_csky_regs
+#define La_retval La_csky_retval
+#define int_retval lrv_reg[0]
new file mode 100644
@@ -0,0 +1,4 @@
+unix/sysv/linux/csky
+unix/sysv/linux/generic/wordsize-32
+unix/sysv/linux/generic
+csky/nptl
new file mode 100644
@@ -0,0 +1,26 @@
+ifeq ($(subdir),csu)
+sysdep_routines += read_tp libc-read_tp
+static-only-routines += read_tp
+shared-only-routines += libc-read_tp
+endif
+
+ifeq ($(subdir),elf)
+sysdep-rtld-routines += read_tp
+endif
+
+ifeq ($(subdir),misc)
+sysdep_routines += cacheflush
+sysdep_headers += sys/cachectl.h
+endif
+
+ifeq ($(subdir),stdlib)
+gen-as-const-headers += ucontext_i.sym
+endif
+
+ifeq ($(subdir), csky)
+sysdep_headers += csky_readtp.h
+endif
+
+ifeq ($(subdir), malloc)
+libmemusage-routines += read_tp
+endif
new file mode 100644
@@ -0,0 +1,5 @@
+# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
+
+arch_minimum_kernel=2.6.25
+libc_cv_gcc_unwind_find_fde=no
+ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
new file mode 100644
@@ -0,0 +1,6 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/csky
+
+arch_minimum_kernel=2.6.25
+libc_cv_gcc_unwind_find_fde=no
+ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed