af13a7a6ec
2007-03-04 Benjamin Kosnik <bkoz@redhat.com> * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Add c_global. * configure.host (c_model): Set default to c_global. * configure: Regenerate. * include/Makefile.am (c_compatibility_headers_extra): Make conditional on GLIBCXX_C_HEADERS_COMPATIBILITY. (c_base_headers_extra): Make conditional on GLIBCXX_C_HEADERS_EXTRA. (c_compatibility_headers): Make conditional on c/c_std/c_global. * include/Makefile.in: Regenerate. * docs/html/configopts.html: Add c_global information to --enable-cheaders. Eventually, "c_std" should mean "C" includes that are in namespace std, with optional C++ "C" compatibility includes to inject into global scope. And "c_global" should mean "C" includes that are in the global namespace, with C++ includes injecting into namespace std and no C++ "C" compatibility includes. 2007-03-04 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Add _GLIBCXX_NAMEPACE_C. Add _GLIBCXX_NAMESPACE_ASSOCIATION_CXX200x. Add _GLIBCXX_TR1 as namespace macro. Add namespace associations for std::__cxx200x conditionally. * include/c_compatibility/assert.h: Correct doxygen markup, conditionalize the global injections on _GLIBCXX_NAMESPACE_C. * include/c_compatibility/ctype.h: Same. * include/c_compatibility/errno.h: Same. * include/c_compatibility/float.h: Same. * include/c_compatibility/iso646.h: Same. * include/c_compatibility/limits.h: Same. * include/c_compatibility/locale.h: Same. * include/c_compatibility/math.h: Same. * include/c_compatibility/setjmp.h: Same. * include/c_compatibility/signal.h: Same. * include/c_compatibility/stdarg.h: Same. * include/c_compatibility/stddef.h: Same. * include/c_compatibility/stdio.h: Same. * include/c_compatibility/stdlib.h: Same. * include/c_compatibility/string.h: Same. * include/c_compatibility/time.h: Same. * include/c_compatibility/wchar.h: Same. * include/c_compatibility/wctype.h: Same. * include/c_compatibility/complex.h: Add. * include/c_compatibility/fenv.h: Same. * include/c_compatibility/inttypes.h: Same. * include/c_compatibility/stdbool.h: Same. * include/c_compatibility/stdint.h: Same. * include/c_compatibility/tgmath.h: Same. * include/c_global/cassert: Add, use include_next, use C++0x features if -std=c++0x. * include/c_global/cctype: Same. * include/c_global/cerrno: Same. * include/c_global/cfloat: Same. * include/c_global/ciso646: Same. * include/c_global/climits: Same. * include/c_global/clocale: Same. * include/c_global/cmath: Same. * include/c_global/cmath.tcc: Same. * include/c_global/csetjmp: Same. * include/c_global/csignal: Same. * include/c_global/cstdarg: Same. * include/c_global/cstddef: Same. * include/c_global/cstdio: Same. * include/c_global/cstdlib: Same. * include/c_global/cstring: Same. * include/c_global/ctime: Same. * include/c_global/cwchar: Same. * include/c_global/cwctype: Same. * include/c_global/ccomplex: Add. * include/c_global/cfenv: Add. * include/c_global/cinttypes: Add. * include/c_global/cstdbool: Add. * include/c_global/cstdint: Add. * include/c_global/ctgmath: Add. * include/std/algorithm: Use C++0x features if -std=c++0x. * include/std/bitset: Same. * include/std/complex: Same. * include/std/deque: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/iomanip: Same. * include/std/ios: Same. * include/std/iosfwd: Same. * include/std/iostream: Same. * include/std/istream: Same. * include/std/iterator: Same. * include/std/limits: Same. * include/std/list: Same. * include/std/locale: Same. * include/std/map: Same. * include/std/memory: Same. * include/std/numeric: Same. * include/std/ostream: Same. * include/std/queue: Same. * include/std/set: Same. * include/std/sstream: Same. * include/std/stack: Same. * include/std/stdexcept: Same. * include/std/streambuf: Same. * include/std/string: Same. * include/std/utility: Same. * include/std/valarray: Same. * include/std/vector: Same. * include/std/array: Add. * include/std/random: Add. * include/std/regex: Add. * include/std/tuple: Add. * include/std/type_traits: Add. * include/std/unordered_map: Add. * include/std/unordered_set: Add. * include/std/c++0x_warning.h: Add. * include/tr1/array: Switch namespaces based on _GLIBCXX_TR1. * include/tr1/boost_shared_ptr.h: Same. * include/tr1/cctype: Same. * include/tr1/cfenv: Same. * include/tr1/cinttypes: Same. * include/tr1/cmath: Same. * include/tr1/common.h: Same. * include/tr1/complex: Same. * include/tr1/cstdint: Same. * include/tr1/cstdio: Same. * include/tr1/cstdlib: Same. * include/tr1/cwchar: Same. * include/tr1/cwctype: Same. * include/tr1/functional: Same. * include/tr1/functional_hash.h: Same. * include/tr1/functional_iterate.h: Same. * include/tr1/hashtable: Same. * include/tr1/hashtable_policy.h: Same. * include/tr1/math.h: Same. * include/tr1/memory: Same. * include/tr1/random: Same. * include/tr1/random.tcc: Same. * include/tr1/ref_fwd.h: Same. * include/tr1/repeat.h: Same. * include/tr1/stdlib.h: Same. * include/tr1/tuple: Same. * include/tr1/tuple_iterate.h: Same. * include/tr1/type_traits: Same. * include/tr1/type_traits_fwd.h: Same. * include/tr1/unordered_map: Same. * include/tr1/unordered_set: Same. * include/tr1/utility: Same. * include/tr1/ccomplex: Add. * include/tr1/complex.h: Add. * include/tr1/regex: Add. * include/Makefile.am: Add C++0x headers, "C" compatibility headers. * include/Makefile.in: Regenerate. * testsuite/tr1/headers.cc: Add in regex/complex. * testsuite/17_intro/headers/c++200x/all.cc: New. * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc: Same. * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Same. * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc: Same. * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc: Same. * testsuite/18_support/headers/cstdint/types_std_c++0x.cc: Same. * testsuite/20_util/enable_shared_from_this/requirements/ explicit_instantiation.cc: Same. * testsuite/20_util/headers/functional/types_std_c++0x.cc: Same. * testsuite/20_util/headers/functional/ using_namespace_std_placeholders.cc: Same. * testsuite/20_util/headers/memory/types_std_c++0x.cc: Same. * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc: Same. * testsuite/20_util/headers/type_traits/types_std_c++0x.cc: Same. * testsuite/20_util/shared_ptr/requirements/ explicit_instantiation.cc: Same. * testsuite/20_util/weak_ptr/requirements/ explicit_instantiation.cc: Same. * testsuite/23_containers/array/requirements/ explicit_instantiation.cc: Same. * testsuite/23_containers/hash/requirements/ explicit_instantiation.cc: Same. * testsuite/23_containers/headers/array/std_c++0x_neg.cc: Same. * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc: Same. * testsuite/23_containers/headers/tuple/types_std_c++0x.cc: Same. * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc: Same. * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc: Same. * testsuite/23_containers/tuple/requirements/ explicit_instantiation.cc: Same. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation.cc: Same. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation.cc: Same. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation.cc: Same. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation.cc: Same. * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc: Same. * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc: Same. * testsuite/26_numerics/headers/cfenv/types_std_c++0x.cc: Same. * testsuite/26_numerics/headers/cmath/types_std_c++0x.cc: Same. * testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Same. * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc: Same. * testsuite/26_numerics/headers/random/std_c++0x_neg.cc: Same. * testsuite/26_numerics/headers/random/types_std_c++0x.cc: Same. * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Same. * testsuite/27_io/headers/cinttypes/types_std_c++0x.cc: Same. * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Same. * testsuite/tr1/8_c_compatibility/cfenv/types.cc: Rename ... * testsuite/tr1/8_c_compatibility/cinttypes/types.cc: Same. * testsuite/tr1/8_c_compatibility/cmath/types.cc: Same. * testsuite/tr1/8_c_compatibility/cstdint/types.cc: Same. * testsuite/tr1/8_c_compatibility/cstdlib/types.cc: Same. * testsuite/tr1/8_c_compatibility/cfenv/types_std_tr1.cc: ...to this. * testsuite/tr1/8_c_compatibility/cinttypes/types_std_tr1.cc: Same. * testsuite/tr1/8_c_compatibility/cmath/types_std_tr1.cc: Same. * testsuite/tr1/8_c_compatibility/cstdint/types_std_tr1.cc: Same. * testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc: Same. From-SVN: r122533
318 lines
8.6 KiB
Plaintext
318 lines
8.6 KiB
Plaintext
# configure.host
|
|
#
|
|
# This shell script handles all host based configuration for libstdc++.
|
|
# It sets various shell variables based on the the host and the
|
|
# configuration options. You can modify this shell script without needing
|
|
# to rerun autoconf/aclocal/etc. This file is "sourced" not executed.
|
|
#
|
|
# You should read docs/html/17_intro/porting.* to make sense of this file.
|
|
#
|
|
#
|
|
# It uses the following shell variables as set by config.guess:
|
|
# host The configuration host (full CPU-vendor-OS triplet)
|
|
# host_cpu The configuration host CPU
|
|
# host_os The configuration host OS
|
|
#
|
|
#
|
|
# It sets the following shell variables:
|
|
#
|
|
# cpu_include_dir CPU-specific directory, defaults to cpu/generic
|
|
# if cpu/host_cpu doesn't exist. This is not used
|
|
# directly, but sets the default for others.
|
|
#
|
|
# os_include_dir OS-specific directory, defaults to os/generic.
|
|
#
|
|
# c_model the "C" header model, defaults to c_std.
|
|
#
|
|
# c_compatibility if "C" compatibility headers are necessary,
|
|
# defaults to no.
|
|
#
|
|
# abi_baseline_pair directory name for ABI compat testing,
|
|
# defaults to host_cpu-host_os (as per config.guess)
|
|
#
|
|
# abi_tweaks_dir location of cxxabi_tweaks.h,
|
|
# defaults to cpu_include_dir
|
|
#
|
|
# atomicity_dir location of atomicity.h,
|
|
# defaults to cpu_include_dir
|
|
#
|
|
# atomic_word_dir location of atomic_word.h
|
|
# defaults to generic.
|
|
#
|
|
# cpu_defines_dir location of cpu_defines.h
|
|
# defaults to generic.
|
|
#
|
|
# It possibly modifies the following variables:
|
|
#
|
|
# OPT_LDFLAGS extra flags to pass when linking the library, of
|
|
# the form '-Wl,blah'
|
|
# (defaults to empty in acinclude.m4)
|
|
#
|
|
# port_specific_symbol_files
|
|
# whitespace-seperated list of files containing
|
|
# additional symbols to export from the shared
|
|
# library, when symbol versioning is in use
|
|
#
|
|
#
|
|
# If the defaults will not work for your platform, you need only change the
|
|
# variables that won't work, i.e., you do not need to explicitly set a
|
|
# working variable to its default. Most hosts only need to change the two
|
|
# *_include_dir variables.
|
|
|
|
|
|
# DEFAULTS
|
|
# Try to guess a default cpu_include_dir based on the name of the CPU. We
|
|
# cannot do this for os_include_dir; there are too many portable operating
|
|
# systems out there. :-)
|
|
c_model=c_global
|
|
c_compatibility=no
|
|
atomic_word_dir=cpu/generic
|
|
atomicity_dir="cpu/generic"
|
|
cpu_defines_dir="cpu/generic"
|
|
try_cpu=generic
|
|
abi_tweaks_dir="cpu/generic"
|
|
|
|
# HOST-SPECIFIC OVERRIDES
|
|
# Set any CPU-dependent bits.
|
|
|
|
# Provide a way to funnel exotic flavors and prefixed/postfixed chip
|
|
# variants into the established source config/cpu/* sub-directories.
|
|
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
|
|
case "${host_cpu}" in
|
|
alpha*)
|
|
try_cpu=alpha
|
|
;;
|
|
arm* | xscale | ep9312)
|
|
try_cpu=arm
|
|
;;
|
|
i[567]86 | x86_64)
|
|
try_cpu=i486
|
|
;;
|
|
hppa*)
|
|
try_cpu=hppa
|
|
;;
|
|
mips*)
|
|
try_cpu=mips
|
|
;;
|
|
m680[246]0)
|
|
try_cpu=m68k
|
|
;;
|
|
powerpc* | rs6000)
|
|
try_cpu=powerpc
|
|
;;
|
|
sparc* | ultrasparc)
|
|
try_cpu=sparc
|
|
;;
|
|
*)
|
|
if test -d ${glibcxx_srcdir}/config/cpu/${host_cpu}; then
|
|
try_cpu=${host_cpu}
|
|
fi
|
|
esac
|
|
|
|
|
|
# Now look for the file(s) usually tied to a CPU model, and make
|
|
# default choices for those if they haven't been explicitly set
|
|
# already.
|
|
cpu_include_dir=cpu/${try_cpu}
|
|
|
|
|
|
# Set specific CPU overrides for cpu_defines_dir. Most can just use generic.
|
|
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
|
|
case "${host_cpu}" in
|
|
powerpc* | rs6000)
|
|
cpu_defines_dir=cpu/powerpc
|
|
;;
|
|
esac
|
|
|
|
|
|
# Set specific CPU overrides for atomic_word_dir. Most can just use generic.
|
|
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
|
|
case "${host_cpu}" in
|
|
alpha*)
|
|
atomic_word_dir=cpu/alpha
|
|
;;
|
|
cris*)
|
|
atomic_word_dir=cpu/cris
|
|
;;
|
|
ia64)
|
|
atomic_word_dir=cpu/ia64
|
|
;;
|
|
powerpc* | rs6000)
|
|
atomic_word_dir=cpu/powerpc
|
|
;;
|
|
sparc* | ultrasparc)
|
|
atomic_word_dir=cpu/sparc
|
|
;;
|
|
esac
|
|
|
|
|
|
# Set specific CPU overrides for atomicity_dir.
|
|
# This can be over-ridden in GLIBCXX_ENABLE_ATOMIC_BUILTINS.
|
|
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
|
|
if test -f ${glibcxx_srcdir}/config/${cpu_include_dir}/atomicity.h ; then
|
|
atomicity_dir=$cpu_include_dir
|
|
fi
|
|
|
|
|
|
if test -f ${glibcxx_srcdir}/config/${cpu_include_dir}/cxxabi_tweaks.h ; then
|
|
abi_tweaks_dir=$cpu_include_dir
|
|
fi
|
|
|
|
|
|
# Set any OS-dependent bits.
|
|
# Set the os_include_dir.
|
|
# Set c_model, c_compatibility here.
|
|
# If atomic ops and/or numeric limits are OS-specific rather than
|
|
# CPU-specifc, set those here too.
|
|
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
|
|
case "${host_os}" in
|
|
aix4.[3456789]* | aix[56789]*)
|
|
# We set os_include_dir to os/aix only on AIX 4.3 and newer, but
|
|
# os/aix/atomicity.h works on earlier versions of AIX 4.*, so we
|
|
# explicitly duplicate the directory for 4.[<3].
|
|
os_include_dir="os/aix"
|
|
atomicity_dir="os/aix"
|
|
atomic_word_dir="os/aix"
|
|
OPT_LDFLAGS="-Wl,-G"
|
|
;;
|
|
aix4.*)
|
|
os_include_dir="os/generic"
|
|
atomicity_dir="os/aix"
|
|
atomic_word_dir="os/aix"
|
|
;;
|
|
aix*)
|
|
os_include_dir="os/generic"
|
|
atomicity_dir="cpu/generic"
|
|
;;
|
|
bsd*)
|
|
# Plain BSD attempts to share FreeBSD files.
|
|
os_include_dir="os/bsd/freebsd"
|
|
;;
|
|
cygwin*)
|
|
os_include_dir="os/newlib"
|
|
;;
|
|
darwin | darwin[1-7] | darwin[1-7].*)
|
|
# On Darwin, performance is improved if libstdc++ is single-module.
|
|
# Up to at least 10.3.7, -flat_namespace is required for proper
|
|
# treatment of coalesced symbols.
|
|
OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,-single_module -Wl,-flat_namespace"
|
|
os_include_dir="os/bsd/darwin"
|
|
;;
|
|
darwin[89] | darwin[89].* | darwin[1-9][0-9]* )
|
|
# On Darwin, performance is improved if libstdc++ is single-module,
|
|
# and on 8+ compatibility is better if not -flat_namespace.
|
|
OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,-single_module"
|
|
case "${host_cpu}" in
|
|
i[34567]86 | x86_64)
|
|
OPTIMIZE_CXXFLAGS="${OPTIMIZE_CXXFLAGS} -fvisibility-inlines-hidden"
|
|
;;
|
|
esac
|
|
os_include_dir="os/bsd/darwin"
|
|
;;
|
|
*djgpp*) # leading * picks up "msdosdjgpp"
|
|
os_include_dir="os/djgpp"
|
|
;;
|
|
freebsd*)
|
|
os_include_dir="os/bsd/freebsd"
|
|
;;
|
|
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
|
|
if [ "$uclibc" = "yes" ]; then
|
|
os_include_dir="os/uclibc"
|
|
else
|
|
os_include_dir="os/gnu-linux"
|
|
fi
|
|
;;
|
|
hpux*)
|
|
os_include_dir="os/hpux"
|
|
;;
|
|
irix[1-6] | irix[1-5].* | irix6.[0-4]*)
|
|
# This is known to work on at least IRIX 5.2 and 6.3.
|
|
os_include_dir="os/irix/irix5.2"
|
|
atomicity_dir=os/irix
|
|
atomic_word_dir=os/irix
|
|
;;
|
|
irix6.5*)
|
|
os_include_dir="os/irix/irix6.5"
|
|
atomicity_dir=os/irix
|
|
atomic_word_dir=os/irix
|
|
;;
|
|
mingw32*)
|
|
os_include_dir="os/mingw32"
|
|
;;
|
|
netbsd*)
|
|
os_include_dir="os/bsd/netbsd"
|
|
;;
|
|
qnx6.[12]*)
|
|
os_include_dir="os/qnx/qnx6.1"
|
|
c_model=c
|
|
;;
|
|
solaris2)
|
|
# This too-vague configuration does not provide enough information
|
|
# to select a ctype include, and thus os_include_dir is a crap shoot.
|
|
echo "Please specify the full version of Solaris, ie. solaris2.9 " 1>&2
|
|
exit 1
|
|
;;
|
|
solaris2.5 | solaris2.5.[0-9])
|
|
os_include_dir="os/solaris/solaris2.5"
|
|
;;
|
|
solaris2.6)
|
|
os_include_dir="os/solaris/solaris2.6"
|
|
;;
|
|
solaris2.[789] | solaris2.1[0-9])
|
|
os_include_dir="os/solaris/solaris2.7"
|
|
;;
|
|
tpf)
|
|
os_include_dir="os/tpf"
|
|
;;
|
|
vxworks)
|
|
os_include_dir="os/vxworks"
|
|
;;
|
|
windiss*)
|
|
os_include_dir="os/windiss"
|
|
;;
|
|
*)
|
|
os_include_dir="os/generic"
|
|
;;
|
|
esac
|
|
|
|
|
|
# Set any OS-dependent and CPU-dependent bits.
|
|
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
|
|
case "${host}" in
|
|
*-*-linux*)
|
|
case "${host_cpu}" in
|
|
i[567]86)
|
|
abi_baseline_pair=i486-linux-gnu
|
|
;;
|
|
powerpc64)
|
|
abi_baseline_pair=powerpc64-linux-gnu
|
|
;;
|
|
s390)
|
|
abi_baseline_pair=s390-linux-gnu
|
|
;;
|
|
s390x)
|
|
abi_baseline_pair=s390x-linux-gnu
|
|
;;
|
|
x86_64)
|
|
abi_baseline_pair=x86_64-linux-gnu
|
|
;;
|
|
*)
|
|
if test -d ${glibcxx_srcdir}/config/abi/post/${try_cpu}-linux-gnu; then
|
|
abi_baseline_pair=${try_cpu}-linux-gnu
|
|
fi
|
|
esac
|
|
;;
|
|
mips*-*-*)
|
|
case "${host_os}" in
|
|
gnu* | linux* | irix*)
|
|
;;
|
|
*)
|
|
atomicity_dir="cpu/generic"
|
|
;;
|
|
esac
|
|
;;
|
|
powerpc*-*-darwin*)
|
|
port_specific_symbol_files="\$(srcdir)/../config/os/bsd/darwin/ppc-extra.ver"
|
|
;;
|
|
esac
|