aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/or1k/linux.h
blob: 80f77c722322f4969ab661b7f6c6361b4ed52876 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* Linux Definitions for OpenRISC.
   Copyright (C) 2018-2022 Free Software Foundation, Inc.
   Contributed by Stafford Horne.

   This file is part of GCC.

   GCC is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published
   by the Free Software Foundation; either version 3, or (at your
   option) any later version.

   GCC is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
   License for more details.

   You should have received a copy of the GNU General Public License
   along with GCC; see the file COPYING3.  If not see
   <http://www.gnu.org/licenses/>.  */

#ifndef GCC_OR1K_LINUX_H
#define GCC_OR1K_LINUX_H

/* elfos.h should have already been included.  Now just override
   any conflicting definitions and add any extras.  */

#define TARGET_OS_CPP_BUILTINS() \
  GNU_USER_TARGET_OS_CPP_BUILTINS ()

#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-or1k.so.1"

#undef MUSL_DYNAMIC_LINKER
#define MUSL_DYNAMIC_LINKER  "/lib/ld-musl-or1k.so.1"

#define CPP_SPEC "%{pthread:-D_REENTRANT}"

#undef LINK_SPEC
#define LINK_SPEC "%{h*}			\
   %{static:-Bstatic}				\
   %{shared:-shared}				\
   %{symbolic:-Bsymbolic}			\
   %{!static:%{!static-pie:			\
     %{rdynamic:-export-dynamic}		\
     %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}} \
   %{static-pie:-Bstatic -pie --no-dynamic-linker -z text}"

#define TARGET_ASM_FILE_END file_end_indicate_exec_stack

#endif /* GCC_OR1K_LINUX_H */