From f295fca507f6faa6b690befc4d7c14f632656cb6 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Tue, 31 Aug 2021 21:40:48 +0000 Subject: libstdc++ must use thread-local errno --- libstdc++-v3/configure | 6 ++++++ libstdc++-v3/configure.ac | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index c07e2756974..41564ad22b3 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -78308,6 +78308,12 @@ done tmake_file="${tmake_file_}" +case "${target}" in *-*-solaris2*) + EXTRA_CFLAGS="$EXTRA_CFLAGS -D_TS_ERRNO" + EXTRA_CXX_FLAGS="$EXTRA_CXX_FLAGS -D_TS_ERRNO" +esac + + # Add CET specific flags if Intel CET is enabled. # Check whether --enable-cet was given. if test "${enable_cet+set}" = set; then : diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index e59bcdb2944..b8ee84fa7e4 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -594,6 +594,11 @@ done tmake_file="${tmake_file_}" AC_SUBST(tmake_file) +case "${target}" in *-*-solaris2*) + EXTRA_CFLAGS="$EXTRA_CFLAGS -D_TS_ERRNO" + EXTRA_CXX_FLAGS="$EXTRA_CXX_FLAGS -D_TS_ERRNO" +esac + # Add CET specific flags if Intel CET is enabled. GCC_CET_FLAGS(CET_FLAGS) EXTRA_CXX_FLAGS="$EXTRA_CXX_FLAGS $CET_FLAGS"