[NDS32] Support Linux target for nds32.
commita5a22b4fd40aec08398ab45c6b33a698789f0d29
authorjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 2 Jun 2018 14:22:12 +0000 (2 14:22 +0000)
committerjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 2 Jun 2018 14:22:12 +0000 (2 14:22 +0000)
tree90aef7941c0537da42c7844369f7e4133fc7bb9c
parent5ef159752d1c6351a7428e140cf4c6642af56f86
[NDS32] Support Linux target for nds32.

gcc/
* config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
(nds32le-*-*, nds32be-*-*): Integrate checking process.
(nds32*-*-*): Add glibc and uclibc conditions.
* common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
(TARGET_EXCEPT_UNWIND_INFO): Define.
* config/nds32/elf.h: New file.
* config/nds32/linux.h: New file.
* config/nds32/nds32-elf.opt: New file.
* config/nds32/nds32-linux.opt: New file.
* config/nds32/nds32-fp-as-gp.c
(pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
* config/nds32/nds32.c (nds32_conditional_register_usage): Consider
TARGET_LINUX_ABI.
(nds32_asm_file_end): Ditto.
(nds32_print_operand): Ditto.
(nds32_insert_attributes): Ditto.
(nds32_init_libfuncs): New function.
(TARGET_HAVE_TLS): Define.
(TARGET_INIT_LIBFUNCS): Define.
* config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
spec content.
(TARGET_ELF): Apply different mcmodel setting.
(LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
been migrated into elf.h and linux.h files.
* config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
* config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
(mcmodel): The content has been migrated into nds32-elf.opt and
nds32-linux.opt files.
* config/nds32/t-elf: New file.
* config/nds32/t-linux: New file.

libgcc/
* config.host (nds32*-linux*): New.
* config/nds32/linux-atomic.c: New file.
* config/nds32/linux-unwind.h: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261116 138bc75d-0d04-0410-961f-82ee72b054a4
18 files changed:
gcc/ChangeLog
gcc/common/config/nds32/nds32-common.c
gcc/config.gcc
gcc/config/nds32/elf.h [new file with mode: 0644]
gcc/config/nds32/linux.h [new file with mode: 0644]
gcc/config/nds32/nds32-elf.opt [new file with mode: 0644]
gcc/config/nds32/nds32-fp-as-gp.c
gcc/config/nds32/nds32-linux.opt [new file with mode: 0644]
gcc/config/nds32/nds32.c
gcc/config/nds32/nds32.h
gcc/config/nds32/nds32.md
gcc/config/nds32/nds32.opt
gcc/config/nds32/t-elf [new file with mode: 0644]
gcc/config/nds32/t-linux [new file with mode: 0644]
libgcc/ChangeLog
libgcc/config.host
libgcc/config/nds32/linux-atomic.c [new file with mode: 0644]
libgcc/config/nds32/linux-unwind.h [new file with mode: 0644]