Skip to content

Commit 2fd0917

Browse files
committed
configure, Darwin: Always add the stdlib option for modern OS versions
1 parent 1f61af0 commit 2fd0917

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

gcc/configure

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3779,15 +3779,24 @@ if test x${gcc_gxx_libcxx_include_dir} != x; then
37793779
$as_echo "#define ENABLE_STDLIB_OPTION 1" >>confdefs.h
37803780

37813781
else
3782-
$as_echo "#define ENABLE_STDLIB_OPTION 0" >>confdefs.h
3782+
case $target in
3783+
*-darwin1[1-9]* | *-darwin2*)
3784+
# Default this on for Darwin versions which default to libcxx.
3785+
$as_echo "#define ENABLE_STDLIB_OPTION 1" >>confdefs.h
3786+
3787+
;;
3788+
*)
3789+
$as_echo "#define ENABLE_STDLIB_OPTION 0" >>confdefs.h
37833790

3791+
;;
3792+
esac
37843793
fi
3785-
# ??? This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
3794+
37863795
if test x${gcc_gxx_libcxx_include_dir} = x; then
3796+
libcxx_incdir='include/c++/v1'
37873797
if test x${enable_version_specific_runtime_libs} = xyes; then
3788-
gcc_gxx_libcxx_include_dir='${libsubdir}/libc++_include/c++/v1'
3798+
gcc_gxx_libcxx_include_dir='${libsubdir}/$libcxx_incdir'
37893799
else
3790-
libcxx_incdir='libc++_include/c++/$(version)/v1'
37913800
if test x$host != x$target; then
37923801
libcxx_incdir="$target_alias/$libcxx_incdir"
37933802
fi
@@ -19736,7 +19745,7 @@ else
1973619745
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1973719746
lt_status=$lt_dlunknown
1973819747
cat > conftest.$ac_ext <<_LT_EOF
19739-
#line 19739 "configure"
19748+
#line 19748 "configure"
1974019749
#include "confdefs.h"
1974119750

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

1984819857
#if HAVE_DLFCN_H

gcc/configure.ac

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,22 @@ if test x${gcc_gxx_libcxx_include_dir} != x; then
249249
AC_DEFINE(ENABLE_STDLIB_OPTION, 1,
250250
[Define if the -stdlib= option should be enabled.])
251251
else
252-
AC_DEFINE(ENABLE_STDLIB_OPTION, 0)
252+
case $target in
253+
*-darwin1[[1-9]]* | *-darwin2*)
254+
# Default this on for Darwin versions which default to libcxx.
255+
AC_DEFINE(ENABLE_STDLIB_OPTION, 1)
256+
;;
257+
*)
258+
AC_DEFINE(ENABLE_STDLIB_OPTION, 0)
259+
;;
260+
esac
253261
fi
254-
# ??? This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
262+
255263
if test x${gcc_gxx_libcxx_include_dir} = x; then
264+
libcxx_incdir='include/c++/v1'
256265
if test x${enable_version_specific_runtime_libs} = xyes; then
257-
gcc_gxx_libcxx_include_dir='${libsubdir}/libc++_include/c++/v1'
266+
gcc_gxx_libcxx_include_dir='${libsubdir}/$libcxx_incdir'
258267
else
259-
libcxx_incdir='libc++_include/c++/$(version)/v1'
260268
if test x$host != x$target; then
261269
libcxx_incdir="$target_alias/$libcxx_incdir"
262270
fi

0 commit comments

Comments
 (0)