From 17ee48027c5cc1550e84eeea7c54c9626d55101d 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 9b6027775456..e0fa6748859e 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -72297,6 +72297,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 91b3c1f32f2a..0345a98512fb 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -633,6 +633,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"