dnl support library. More than that will be built (to keep the Makefiles
dnl conveniently clean), but not installed.
dnl
+dnl Also define --disable-libstdcxx-hosted as an alias for
+dnl --disable-hosted-libstdcxx but fail if both are given
+dnl and their values do not agree.
+dnl
dnl Sets:
dnl is_hosted (yes/no)
dnl
AC_DEFUN([GLIBCXX_ENABLE_HOSTED], [
AC_ARG_ENABLE([hosted-libstdcxx],
AC_HELP_STRING([--disable-hosted-libstdcxx],
- [only build freestanding C++ runtime support]),,
+ [only build freestanding C++ runtime support]),
+ [enable_hosted_libstdcxx_was_given=yes],
[case "$host" in
arm*-*-symbianelf*)
enable_hosted_libstdcxx=no
enable_hosted_libstdcxx=yes
;;
esac])
+
+ # Because most configure args are --enable-libstdcxx-foo add an alias
+ # of that form for --enable-hosted-libstdcxx.
+ AC_ARG_ENABLE([libstdcxx-hosted],
+ AC_HELP_STRING([--disable-libstdcxx-hosted],
+ [alias for --disable-hosted-libstdcxx]),
+ [if test "$enable_hosted_libstdcxx_was_given" = yes; then
+ if test "$enable_hosted_libstdcxx" != "$enableval"; then
+ AC_MSG_ERROR([--enable-libstdcxx-hosted=$enableval conflicts with --enable-hosted-libstdcxx=$enable_hosted_libstdcxx])
+ fi
+ else
+ enable_hosted_libstdcxx=${enableval}
+ fi
+ ],)
+
freestanding_flags=
if test "$enable_hosted_libstdcxx" = no; then
AC_MSG_NOTICE([Only freestanding libraries will be built])
with_gnu_ld
enable_libtool_lock
enable_hosted_libstdcxx
+enable_libstdcxx_hosted
enable_libstdcxx_verbose
enable_libstdcxx_pch
with_libstdcxx_lock_policy
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-hosted-libstdcxx
only build freestanding C++ runtime support
+ --disable-libstdcxx-hosted
+ alias for --disable-hosted-libstdcxx
--disable-libstdcxx-verbose
disable termination messages to standard error
--enable-libstdcxx-pch build pre-compiled libstdc++ headers
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12203 "configure"
+#line 12206 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12309 "configure"
+#line 12312 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
# Check whether --enable-hosted-libstdcxx was given.
if test "${enable_hosted_libstdcxx+set}" = set; then :
- enableval=$enable_hosted_libstdcxx;
+ enableval=$enable_hosted_libstdcxx; enable_hosted_libstdcxx_was_given=yes
else
case "$host" in
arm*-*-symbianelf*)
esac
fi
+
+ # Because most configure args are --enable-libstdcxx-foo add an alias
+ # of that form for --enable-hosted-libstdcxx.
+ # Check whether --enable-libstdcxx-hosted was given.
+if test "${enable_libstdcxx_hosted+set}" = set; then :
+ enableval=$enable_libstdcxx_hosted; if test "$enable_hosted_libstdcxx_was_given" = yes; then
+ if test "$enable_hosted_libstdcxx" != "$enableval"; then
+ as_fn_error $? "--enable-libstdcxx-hosted=$enableval conflicts with --enable-hosted-libstdcxx=$enable_hosted_libstdcxx" "$LINENO" 5
+ fi
+ else
+ enable_hosted_libstdcxx=${enableval}
+ fi
+
+fi
+
+
freestanding_flags=
if test "$enable_hosted_libstdcxx" = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Only freestanding libraries will be built" >&5
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 15993 "configure"
+#line 16012 "configure"
int main()
{
typedef bool atomic_type;
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 16028 "configure"
+#line 16047 "configure"
int main()
{
typedef short atomic_type;
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 16063 "configure"
+#line 16082 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 16099 "configure"
+#line 16118 "configure"
int main()
{
typedef long long atomic_type;
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 16255 "configure"
+#line 16274 "configure"
int main()
{
_Decimal32 d1;
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 16297 "configure"
+#line 16316 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };