summaryrefslogtreecommitdiff
path: root/gcc/config/or1k/linux.h
blob: cbdc781418f831b097c4cddc9e1cbc8579289d95 (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
/* Linux Definitions for OpenRISC.
   Copyright (C) 2018-2019 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"

#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}"

#endif /* GCC_OR1K_LINUX_H */