From patchwork Sun Apr 8 07:02:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5q+b5pmX?= X-Patchwork-Id: 26649 Received: (qmail 122985 invoked by alias); 8 Apr 2018 07:03:56 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 122785 invoked by uid 89); 8 Apr 2018 07:03:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 spammy=auditing X-HELO: mail139-36.mail.alibaba.com X-Alimail-AntiSpam: AC=CONTINUE; BC=0.07444093|-1; CH=green; FP=0|0|0|0|0|-1|-1|-1; HT=e01l07447; MF=han_mao@c-sky.com; NM=1; PH=DS; RN=4; RT=4; SR=0; TI=SMTPD_---.Bc2XfP4_1523171018; From: Mao Han To: libc-alpha@sourceware.org Cc: Mao Han , c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com Subject: [RFC PATCH V2 08/10] C-SKY: Build Infastructure Date: Sun, 8 Apr 2018 15:02:31 +0800 Message-Id: <72254e2f0ac4f7abb71d6cf3e1c0ac6b5ea4cbef.1523169833.git.han_mao@c-sky.com> In-Reply-To: References: In-Reply-To: References: This patch contains all the implile, makefile and configure needed in C-SKY porting. * scripts/config.sub: Add C-SKY arch * sysdeps/csky/Implies: New file * sysdeps/csky/Makefile: New file * sysdeps/csky/configure: New file * sysdeps/csky/configure.ac: New file * sysdeps/csky/tst-audit.h: New file * sysdeps/csky/nptl/Makefile: New file * sysdeps/csky/preconfigure: New file * sysdeps/unix/sysv/linux/csky/configure: New file * sysdeps/unix/sysv/linux/csky/configure.ac: New file * sysdeps/unix/sysv/linux/csky/Implies: New file * sysdeps/unix/sysv/linux/csky/Makefile: New file --- scripts/config.sub | 4 ++-- sysdeps/csky/Implies | 4 ++++ sysdeps/csky/Makefile | 13 +++++++++++++ sysdeps/csky/configure | 4 ++++ sysdeps/csky/configure.ac | 4 ++++ sysdeps/csky/nptl/Makefile | 20 ++++++++++++++++++++ sysdeps/csky/preconfigure | 4 ++++ sysdeps/csky/tst-audit.h | 23 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/csky/Implies | 4 ++++ sysdeps/unix/sysv/linux/csky/Makefile | 26 ++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/csky/configure | 5 +++++ sysdeps/unix/sysv/linux/csky/configure.ac | 6 ++++++ 12 files changed, 115 insertions(+), 2 deletions(-) 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/csky/tst-audit.h 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 diff --git a/scripts/config.sub b/scripts/config.sub index f2632cd..9550e57 100755 --- a/scripts/config.sub +++ b/scripts/config.sub @@ -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-* \ diff --git a/sysdeps/csky/Implies b/sysdeps/csky/Implies new file mode 100644 index 0000000..781a016 --- /dev/null +++ b/sysdeps/csky/Implies @@ -0,0 +1,4 @@ +wordsize-32 +# CSKY uses IEEE 754 floating point. +ieee754/flt-32 +ieee754/dbl-64 diff --git a/sysdeps/csky/Makefile b/sysdeps/csky/Makefile new file mode 100644 index 0000000..4fa84bc --- /dev/null +++ b/sysdeps/csky/Makefile @@ -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 diff --git a/sysdeps/csky/configure b/sysdeps/csky/configure new file mode 100644 index 0000000..53f5f1b --- /dev/null +++ b/sysdeps/csky/configure @@ -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 diff --git a/sysdeps/csky/configure.ac b/sysdeps/csky/configure.ac new file mode 100644 index 0000000..34f62d4 --- /dev/null +++ b/sysdeps/csky/configure.ac @@ -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) diff --git a/sysdeps/csky/nptl/Makefile b/sysdeps/csky/nptl/Makefile new file mode 100644 index 0000000..a80a979 --- /dev/null +++ b/sysdeps/csky/nptl/Makefile @@ -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 +# . + +ifeq ($(subdir),csu) +gen-as-const-headers += tcb-offsets.sym +endif diff --git a/sysdeps/csky/preconfigure b/sysdeps/csky/preconfigure new file mode 100644 index 0000000..d95f0ab --- /dev/null +++ b/sysdeps/csky/preconfigure @@ -0,0 +1,4 @@ +case "$machine" in +csky*) base_machine=csky + machine=csky +esac diff --git a/sysdeps/csky/tst-audit.h b/sysdeps/csky/tst-audit.h new file mode 100644 index 0000000..6c64625 --- /dev/null +++ b/sysdeps/csky/tst-audit.h @@ -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 + . */ + +#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] diff --git a/sysdeps/unix/sysv/linux/csky/Implies b/sysdeps/unix/sysv/linux/csky/Implies new file mode 100644 index 0000000..2b5c256 --- /dev/null +++ b/sysdeps/unix/sysv/linux/csky/Implies @@ -0,0 +1,4 @@ +unix/sysv/linux/csky +unix/sysv/linux/generic/wordsize-32 +unix/sysv/linux/generic +csky/nptl diff --git a/sysdeps/unix/sysv/linux/csky/Makefile b/sysdeps/unix/sysv/linux/csky/Makefile new file mode 100644 index 0000000..ebaf5ac --- /dev/null +++ b/sysdeps/unix/sysv/linux/csky/Makefile @@ -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 diff --git a/sysdeps/unix/sysv/linux/csky/configure b/sysdeps/unix/sysv/linux/csky/configure new file mode 100644 index 0000000..a3a7b81 --- /dev/null +++ b/sysdeps/unix/sysv/linux/csky/configure @@ -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 diff --git a/sysdeps/unix/sysv/linux/csky/configure.ac b/sysdeps/unix/sysv/linux/csky/configure.ac new file mode 100644 index 0000000..41746f8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/csky/configure.ac @@ -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