Skip to content

Commit

Permalink
configure, Darwin: Always add the stdlib option for modern OS versions
Browse files Browse the repository at this point in the history
  • Loading branch information
iains committed Aug 20, 2022
1 parent 1f61af0 commit 2fd0917
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
21 changes: 15 additions & 6 deletions gcc/configure
Original file line number Diff line number Diff line change
Expand Up @@ -3779,15 +3779,24 @@ if test x${gcc_gxx_libcxx_include_dir} != x; then
$as_echo "#define ENABLE_STDLIB_OPTION 1" >>confdefs.h

else
$as_echo "#define ENABLE_STDLIB_OPTION 0" >>confdefs.h
case $target in
*-darwin1[1-9]* | *-darwin2*)
# Default this on for Darwin versions which default to libcxx.
$as_echo "#define ENABLE_STDLIB_OPTION 1" >>confdefs.h

;;
*)
$as_echo "#define ENABLE_STDLIB_OPTION 0" >>confdefs.h

;;
esac
fi
# ??? This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.

if test x${gcc_gxx_libcxx_include_dir} = x; then
libcxx_incdir='include/c++/v1'
if test x${enable_version_specific_runtime_libs} = xyes; then
gcc_gxx_libcxx_include_dir='${libsubdir}/libc++_include/c++/v1'
gcc_gxx_libcxx_include_dir='${libsubdir}/$libcxx_incdir'
else
libcxx_incdir='libc++_include/c++/$(version)/v1'
if test x$host != x$target; then
libcxx_incdir="$target_alias/$libcxx_incdir"
fi
Expand Down Expand Up @@ -19736,7 +19745,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 19739 "configure"
#line 19748 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
Expand Down Expand Up @@ -19842,7 +19851,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 19845 "configure"
#line 19854 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
Expand Down
16 changes: 12 additions & 4 deletions gcc/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,22 @@ if test x${gcc_gxx_libcxx_include_dir} != x; then
AC_DEFINE(ENABLE_STDLIB_OPTION, 1,
[Define if the -stdlib= option should be enabled.])
else
AC_DEFINE(ENABLE_STDLIB_OPTION, 0)
case $target in
*-darwin1[[1-9]]* | *-darwin2*)
# Default this on for Darwin versions which default to libcxx.
AC_DEFINE(ENABLE_STDLIB_OPTION, 1)
;;
*)
AC_DEFINE(ENABLE_STDLIB_OPTION, 0)
;;
esac
fi
# ??? This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.

if test x${gcc_gxx_libcxx_include_dir} = x; then
libcxx_incdir='include/c++/v1'
if test x${enable_version_specific_runtime_libs} = xyes; then
gcc_gxx_libcxx_include_dir='${libsubdir}/libc++_include/c++/v1'
gcc_gxx_libcxx_include_dir='${libsubdir}/$libcxx_incdir'
else
libcxx_incdir='libc++_include/c++/$(version)/v1'
if test x$host != x$target; then
libcxx_incdir="$target_alias/$libcxx_incdir"
fi
Expand Down

0 comments on commit 2fd0917

Please sign in to comment.