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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libstdc++-v3/] [configure.host] - Blame information for rev 761

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

Line No. Rev Author Line
1 742 jeremybenn
# configure.host
2
#
3
# This shell script handles all host based configuration for libstdc++.
4
# It sets various shell variables based on the the host and the
5
# configuration options.  You can modify this shell script without needing
6
# to rerun autoconf/aclocal/etc.  This file is "sourced" not executed.
7
#
8
# You should read docs/html/17_intro/porting.* to make sense of this file.
9
#
10
#
11
# It uses the following shell variables as set by config.guess:
12
#   host                The configuration host (full CPU-vendor-OS triplet)
13
#   host_cpu            The configuration host CPU
14
#   host_os             The configuration host OS
15
#
16
#
17
# It sets the following shell variables:
18
#
19
#   cpu_include_dir        CPU-specific directory, defaults to cpu/generic
20
#                          if cpu/host_cpu doesn't exist.  This is not used
21
#                          directly, but sets the default for others.
22
#
23
#   os_include_dir         OS-specific directory, defaults to os/generic.
24
#
25
#   c_model                the "C" header model, defaults to c_global.
26
#
27
#   c_compatibility        if "C" compatibility headers are necessary,
28
#                          defaults to no.
29
#
30
#   abi_baseline_pair      directory name for ABI compat testing,
31
#                          defaults to host_cpu-host_os (as per config.guess)
32
#
33
#   abi_baseline_subdir_switch
34
#                          g++ switch to determine ABI baseline subdir for
35
#                          multilibbed targets,
36
#                          defaults to --print-multi-directory
37
#
38
#   abi_tweaks_dir         location of cxxabi_tweaks.h,
39
#                          defaults to cpu_include_dir
40
#
41
#   atomicity_dir          location of atomicity.h,
42
#                          defaults to cpu_include_dir
43
#
44
#   atomic_word_dir        location of atomic_word.h
45
#                          defaults to generic.
46
#
47
#   atomic_flags           extra flags to pass to use atomic instructions
48
#                          defaults to nothing.
49
#
50
#   cpu_defines_dir        location of cpu_defines.h
51
#                          defaults to generic.
52
#
53
#
54
#   error_constants_dir    location of error_constants.h
55
#                          defaults to os/generic.
56
#
57
# It possibly modifies the following variables:
58
#
59
#   OPT_LDFLAGS            extra flags to pass when linking the library, of
60
#                          the form '-Wl,blah'
61
#                          (defaults to empty in acinclude.m4)
62
#
63
#   port_specific_symbol_files
64
#                          whitespace-seperated list of files containing
65
#                          additional symbols to export from the shared
66
#                          library, when symbol versioning is in use
67
#
68
#
69
# If the defaults will not work for your platform, you need only change the
70
# variables that won't work, i.e., you do not need to explicitly set a
71
# working variable to its default.  Most hosts only need to change the two
72
# *_include_dir variables.
73
 
74
 
75
# DEFAULTS
76
# Try to guess a default cpu_include_dir based on the name of the CPU.  We
77
# cannot do this for os_include_dir; there are too many portable operating
78
# systems out there.  :-)
79
c_model=c_global
80
c_compatibility=no
81
atomic_word_dir=cpu/generic
82
atomic_flags=""
83
atomicity_dir="cpu/generic"
84
cpu_defines_dir="cpu/generic"
85
try_cpu=generic
86
abi_baseline_subdir_switch=--print-multi-directory
87
abi_tweaks_dir="cpu/generic"
88
error_constants_dir="os/generic"
89
 
90
# HOST-SPECIFIC OVERRIDES
91
# Set any CPU-dependent bits.
92
 
93
# Provide a way to funnel exotic flavors and prefixed/postfixed chip
94
# variants into the established source config/cpu/* sub-directories.
95
# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
96
case "${host_cpu}" in
97
  alpha*)
98
    try_cpu=alpha
99
    ;;
100
  arm*)
101
    try_cpu=arm
102
    ;;
103
  crisv32)
104
    try_cpu=cris
105
    ;;
106
  i[567]86 | x86_64)
107
    try_cpu=i486
108
    ;;
109
  hppa*)
110
    try_cpu=hppa
111
    ;;
112
  mep*)
113
    EXTRA_CXX_FLAGS=-mm
114
    try_cpu=generic
115
    ;;
116
  mips*)
117
    try_cpu=mips
118
    ;;
119
  powerpc* | rs6000)
120
    try_cpu=powerpc
121
    ;;
122
  sparc* | ultrasparc)
123
    try_cpu=sparc
124
    ;;
125
  *)
126
    if test -d ${glibcxx_srcdir}/config/cpu/${host_cpu}; then
127
      try_cpu=${host_cpu}
128
    fi
129
esac
130
 
131
 
132
# Now look for the file(s) usually tied to a CPU model, and make
133
# default choices for those if they haven't been explicitly set
134
# already.
135
cpu_include_dir=cpu/${try_cpu}
136
 
137
 
138
# Set specific CPU overrides for cpu_defines_dir. Most can just use generic.
139
# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
140
case "${host_cpu}" in
141
  powerpc* | rs6000)
142
    cpu_defines_dir=cpu/powerpc
143
    ;;
144
esac
145
 
146
 
147
# Set specific CPU overrides for atomic_word_dir and atomic_flags.
148
# Most can just use generic.
149
# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
150
case "${host_cpu}" in
151
  alpha*)
152
    atomic_word_dir=cpu/alpha
153
    ;;
154
  cris*)
155
    atomic_word_dir=cpu/cris
156
    ;;
157
  ia64)
158
    atomic_word_dir=cpu/ia64
159
    ;;
160
  i[4567]86 | x86_64)
161
    atomic_flags="-march=native"
162
    ;;
163
  powerpc* | rs6000)
164
    atomic_word_dir=cpu/powerpc
165
    ;;
166
  sparc* | ultrasparc)
167
    atomic_word_dir=cpu/sparc
168
    atomic_flags="-mcpu=v9"
169
    ;;
170
esac
171
 
172
 
173
# Set specific CPU overrides for atomicity_dir.
174
# This can be over-ridden in GLIBCXX_ENABLE_ATOMIC_BUILTINS.
175
# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
176
if test -f ${glibcxx_srcdir}/config/${cpu_include_dir}/atomicity.h ; then
177
  atomicity_dir=$cpu_include_dir
178
fi
179
 
180
 
181
if test -f ${glibcxx_srcdir}/config/${cpu_include_dir}/cxxabi_tweaks.h ; then
182
  abi_tweaks_dir=$cpu_include_dir
183
fi
184
 
185
 
186
# Set any OS-dependent bits.
187
# Set the os_include_dir.
188
# Set the error_costants_dir.
189
# Set c_model, c_compatibility here.
190
# If atomic ops and/or numeric limits are OS-specific rather than
191
# CPU-specifc, set those here too.
192
# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
193
case "${host_os}" in
194
  aix4.[3456789]* | aix[56789]*)
195
    # We set os_include_dir to os/aix only on AIX 4.3 and newer, but
196
    # os/aix/atomicity.h works on earlier versions of AIX 4.*, so we
197
    # explicitly duplicate the directory for 4.[<3].
198
    os_include_dir="os/aix"
199
    atomicity_dir="os/aix"
200
    atomic_word_dir="os/aix"
201
    OPT_LDFLAGS="-Wl,-G"
202
    ;;
203
  aix4.*)
204
    os_include_dir="os/generic"
205
    atomicity_dir="os/aix"
206
    atomic_word_dir="os/aix"
207
    ;;
208
  aix*)
209
    os_include_dir="os/generic"
210
    atomicity_dir="cpu/generic"
211
    ;;
212
  bsd*)
213
    # Plain BSD attempts to share FreeBSD files.
214
    os_include_dir="os/bsd/freebsd"
215
    ;;
216
  cygwin*)
217
    os_include_dir="os/newlib"
218
    OPT_LDFLAGS="${OPT_LDFLAGS} \$(lt_host_flags)"
219
    ;;
220
  darwin | darwin[1-7] | darwin[1-7].*)
221
    # On Darwin, performance is improved if libstdc++ is single-module.
222
    # Up to at least 10.3.7, -flat_namespace is required for proper
223
    # treatment of coalesced symbols.
224
    OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,-single_module -Wl,-flat_namespace"
225
    os_include_dir="os/bsd/darwin"
226
    ;;
227
  darwin[89] | darwin[89].* | darwin[1-9][0-9]* )
228
    # On Darwin, performance is improved if libstdc++ is single-module,
229
    # and on 8+ compatibility is better if not -flat_namespace.
230
    OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,-single_module"
231
    case "${host_cpu}" in
232
      i[34567]86 | x86_64)
233
        OPTIMIZE_CXXFLAGS="${OPTIMIZE_CXXFLAGS} -fvisibility-inlines-hidden"
234
        ;;
235
    esac
236
    os_include_dir="os/bsd/darwin"
237
    ;;
238
  *djgpp*)      # leading * picks up "msdosdjgpp"
239
    os_include_dir="os/djgpp"
240
    error_constants_dir="os/djgpp"
241
    ;;
242
  freebsd*)
243
    os_include_dir="os/bsd/freebsd"
244
    ;;
245
  gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
246
    if [ "$uclibc" = "yes" ]; then
247
      os_include_dir="os/uclibc"
248
    elif [ "$bionic" = "yes" ]; then
249
      os_include_dir="os/bionic"
250
    else
251
      os_include_dir="os/gnu-linux"
252
    fi
253
    ;;
254
  hpux*)
255
    os_include_dir="os/hpux"
256
    ;;
257
  irix6.5*)
258
    os_include_dir="os/irix/irix6.5"
259
    atomicity_dir=os/irix
260
    atomic_word_dir=os/irix
261
    # libstdc++.so relies on emutls on IRIX, which only works with the
262
    # real functions implemented in libpthread.so, not with the stubs in
263
    # libc, so always pass -lpthread.
264
    OPT_LDFLAGS="${OPT_LDFLAGS} -lpthread"
265
    ;;
266
  mingw32*)
267
    case "$host" in
268
      *-w64-*)
269
        os_include_dir="os/mingw32-w64"
270
        error_constants_dir="os/mingw32-w64"
271
        ;;
272
      *)
273
        os_include_dir="os/mingw32"
274
        error_constants_dir="os/mingw32"
275
        ;;
276
    esac
277
    OPT_LDFLAGS="${OPT_LDFLAGS} \$(lt_host_flags)"
278
    ;;
279
  netbsd*)
280
    os_include_dir="os/bsd/netbsd"
281
    ;;
282
  osf*)
283
    os_include_dir="os/osf"
284
    # libstdc++.so relies on emutls on Tru64 UNIX, which only works with the
285
    # real functions implemented in libpthread.so, not with the dummies in
286
    # libgcc, so always pass -lpthread.
287
    OPT_LDFLAGS="${OPT_LDFLAGS} -lpthread"
288
    ;;
289
  qnx6.[12]*)
290
    os_include_dir="os/qnx/qnx6.1"
291
    c_model=c
292
    ;;
293
  solaris2)
294
    # This too-vague configuration does not provide enough information
295
    # to select a ctype include, and thus os_include_dir is a crap shoot.
296
    echo "Please specify the full version of Solaris, ie. solaris2.9 " 1>&2
297
    exit 1
298
    ;;
299
  solaris2.[89] | solaris2.1[0-9])
300
    os_include_dir="os/solaris/solaris2.8"
301
    ;;
302
  tpf)
303
    os_include_dir="os/tpf"
304
    ;;
305
  vxworks)
306
    os_include_dir="os/vxworks"
307
    ;;
308
  *)
309
    os_include_dir="os/generic"
310
    ;;
311
esac
312
 
313
 
314
# Set any OS-dependent and CPU-dependent bits.
315
# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
316
case "${host}" in
317
  *-*-linux*)
318
    case "${host_cpu}" in
319
      i[567]86)
320
        abi_baseline_pair=i486-linux-gnu
321
        ;;
322
      mips64*)
323
        abi_baseline_pair=mips64-linux-gnu
324
        ;;
325
      powerpc64)
326
        abi_baseline_pair=powerpc64-linux-gnu
327
        ;;
328
      s390)
329
        abi_baseline_pair=s390-linux-gnu
330
        ;;
331
      s390x)
332
        abi_baseline_pair=s390x-linux-gnu
333
        ;;
334
      x86_64)
335
        abi_baseline_pair=x86_64-linux-gnu
336
        ;;
337
      *)
338
        if test -d ${glibcxx_srcdir}/config/abi/post/${try_cpu}-linux-gnu; then
339
          abi_baseline_pair=${try_cpu}-linux-gnu
340
        fi
341
    esac
342
    case "${host}" in
343
      arm*-*-linux-*eabi)
344
        port_specific_symbol_files="\$(srcdir)/../config/os/gnu-linux/arm-eabi-extra.ver"
345
        ;;
346
    esac
347
    ;;
348
  powerpc*-*-darwin*)
349
    port_specific_symbol_files="\$(srcdir)/../config/os/bsd/darwin/ppc-extra.ver"
350
    ;;
351
  *-*-solaris2.[89])
352
    abi_baseline_pair=solaris2.8
353
    abi_baseline_subdir_switch=--print-multi-os-directory
354
    ;;
355
  *-*-solaris2.1[0-9])
356
    abi_baseline_pair=solaris2.10
357
    abi_baseline_subdir_switch=--print-multi-os-directory
358
    ;;
359
esac

powered by: WebSVN 2.1.0

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