i386: Add OPTION_MASK_ISA2_EVEX512 for some AVX512 instructions.
[official-gcc.git] / gcc / config / frv / linux.h
blobd408a02e8f09e4cc74b38f8f276b8ee7da0a62bb
1 /* Target macros for the FRV Linux port of GCC.
2 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 Contributed by Red Hat Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published
9 by the Free Software Foundation; either version 3, or (at your
10 option) any later version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
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/>. */
21 #ifndef __FRV_LINUX_H__
22 #define __FRV_LINUX_H__
24 #undef SUBTARGET_DRIVER_SELF_SPECS
25 #define SUBTARGET_DRIVER_SELF_SPECS \
26 "%{!mno-fdpic:-mfdpic}",
28 #undef STARTFILE_SPEC
29 #define STARTFILE_SPEC \
30 "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
31 crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
33 #undef ENDFILE_SPEC
34 #define ENDFILE_SPEC \
35 "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
37 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
39 #undef LINK_SPEC
40 #define LINK_SPEC "\
41 %{mfdpic: -m elf32frvfd -z text} %{shared} %{pie} \
42 %{!shared: %{!static: \
43 %{rdynamic:-export-dynamic} \
44 -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
45 %{static}}"
47 /* Support for compile-time default CPU. */
48 #define OPTION_DEFAULT_SPECS \
49 {"cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }
51 /* Define OS-specific predefined preprocessor macros. */
52 #define TARGET_OS_CPP_BUILTINS() \
53 do { \
54 builtin_define ("__gnu_linux__"); \
55 builtin_define_std ("linux"); \
56 builtin_define_std ("unix"); \
57 builtin_assert ("system=linux"); \
58 } while (0)
60 #define HAS_INIT_SECTION 1
61 #define INIT_SECTION_ASM_OP "\t.section .init,\"ax\""
62 #define FINI_SECTION_ASM_OP "\t.section .fini,\"ax\""
64 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
65 asm (SECTION_OP); \
66 asm ("ldi.p @(fp,4), gr15 ! call " #FUNC); \
67 asm (TEXT_SECTION_ASM_OP);
69 #undef INVOKE__main
71 #undef Twrite
72 #define Twrite __write
74 #endif /* __FRV_LINUX_H__ */