blob: 993849f4957c0fbbb8dc421c9e5ecf0ef6ed4cb1 (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
# This file is a shell script fragment that supplies the information
# necessary for a configure script to process the program in
# this directory. For more information, look at ../configure.
# If the language specific compiler does not exist, but the "gcc" directory
# does, we do not build anything. Note, $r is set by the top-level Makefile.
# Note that when we look for the compiler, we search both with and without
# extension to handle cross and canadian cross builds.
# Note that if $norecursion is set we're being called from config.status,
# so don't check for the compiler; we might be doing a make clean.
compiler_name=cc1plus
rm -f skip-this-dir
if test -n "$r" && [ -z "$norecursion" ] ; then
if test -d "$r"/gcc; then
if test -f "$r"/gcc/$compiler_name \
|| test -f "$r"/gcc/$compiler_name.exe; then
true
else
echo "rm -f multilib.out" > skip-this-dir
fi
fi
fi
if [ "${srcdir}" = "." ] ; then
if [ "${with_target_subdir}" != "." ] ; then
topsrcdir=${with_multisrctop}../..
else
topsrcdir=${with_multisrctop}..
fi
else
topsrcdir=${srcdir}/..
fi
if [ -d ${topsrcdir}/gcc ] ; then
configdirs="tests testsuite"
else
configdirs="tests"
fi
srctrigger=sinst.cc
srcname="ANSI C++ library"
package_makefile_frag=Make.pack
package_makefile_rules_frag=Make.pack.r
# per-host:
# per-target:
echo "# Warning: this fragment is automatically generated" > temp.mt
frags=
# If they didn't specify --enable-shared, don't generate shared libs.
case "${enable_shared}" in
yes) shared=yes ;;
no) shared=no ;;
*libstdc++*) shared=yes ;;
*) shared=no ;;
esac
if [ "${shared}" = "yes" ]; then
case "${target}" in
alpha*-*-linux*) frags=../../config/mh-elfalphapic ;;
arm*-*-*) frags=../../config/mh-armpic ;;
hppa*-*-*) frags=../../config/mh-papic ;;
i[3456]86-*-*) frags=../../config/mh-x86pic ;;
powerpc*-*-aix*) ;;
powerpc*-*-*) frags=../../config/mh-ppcpic ;;
sparc*-*-*) frags=../../config/mh-sparcpic ;;
*-*-*) frags=../../config/mh-${target_cpu}pic ;;
esac
case "${target}" in
*-*-aix*) frags="${frags} aix.ml" ;;
*-*-beos*) frags="${frags} beos.ml" ;;
*-dec-osf*) frags="${frags} dec-osf.ml";;
*-*-freebsd2*) ;;
*-*-freebsd*) frags="${frags} freebsd.ml" ;;
*-*-hpux*) frags="${frags} hpux.ml" ;;
*-*-irix[56]*) frags="${frags} irix5.ml" ;;
*-*-linux*aout*) ;;
*-*-linux*) frags="${frags} linux.ml" ;;
# This must come after *-*-linux*
*-*-gnu*) frags="${frags} gnu.ml" ;;
*-*-openbsd*) frags="${frags} openbsd.ml" ;;
*-*-sysv[45]*|*-*-udk*) frags="${frags} elf.ml" ;;
*-*-solaris*) frags="${frags} sol2shm.ml" ;;
*-*-sunos4*) frags="${frags} sunos4.ml" ;;
i[3456]86-*-interix*) frags="${frags} x86-interix.ml" ;;
esac
fi
# Make sure the right flags are defined for multi-threading.
case "${target}" in
*-*-linux*)
case "x${enable_threads}" in
xyes|xposix) frags="${frags} linux.mt" ;;
esac;;
*-*-openbsd*)
case "x${enable_threads}" in
xyes|xposix) frags="${frags} openbsd.mt" ;;
esac;;
m68k-motorola-sysv) frags="${frags} delta.mt" ;;
*-*-solaris*)
case "x${enable_threads}" in
xposix) frags="${frags} sol2pth.mt" ;;
xsolaris) frags="${frags} sol2solth.mt" ;;
esac ;;
*)
case "x${enable_threads}" in
xposix) frags="${frags} posix.mt" ;;
esac ;;
esac
for frag in ${frags}; do
case ${frag} in
../* )
if [ ${srcdir} = . ]; then
[ -n "${with_target_subdir}" ] && frag=../${frag}
[ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
fi
;;
esac
frag=${srcdir}/config/$frag
if [ -f ${frag} ]; then
echo "Appending ${frag} to target-mkfrag"
echo "# Following fragment copied from ${frag}" >> temp.mt
cat ${frag} >> temp.mt
fi
done
target_makefile_frag=target-mkfrag
${moveifchange} temp.mt target-mkfrag
LIBDIR=yes
TO_TOPDIR=../
ALL='libs'
XCXXINCLUDES="-I${srcdir} -I${srcdir}/stl -I${TO_TOPDIR}libio -I${srcdir}/${TO_TOPDIR}libio"
MOSTLYCLEAN='*.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK)'
CLEAN='$(CLEAN_JUNK)'
EXTRA_DISTCLEAN='target-mkfrag'
(. ${srcdir}/${TO_TOPDIR}libio/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
. ${topsrcdir}/config.if
echo "
LIBSTDCXX_INTERFACE=${libstdcxx_interface}
CXX_INTERFACE=${cxx_interface}
LIBC_INTERFACE=${libc_interface}
" >> ${package_makefile_frag}
# This duplicated the AC_PROG_LN_S macro in GNU autoconf.
rm -f conttestdata
if ln -s X conftestdata 2>/dev/null
then
rm -f conftestdata
LN_S="ln -s"
else
LN_S=ln
fi
echo "
LN_S=$LN_S
" >> ${package_makefile_frag}
# post-target:
# If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
# depending on --enable-version-specific-runtime-libs.
if [ -n "${with_cross_host}" ] ; then
rm -f Makefile.tem
sed \
-e 's|^\([ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \
Makefile >Makefile.tem
mv -f Makefile.tem Makefile
fi
# enable multilib-ing by default.
if [ -z "${enable_multilib}" ]; then
enable_multilib=yes
fi
. ${topsrcdir}/config-ml.in
gxx_include_dir=
# Specify the g++ header file directory
# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
if test "${with_gxx_include_dir+set}" = set; then
withval="$with_gxx_include_dir"
case "${withval}" in
yes)
echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
exit 1
;;
no) ;;
*) gxx_include_dir=$with_gxx_include_dir ;;
esac
fi
if test x${gxx_include_dir} = x; then
if test x${enable_version_specific_runtime_libs} = xyes; then
gxx_include_dir='${libsubdir}/include/g++'
else
gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
fi
fi
rm -f Makefile.tem
sed -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
Makefile >Makefile.tem
mv -f Makefile.tem Makefile
|