OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libitm/] [configure.tgt] - Blame information for rev 780

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 737 jeremybenn
# -*- shell-script -*-
2
#   Copyright (C) 2011, 2012 Free Software Foundation, Inc.
3
 
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
 
18
# This is the target specific configuration file.  This is invoked by the
19
# autoconf generated configure script.  Putting it in a separate shell file
20
# lets us skip running autoconf when modifying target specific information.
21
 
22
# This file switches on the shell variable ${target}, and sets the
23
# following shell variables:
24
#  config_path          An ordered list of directories to search for
25
#                       sources and headers.  This is relative to the
26
#                       config subdirectory of the source tree.
27
#  XCFLAGS              Add extra compile flags to use.
28
#  XLDFLAGS             Add extra link flags to use.
29
 
30
# Optimize TLS usage by avoiding the overhead of dynamic allocation.
31
if test "$gcc_cv_have_tls" = yes ; then
32
  case "${target}" in
33
 
34
    # For x86, we use slots in the TCB head for most of our TLS.
35
    # The setup of those slots in beginTransaction can afford to
36
    # use the global-dynamic model.
37
    i[456]86-*-linux* | x86_64-*-linux*)
38
        ;;
39
 
40
    *-*-linux*)
41
        XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
42
        ;;
43
  esac
44
fi
45
 
46
# Map the target cpu to an ARCH sub-directory.  At the same time,
47
# work out any special compilation flags as necessary.
48
case "${target_cpu}" in
49
  alpha*)               ARCH=alpha ;;
50
  rs6000 | powerpc*)    ARCH=powerpc ;;
51
 
52
  arm*)         ARCH=arm ;;
53
 
54
  i[3456]86)
55
        case " ${CC} ${CFLAGS} " in
56
          *" -m64 "*)
57
            ;;
58
          *)
59
            if test -z "$with_arch"; then
60
              XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
61
              XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
62
            fi
63
        esac
64
        ARCH=x86
65
        ;;
66
 
67
  sh*)          ARCH=sh ;;
68
 
69
  sparc)
70
        case " ${CC} ${CFLAGS} " in
71
          *" -m64 "*)
72
            ;;
73
          *)
74
            if test -z "$with_cpu"; then
75
              XCFLAGS="${XCFLAGS} -mcpu=v9"
76
            fi
77
        esac
78
        ARCH=sparc
79
        ;;
80
 
81
  sparc64|sparcv9)
82
        case " ${CC} ${CFLAGS} " in
83
          *" -m32 "*)
84
            XCFLAGS="${XCFLAGS} -mcpu=v9"
85
            ;;
86
          *" -m64 "*)
87
            ;;
88
          *)
89
            if test "x$with_cpu" = xv8; then
90
              XCFLAGS="${XCFLAGS} -mcpu=v9"
91
            fi
92
            ;;
93
        esac
94
        ARCH=sparc
95
        ;;
96
 
97
  x86_64)
98
        case " ${CC} ${CFLAGS} " in
99
          *" -m32 "*)
100
            XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
101
            XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
102
            ;;
103
        esac
104
        ARCH=x86
105
        ;;
106
 
107
  *)
108
        ARCH="${target_cpu}"
109
        ;;
110
esac
111
 
112
# For the benefit of top-level configure, determine if the cpu is supported.
113
test -d ${srcdir}/config/$ARCH || UNSUPPORTED=1
114
 
115
# Since we require POSIX threads, assume a POSIX system by default.
116
config_path="$ARCH posix generic"
117
 
118
# Other system configury
119
case "${target}" in
120
  *-*-linux*)
121
        if test "$enable_linux_futex" = yes; then
122
          config_path="linux/$ARCH linux $config_path"
123
        fi
124
        ;;
125
 
126
  powerpc*-*-aix* | rs6000-*-aix*)
127
        # The system ought to be supported, but sjlj.S has not been ported.
128
        UNSUPPORTED=1
129
        ;;
130
 
131
  *-*-gnu* | *-*-k*bsd*-gnu \
132
  | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
133
  | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
134
  | *-*-darwin* | *-*-aix*)
135
        # POSIX system.  The OS is supported.
136
        ;;
137
 
138
  *)    # Non-POSIX, or embedded system
139
        UNSUPPORTED=1
140
        ;;
141
esac

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.