1 /* Definitions for Intel 386 running Linux-based GNU systems with ELF format.
2    Copyright (C) 2012-2020 Free Software Foundation, Inc.
3    Contributed by Ilya Enkovich.
4 
5 This file is part of GCC.
6 
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
11 
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3.  If not see
19 <http://www.gnu.org/licenses/>.  */
20 
21 #undef TARGET_OS_CPP_BUILTINS
22 #define TARGET_OS_CPP_BUILTINS()               \
23   do                                           \
24     {                                          \
25       GNU_USER_TARGET_OS_CPP_BUILTINS();       \
26       ANDROID_TARGET_OS_CPP_BUILTINS();	       \
27     }                                          \
28   while (0)
29 
30 #define EXTRA_TARGET_D_OS_VERSIONS()		\
31   ANDROID_TARGET_D_OS_VERSIONS();
32 
33 #define GNU_USER_TARGET_D_CRITSEC_SIZE		\
34   (TARGET_64BIT ? (POINTER_SIZE == 64 ? 40 : 32) : 24)
35 
36 #undef CC1_SPEC
37 #define CC1_SPEC \
38   LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
39 		       GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
40 
41 #undef	LINK_SPEC
42 #define LINK_SPEC \
43   LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LINK_SPEC, \
44 		       GNU_USER_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
45 
46 #undef  LIB_SPEC
47 #define LIB_SPEC \
48   LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
49 		    GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC " " ANDROID_LIB_SPEC)
50 
51 #undef  STARTFILE_SPEC
52 #define STARTFILE_SPEC \
53   LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, \
54 		       ANDROID_STARTFILE_SPEC)
55 
56 #undef  ENDFILE_SPEC
57 #define ENDFILE_SPEC \
58   LINUX_OR_ANDROID_LD (GNU_USER_TARGET_MATHFILE_SPEC " " \
59 		       GNU_USER_TARGET_ENDFILE_SPEC,	 \
60 		       GNU_USER_TARGET_MATHFILE_SPEC " " \
61 		       ANDROID_ENDFILE_SPEC)
62 
63 #ifdef HAVE_LD_PUSHPOPSTATE_SUPPORT
64 #define MPX_LD_AS_NEEDED_GUARD_PUSH "--push-state --no-as-needed"
65 #define MPX_LD_AS_NEEDED_GUARD_POP "--pop-state"
66 #else
67 #define MPX_LD_AS_NEEDED_GUARD_PUSH ""
68 #define MPX_LD_AS_NEEDED_GUARD_POP ""
69 #endif
70 
71 extern void file_end_indicate_exec_stack_and_cet (void);
72 
73 #undef TARGET_ASM_FILE_END
74 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack_and_cet
75