[v7,09/12] C-SKY: Build Infastructure
Commit Message
This patch contains all the implile, makefile and configure needed in
C-SKY porting.
* sysdeps/csky/Implies: New file.
* sysdeps/csky/Makefile: Likewise.
* sysdeps/csky/configure: Likewise.
* sysdeps/csky/configure.ac: Likewise.
* sysdeps/csky/nofpu/Implies: Likewise.
* sysdeps/csky/nptl/Makefile: Likewise.
* sysdeps/csky/preconfigure: Likewise.
* sysdeps/unix/sysv/linux/csky/Implies: Likewise.
* sysdeps/unix/sysv/linux/csky/Makefile: Likewise.
* sysdeps/unix/sysv/linux/csky/configure: Likewise.
* sysdeps/unix/sysv/linux/csky/configure.ac: Likewise.
---
sysdeps/csky/Implies | 5 +++++
sysdeps/csky/Makefile | 9 ++++++++
sysdeps/csky/configure | 4 ++++
sysdeps/csky/configure.ac | 4 ++++
sysdeps/csky/nptl/Makefile | 20 +++++++++++++++++
sysdeps/csky/preconfigure | 37 +++++++++++++++++++++++++++++++
sysdeps/unix/sysv/linux/csky/Implies | 3 +++
sysdeps/unix/sysv/linux/csky/Makefile | 8 +++++++
sysdeps/unix/sysv/linux/csky/configure | 4 ++++
sysdeps/unix/sysv/linux/csky/configure.ac | 5 +++++
10 files changed, 99 insertions(+)
create mode 100644 sysdeps/csky/Implies
create mode 100644 sysdeps/csky/Makefile
create mode 100644 sysdeps/csky/configure
create mode 100644 sysdeps/csky/configure.ac
create mode 100644 sysdeps/csky/nptl/Makefile
create mode 100644 sysdeps/csky/preconfigure
create mode 100644 sysdeps/unix/sysv/linux/csky/Implies
create mode 100644 sysdeps/unix/sysv/linux/csky/Makefile
create mode 100644 sysdeps/unix/sysv/linux/csky/configure
create mode 100644 sysdeps/unix/sysv/linux/csky/configure.ac
new file mode 100644
@@ -0,0 +1,5 @@
+init_array
+wordsize-32
+# C-SKY uses IEEE 754 floating point.
+ieee754/flt-32
+ieee754/dbl-64
new file mode 100644
@@ -0,0 +1,9 @@
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+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/csky.
+
+$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/csky.
+
+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,37 @@
+case "$machine" in
+csky*)
+ abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null |
+ sed -n 's/^#define __CSKYABI__ \(.*\)/\1/p'`
+ float_abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null |
+ sed -n 's/^#define __CSKY_HARD_FLOAT__ \(.*\)/\1/p'`
+
+ case "$abi" in
+ 1)
+ echo "glibc does not support abiv1 yet" >&2
+ exit 1
+ ;;
+ 2)
+ machine=abiv2
+ ;;
+ *)
+ echo "Unknown abi" >&2
+ exit 1
+ ;;
+ esac
+
+ case "$float_abi" in
+ 1)
+ with_fp_cond=1
+ ;;
+ *)
+ with_fp_cond=0
+ ;;
+ esac
+
+ base_machine=csky
+ machine=csky/$machine
+
+ $as_echo "#define CSKYABI $abi" >>confdefs.h
+ $as_echo "#define CSKY_HARD_FLOAT $with_fp_cond" >>confdefs.h
+ ;;
+esac
new file mode 100644
@@ -0,0 +1,3 @@
+unix/sysv/linux/generic/wordsize-32
+unix/sysv/linux/generic
+csky/nptl
new file mode 100644
@@ -0,0 +1,8 @@
+ifeq ($(subdir),misc)
+sysdep_routines += cacheflush
+sysdep_headers += sys/cachectl.h
+endif
+
+ifeq ($(subdir),stdlib)
+gen-as-const-headers += ucontext_i.sym
+endif
new file mode 100644
@@ -0,0 +1,4 @@
+# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
+
+arch_minimum_kernel=4.20.0
+ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
new file mode 100644
@@ -0,0 +1,5 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/csky
+
+arch_minimum_kernel=4.20.0
+ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed