source: trunk/src/gcc/libstdc++-v3/configure.target@ 1394

Last change on this file since 1394 was 1394, checked in by bird, 22 years ago

#1040: Joined the GCC 3.3.3 with the trunk.

  • Property cvs2svn:cvs-rev set to 1.3
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 5.3 KB
RevLine 
[2]1# configure.target
[1394]2#
[2]3# This shell script handles all target based configuration for libstdc++.
4# It sets various shell variables based on the the target and the
[1394]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# target The configuration target (full CPU-vendor-OS triplet)
[2]13# target_cpu The configuration target CPU
14# target_os The configuration target OS
15#
16#
[1394]17# It sets the following shell variables:
18#
19# cpu_include_dir CPU-specific directory, defaults to cpu/generic
20# if cpu/target_cpu doesn't exist. This is
21# used to set ATOMICITYH.
22#
23# os_include_dir OS-specific directory, defaults to os/generic.
24#
[2]25# c_model the model to use for "C" headers, defaults to c_std.
26#
[1394]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 target (as per config.guess)
32#
33# ATOMICITYH location of atomicity.h,
34# defaults to cpu_include_dir
35#
36# It possibly modifies the following variables:
37#
38# OPT_LDFLAGS extra flags to pass when linking the library, of
39# the form '-Wl,blah'
40# (defaults to empty in acinclude.m4)
41#
42#
43# If the defaults will not work for your platform, you need only change the
44# variables that won't work, i.e., you do not need to explicitly set a
45# working variable to its default. Most targets only need to change the two
46# *_include_dir variables.
[2]47
[1394]48
[2]49# DEFAULTS
[1394]50# Try to guess a default cpu_include_dir based on the name of the CPU. We
51# cannot do this for os_include_dir; there are too many portable operating
52# systems out there. :-)
[2]53c_model=c_std
54c_compatibility=no
55
56
[1394]57# TARGET-SPECIFIC OVERRIDES
[2]58# Set any CPU-dependent bits.
[1394]59# Here we override defaults and catch more general cases due to naming
60# conventions (e.g., chip_name* to catch all variants).
[2]61# THIS TABLE IS SORTED. KEEP IT THAT WAY.
[1394]62
[2]63case "${target_cpu}" in
64 alpha*)
[1394]65 try_cpu=alpha
[2]66 ;;
[1394]67 athlon* | i586 | i686 | i786 | x86_64)
68 try_cpu=i486
[2]69 ;;
[1394]70 hppa*)
71 try_cpu=hppa
[2]72 ;;
[1394]73 m680[246]0)
74 try_cpu=m68k
[2]75 ;;
[1394]76 powerpc* | rs6000)
77 try_cpu=powerpc
[2]78 ;;
[1394]79 s390x)
80 try_cpu=s390
[2]81 ;;
82 sparc* | ultrasparc)
[1394]83 try_cpu=sparc
[2]84 ;;
85 *)
[1394]86 if test -d ${glibcpp_srcdir}/config/cpu/${target_cpu}; then
87 try_cpu=${target_cpu}
88 else
89 try_cpu=generic
90 fi
[2]91 ;;
92esac
93
94
[1394]95# Now look for the file(s) usually tied to a CPU model, and make
96# default choices for those if they haven't been explicitly set
97# already.
98cpu_include_dir="cpu/${try_cpu}"
99ATOMICITYH=$cpu_include_dir
100abi_baseline_pair=${try_cpu}-${host_os}
101
102# Set any OS-dependent bits.
103# Set the os_include_dir.
104# Set c_model, c_compatibility here.
105# If atomic ops and/or numeric limits are OS-specific rather than
106# CPU-specifc, set those here too.
[2]107# THIS TABLE IS SORTED. KEEP IT THAT WAY.
108case "${target_os}" in
109 aix4.[3456789]* | aix[56789]*)
[1394]110 # We set os_include_dir to os/aix only on AIX 4.3 and newer, but
111 # os/aix/atomicity.h works on earlier versions of AIX 4.*, so we
112 # explicitly duplicate the directory for 4.[<3].
113 os_include_dir="os/aix"
114 ATOMICITYH="os/aix"
[2]115 OPT_LDFLAGS="-Wl,-G"
116 ;;
[1394]117 aix4.*)
118 ATOMICITYH="os/aix"
[2]119 ;;
[1394]120 aix*)
121 ATOMICITYH="cpu/generic"
122 ;;
123 bsd*)
124 # Plain BSD attempts to share FreeBSD files.
125 os_include_dir="os/bsd/freebsd"
126 ;;
[2]127 cygwin*)
[1394]128 os_include_dir="os/newlib"
[2]129 ;;
[1394]130 *djgpp*) # leading * picks up "msdosdjgpp"
131 os_include_dir="os/djgpp"
[2]132 ;;
[1394]133 freebsd*)
134 os_include_dir="os/bsd/freebsd"
[2]135 ;;
[1394]136 gnu* | linux*)
137 os_include_dir="os/gnu-linux"
[2]138 ;;
[1394]139 hpux*)
140 os_include_dir="os/hpux"
141 ;;
142 irix[1-6] | irix[1-5].* | irix6.[0-4]*)
143 # This is known to work on at least IRIX 5.2 and 6.3.
144 os_include_dir="os/irix/irix5.2"
145 ATOMICITYH=$os_include_dir
146 ;;
147 irix6.5*)
148 os_include_dir="os/irix/irix6.5"
149 ATOMICITYH=$os_include_dir
150 ;;
[2]151 mingw32*)
[1394]152 os_include_dir="os/mingw32"
[2]153 ;;
154 netbsd*)
[1394]155 os_include_dir="os/bsd/netbsd"
[2]156 ;;
[1394]157 solaris2.5 | solaris2.5.[0-9])
158 os_include_dir="os/solaris/solaris2.5"
[2]159 ;;
[1394]160 solaris2.6)
161 os_include_dir="os/solaris/solaris2.6"
[2]162 ;;
[1394]163 solaris2.[789] | solaris2.1[0-9])
164 os_include_dir="os/solaris/solaris2.7"
[2]165 ;;
[1394]166 windiss*)
167 os_include_dir="os/windiss"
[2]168 ;;
169 qnx6.[12]*)
[1394]170 os_include_dir="os/qnx/qnx6.1"
[2]171 c_model=c
172 ;;
[9]173 *emx)
174 os_include_dir="config/os/os2emx"
175 ;;
[2]176 *)
[1394]177 os_include_dir="os/generic"
[2]178 ;;
179esac
180
181
[1394]182# Set any OS-dependent and CPU-dependent bits.
[2]183# THIS TABLE IS SORTED. KEEP IT THAT WAY.
184case "${target}" in
[1394]185 mips*-*-linux*)
186 ATOMICITYH="cpu/mips"
187 ;;
188 x86_64-*-linux*)
189 abi_baseline_pair="x86_64-linux-gnu"
190 ;;
191 alpha*-*-freebsd5*)
192 abi_baseline_pair="alpha-freebsd5"
193 ;;
194 i*86-*-freebsd4*)
195 abi_baseline_pair="i386-freebsd4"
196 ;;
197 i*86-*-freebsd5*)
198 abi_baseline_pair="i386-freebsd5"
199 ;;
200 sparc*-*-freebsd5*)
201 abi_baseline_pair="sparc-freebsd5"
202 ;;
[2]203esac
Note: See