1 /* Definitions for Intel 386 running Linux-based GNU systems with ELF format. 2 Copyright (C) 2012-2016 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 #undef CC1_SPEC 31 #define CC1_SPEC \ 32 LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \ 33 GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC) 34 35 #undef LINK_SPEC 36 #define LINK_SPEC \ 37 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LINK_SPEC, \ 38 GNU_USER_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) 39 40 #undef LIB_SPEC 41 #define LIB_SPEC \ 42 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \ 43 GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC " " ANDROID_LIB_SPEC) 44 45 #undef STARTFILE_SPEC 46 #define STARTFILE_SPEC \ 47 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, \ 48 ANDROID_STARTFILE_SPEC) 49 50 #undef ENDFILE_SPEC 51 #define ENDFILE_SPEC \ 52 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_MATHFILE_SPEC " " \ 53 GNU_USER_TARGET_ENDFILE_SPEC, \ 54 GNU_USER_TARGET_MATHFILE_SPEC " " \ 55 ANDROID_ENDFILE_SPEC) 56 57 #ifndef LIBMPX_LIBS 58 #define LIBMPX_LIBS "\ 59 %:include(libmpx.spec)%(link_libmpx)" 60 #endif 61 62 #ifndef LINK_MPX 63 #if defined (HAVE_LD_BNDPLT_SUPPORT) 64 #define LINK_MPX "-z bndplt " 65 #else 66 #define LINK_MPX \ 67 "%nGCC was configured with a linker with no '-z bndplt' support. " \ 68 "It significantly reduces MPX coverage for dynamic codes. " \ 69 "It is strongly recommended to use GCC properly configured for MPX." 70 #endif 71 #endif 72 73 #ifndef MPX_SPEC 74 #ifdef SPEC_64 75 #define MPX_SPEC "\ 76 %{mmpx:%{fcheck-pointer-bounds:%{!static:%{" SPEC_64 ":" LINK_MPX "}}}}" 77 #else 78 #define MPX_SPEC "" 79 #endif 80 #endif 81 82 #ifndef LIBMPX_SPEC 83 #if defined(HAVE_LD_STATIC_DYNAMIC) 84 #define LIBMPX_SPEC "\ 85 %{mmpx:%{fcheck-pointer-bounds:\ 86 %{static:--whole-archive -lmpx --no-whole-archive" LIBMPX_LIBS "}\ 87 %{!static:%{static-libmpx:" LD_STATIC_OPTION " --whole-archive}\ 88 -lmpx %{static-libmpx:--no-whole-archive " LD_DYNAMIC_OPTION \ 89 LIBMPX_LIBS "}}}}" 90 #else 91 #define LIBMPX_SPEC "\ 92 %{mmpx:%{fcheck-pointer-bounds:-lmpx" LIBMPX_LIBS "}}" 93 #endif 94 #endif 95 96 #ifndef LIBMPXWRAPPERS_SPEC 97 #if defined(HAVE_LD_STATIC_DYNAMIC) 98 #define LIBMPXWRAPPERS_SPEC "\ 99 %{mmpx:%{fcheck-pointer-bounds:%{!fno-chkp-use-wrappers:\ 100 %{static:-lmpxwrappers}\ 101 %{!static:%{static-libmpxwrappers:" LD_STATIC_OPTION " --whole-archive}\ 102 -lmpxwrappers %{static-libmpxwrappers:--no-whole-archive "\ 103 LD_DYNAMIC_OPTION "}}}}}" 104 #else 105 #define LIBMPXWRAPPERS_SPEC "\ 106 %{mmpx:%{fcheck-pointer-bounds:{!fno-chkp-use-wrappers:-lmpxwrappers}}}" 107 #endif 108 #endif 109 110 #ifndef CHKP_SPEC 111 #define CHKP_SPEC "\ 112 %{!nostdlib:%{!nodefaultlibs:" LIBMPX_SPEC LIBMPXWRAPPERS_SPEC "}}" MPX_SPEC 113 #endif 114