Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/sol2.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 /* Operating system specific defines to be used when targeting GCC for any | 1 /* Operating system specific defines to be used when targeting GCC for any |
2 Solaris 2 system. | 2 Solaris 2 system. |
3 Copyright (C) 2002-2018 Free Software Foundation, Inc. | 3 Copyright (C) 2002-2020 Free Software Foundation, Inc. |
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 | 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 | 8 it under the terms of the GNU General Public License as published by |
136 #else | 136 #else |
137 #define DEF_ARCH32_SPEC(__str) "%{m32:" __str "}" | 137 #define DEF_ARCH32_SPEC(__str) "%{m32:" __str "}" |
138 #define DEF_ARCH64_SPEC(__str) "%{!m32:" __str "}" | 138 #define DEF_ARCH64_SPEC(__str) "%{!m32:" __str "}" |
139 #endif | 139 #endif |
140 | 140 |
141 /* Solaris needs -fasynchronous-unwind-tables to generate unwind info. */ | |
142 #define ASAN_CC1_SPEC "%{%:sanitize(address):-fasynchronous-unwind-tables}" | |
143 | |
141 /* It's safe to pass -s always, even if -g is not used. Those options are | 144 /* It's safe to pass -s always, even if -g is not used. Those options are |
142 handled by both Sun as and GNU as. */ | 145 handled by both Sun as and GNU as. */ |
143 #define ASM_SPEC_BASE \ | 146 #define ASM_SPEC_BASE \ |
144 "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} -s %(asm_cpu)" | 147 "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} -s %(asm_cpu)" |
145 | 148 |
229 #else /* !ENABLE_VTABLE_VERIFY */ | 232 #else /* !ENABLE_VTABLE_VERIFY */ |
230 #define STARTFILE_VTV_SPEC "" | 233 #define STARTFILE_VTV_SPEC "" |
231 #define ENDFILE_VTV_SPEC "" | 234 #define ENDFILE_VTV_SPEC "" |
232 #endif /* !ENABLE_VTABLE_VERIFY */ | 235 #endif /* !ENABLE_VTABLE_VERIFY */ |
233 | 236 |
237 /* Link -lasan early on the command line. For -static-libasan, don't link | |
238 it for -shared link, the executable should be compiled with -static-libasan | |
239 in that case, and for executable link with --{,no-}whole-archive around | |
240 it to force everything into the executable. */ | |
241 | |
242 #ifndef USE_GNU_LD | |
243 #define LD_WHOLE_ARCHIVE_OPTION "-z allextract" | |
244 #define LD_NO_WHOLE_ARCHIVE_OPTION "-z defaultextract" | |
245 #else | |
246 #define LD_WHOLE_ARCHIVE_OPTION "--whole-archive" | |
247 #define LD_NO_WHOLE_ARCHIVE_OPTION "--no-whole-archive" | |
248 #endif | |
249 | |
250 /* Allow rejecting -fsanitize=address, e.g. for specific multilibs. */ | |
251 #ifndef ASAN_REJECT_SPEC | |
252 #define ASAN_REJECT_SPEC "" | |
253 #endif | |
254 | |
255 #define LIBASAN_EARLY_SPEC ASAN_REJECT_SPEC \ | |
256 " %{!shared:libasan_preinit%O%s} \ | |
257 %{static-libasan:%{!shared: -Bstatic "\ | |
258 LD_WHOLE_ARCHIVE_OPTION " -lasan " LD_NO_WHOLE_ARCHIVE_OPTION \ | |
259 "-Bdynamic}}%{!static-libasan:-lasan}" | |
260 | |
261 /* Error out on -fsanitize=thread|leak. */ | |
262 #define LIBTSAN_EARLY_SPEC "\ | |
263 %e-fsanitize=thread is not supported in this configuration" | |
264 #define LIBLSAN_EARLY_SPEC "\ | |
265 %e-fsanitize=leak is not supported in this configuration" | |
266 | |
234 /* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us. */ | 267 /* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us. */ |
235 #undef STARTFILE_SPEC | 268 #undef STARTFILE_SPEC |
236 #ifdef HAVE_SOLARIS_CRTS | 269 #ifdef HAVE_SOLARIS_CRTS |
237 /* Since Solaris 11.4, the OS delivers crt1.o, crti.o, and crtn.o, with a hook | 270 /* Since Solaris 11.4, the OS delivers crt1.o, crti.o, and crtn.o, with a hook |
238 for compiler-dependent stuff like profile handling. */ | 271 for compiler-dependent stuff like profile handling. */ |
362 #ifndef USE_GLD | 395 #ifndef USE_GLD |
363 /* Prefer native form with Solaris ld. */ | 396 /* Prefer native form with Solaris ld. */ |
364 #define SYSROOT_SPEC "-z sysroot=%R" | 397 #define SYSROOT_SPEC "-z sysroot=%R" |
365 #endif | 398 #endif |
366 | 399 |
367 #ifndef USE_GLD | 400 #if !defined(USE_GLD) && defined(ENABLE_SHARED_LIBGCC) |
368 /* With Sun ld, use mapfile to enforce direct binding to libgcc_s unwinder. */ | 401 /* With Sun ld, use mapfile to enforce direct binding to libgcc_s unwinder. */ |
369 #define LINK_LIBGCC_MAPFILE_SPEC \ | 402 #define LINK_LIBGCC_MAPFILE_SPEC \ |
370 "%{shared|shared-libgcc:-M %slibgcc-unwind.map}" | 403 "%{shared|shared-libgcc:-M %slibgcc-unwind.map}" |
371 #else | 404 #else |
372 /* GNU ld doesn't support direct binding. */ | 405 /* GNU ld doesn't support direct binding. */ |