comparison gcc/config/nds32/linux.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* Definitions of target machine of Andes NDS32 cpu for GNU compiler 1 /* Definitions of target machine of Andes NDS32 cpu for GNU compiler
2 Copyright (C) 2012-2014 Free Software Foundation, Inc. 2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
3 Contributed by Andes Technology Corporation. 3 Contributed by Andes Technology Corporation.
4 4
5 This file is part of GCC. 5 This file is part of GCC.
6 6
7 GCC is free software; you can redistribute it and/or modify it 7 GCC is free software; you can redistribute it and/or modify it
27 #define SIZE_TYPE "unsigned int" 27 #define SIZE_TYPE "unsigned int"
28 28
29 #undef PTRDIFF_TYPE 29 #undef PTRDIFF_TYPE
30 #define PTRDIFF_TYPE "int" 30 #define PTRDIFF_TYPE "int"
31 31
32 #ifdef TARGET_DEFAULT_TLSDESC_TRAMPOLINE
33 #define NDS32_TLSDESC_TRAMPOLINE_SPEC \
34 " %{!mno-tlsdesc-trampoline:--mtlsdesc-trampoline}"
35 #else
36 #define NDS32_TLSDESC_TRAMPOLINE_SPEC ""
37 #endif
38
39 #define TARGET_OS_CPP_BUILTINS() \ 32 #define TARGET_OS_CPP_BUILTINS() \
40 do \ 33 do \
41 { \ 34 { \
42 GNU_USER_TARGET_OS_CPP_BUILTINS(); \ 35 GNU_USER_TARGET_OS_CPP_BUILTINS(); \
43 } \ 36 } \
44 while (0) 37 while (0)
45 38
46 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" 39 #ifdef TARGET_BIG_ENDIAN_DEFAULT
40 #define LD_SO_ENDIAN_SPEC "%{mlittle-endian:le}%{!mlittle-endian:be}"
41 #else
42 #define LD_SO_ENDIAN_SPEC "%{mbig-endian:be}%{!mbig-endian:le}"
43 #endif
44
45 /* Record arch version in TARGET_ARCH_DEFAULT.
46 0 means soft ABI;
47 1 means hard ABI and using full floating-point instruction;
48 2 means hard ABI and only using single-precision floating-point
49 instruction. */
50 #if TARGET_ARCH_DEFAULT
51 #define LD_SO_ABI_SPEC "%{!mabi=2:f}"
52 #else
53 #define LD_SO_ABI_SPEC "%{mabi=2fp+:f}"
54 #endif
55
56 #define GLIBC_DYNAMIC_LINKER \
57 "/lib/ld-linux-nds32" LD_SO_ENDIAN_SPEC LD_SO_ABI_SPEC ".so.1"
47 58
48 /* In the configure stage we may use options --enable-default-relax, 59 /* In the configure stage we may use options --enable-default-relax,
49 --enable-Os-default-ifc and --enable-Os-default-ex9. They effect 60 --enable-Os-default-ifc and --enable-Os-default-ex9. They effect
50 the default spec of passing --relax, --mifc, and --mex9 to linker. 61 the default spec of passing --relax, --mifc, and --mex9 to linker.
51 We use NDS32_RELAX_SPEC, NDS32_IFC_SPEC, and NDS32_EX9_SPEC 62 We use NDS32_RELAX_SPEC, NDS32_IFC_SPEC, and NDS32_EX9_SPEC
57 %{!shared: \ 68 %{!shared: \
58 %{!static: \ 69 %{!static: \
59 %{rdynamic:-export-dynamic} \ 70 %{rdynamic:-export-dynamic} \
60 -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \ 71 -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
61 %{static:-static}}" \ 72 %{static:-static}}" \
62 NDS32_RELAX_SPEC \ 73 NDS32_RELAX_SPEC
63 NDS32_TLSDESC_TRAMPOLINE_SPEC
64 74
65 #define LINK_PIE_SPEC "%{pie:%{!fno-pie:%{!fno-PIE:%{!static:-pie}}}} " 75 #define LINK_PIE_SPEC "%{pie:%{!fno-pie:%{!fno-PIE:%{!static:-pie}}}} "
66 76
67 #define CPP_SPEC "%{pthread:-D_REENTRANT}" 77 #define CPP_SPEC "%{pthread:-D_REENTRANT}"
68 78