From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15432 invoked by alias); 24 Jul 2018 04:20:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 15407 invoked by uid 89); 24 Jul 2018 04:20:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=2.11, Tang, tang, cris X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Jul 2018 04:19:57 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1fhonj-000176-Rr from Sandra_Loosemore@mentor.com ; Mon, 23 Jul 2018 21:19:55 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 23 Jul 2018 21:19:52 -0700 Subject: [1/5] C-SKY port: Configury From: Sandra Loosemore To: "gcc-patches@gcc.gnu.org" CC: Han Mao , Yunhai Shang References: <49d0a2c8-51a0-4a74-d015-0bf1c1098e38@codesourcery.com> Message-ID: <6c982e80-3b90-0505-2630-1673c11311ae@codesourcery.com> Date: Tue, 24 Jul 2018 04:20:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <49d0a2c8-51a0-4a74-d015-0bf1c1098e38@codesourcery.com> Content-Type: multipart/mixed; boundary="------------DE4243613B2712546BB13D15" X-SW-Source: 2018-07/txt/msg01290.txt.bz2 --------------DE4243613B2712546BB13D15 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 540 2018-07-23 Jojo Huibin Wang Sandra Loosemore Chung-Lin Tang Andrew Jenner C-SKY port: Configury gcc/ * config.gcc (csky-*-*): New. * configure.ac: Add csky to targets for dwarf2 debug_line support. * configure: Regenerated. contrib/ * config-list.mk (LIST): Add csky-elf and csky-linux-gnu. --------------DE4243613B2712546BB13D15 Content-Type: text/x-patch; name="csky-gcc-1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="csky-gcc-1.patch" Content-length: 3908 diff --git a/contrib/config-list.mk b/contrib/config-list.mk index c3537d2..d9e48a9 100644 --- a/contrib/config-list.mk +++ b/contrib/config-list.mk @@ -40,6 +40,7 @@ LIST = aarch64-elf aarch64-linux-gnu aarch64-rtems \ arm-symbianelf avr-elf \ bfin-elf bfin-uclinux bfin-linux-uclibc bfin-rtems bfin-openbsd \ c6x-elf c6x-uclinux cr16-elf cris-elf cris-linux crisv32-elf crisv32-linux \ + csky-elf csky-linux-gnu \ epiphany-elf epiphany-elfOPT-with-stack-offset=16 fido-elf \ fr30-elf frv-elf frv-linux ft32-elf h8300-elf hppa-linux-gnu \ hppa-linux-gnuOPT-enable-sjlj-exceptions=yes hppa64-linux-gnu \ diff --git a/gcc/config.gcc b/gcc/config.gcc index 78e84c2..cd98836 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1278,6 +1278,70 @@ crisv32-*-linux* | cris-*-linux*) ;; esac ;; +csky-*-*) + if test x${with_endian} != x; then + case ${with_endian} in + big|little) ;; + *) + echo "with_endian=${with_endian} not supported." + exit 1 + ;; + esac + fi + if test x${with_float} != x; then + case ${with_float} in + soft | hard) ;; + *) echo + "Unknown floating point type used in --with-float=$with_float" + exit 1 + ;; + esac + fi + tm_file="csky/csky.h" + md_file="csky/csky.md" + out_file="csky/csky.c" + tm_p_file="${tm_p_file} csky/csky-protos.h" + extra_options="${extra_options} csky/csky_tables.opt" + + if test x${enable_tpf_debug} = xyes; then + tm_defines="${tm_defines} ENABLE_TPF_DEBUG" + fi + + case ${target} in + csky-*-elf*) + tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} csky/csky-elf.h" + tmake_file="csky/t-csky csky/t-csky-elf" + default_use_cxa_atexit=no + ;; + csky-*-linux*) + tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} csky/csky-linux-elf.h" + tmake_file="${tmake_file} csky/t-csky csky/t-csky-linux" + + if test "x${enable_multilib}" = xyes ; then + tm_file="$tm_file ./sysroot-suffix.h" + tmake_file="${tmake_file} csky/t-sysroot-suffix" + fi + + case ${target} in + csky-*-linux-gnu*) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" + ;; + csky-*-linux-uclibc*) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" + default_use_cxa_atexit=no + ;; + *) + echo "Unknown target $target" + exit 1 + ;; + esac + ;; + *) + echo "Unknown target $target" + exit 1 + ;; + esac + ;; epiphany-*-elf | epiphany-*-rtems*) tm_file="${tm_file} dbxelf.h elfos.h" tmake_file="${tmake_file} epiphany/t-epiphany" @@ -3831,6 +3895,10 @@ case "${target}" in fi ;; + csky-*-*) + supported_defaults="cpu endian float" + ;; + arm*-*-*) supported_defaults="arch cpu float tune fpu abi mode tls" for which in cpu tune arch; do diff --git a/gcc/configure b/gcc/configure index 80ac4a3..b7a8e36 100755 --- a/gcc/configure +++ b/gcc/configure @@ -27838,7 +27838,7 @@ esac # ??? Once 2.11 is released, probably need to add first known working # version to the per-target configury. case "$cpu_type" in - aarch64 | alpha | arc | arm | avr | bfin | cris | i386 | m32c | m68k \ + aarch64 | alpha | arc | arm | avr | bfin | cris | csky | i386 | m32c | m68k \ | microblaze | mips | nios2 | pa | riscv | rs6000 | score | sparc | spu \ | tilegx | tilepro | visium | xstormy16 | xtensa) insn="nop" diff --git a/gcc/configure.ac b/gcc/configure.ac index 4fc851c..65f9c92 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4932,7 +4932,7 @@ esac # ??? Once 2.11 is released, probably need to add first known working # version to the per-target configury. case "$cpu_type" in - aarch64 | alpha | arc | arm | avr | bfin | cris | i386 | m32c | m68k \ + aarch64 | alpha | arc | arm | avr | bfin | cris | csky | i386 | m32c | m68k \ | microblaze | mips | nios2 | pa | riscv | rs6000 | score | sparc | spu \ | tilegx | tilepro | visium | xstormy16 | xtensa) insn="nop" --------------DE4243613B2712546BB13D15--