diff options
author | Ben Wijen <ben@wijen.net> | 2021-01-15 14:45:29 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2021-01-18 12:22:53 +0100 |
commit | 9e88e840c2062ee1492e303da5fc696eec849328 (patch) | |
tree | f4b3da83363ef688fe5dcafecdad8caaddca3fbd | |
parent | cbeb1009a9faa966821190a4a83d4a120aefd753 (diff) | |
download | newlib-9e88e840c2062ee1492e303da5fc696eec849328.zip newlib-9e88e840c2062ee1492e303da5fc696eec849328.tar.gz newlib-9e88e840c2062ee1492e303da5fc696eec849328.tar.bz2 |
cxx.cc: Fix dynamic initialization for static local variables
The old implementation for __cxa_guard_acquire did not return 1,
therefore dynamic initialization was never performed.
If concurrent-safe dynamic initialisation is ever needed, CXX ABI
must be followed when re-implementing __cxa_guard_acquire (et al.)
-rw-r--r-- | winsup/cygwin/Makefile.in | 2 | ||||
-rw-r--r-- | winsup/cygwin/cxx.cc | 10 |
2 files changed, 1 insertions, 11 deletions
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index a840f2b..73d9b37 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -69,7 +69,7 @@ COMMON_CFLAGS=-MMD ${$(*F)_CFLAGS} -Wimplicit-fallthrough=5 -Werror -fmerge-cons ifeq ($(target_cpu),x86_64) COMMON_CFLAGS+=-mcmodel=small endif -COMPILE.cc+=${COMMON_CFLAGS} # -std=gnu++14 +COMPILE.cc+=${COMMON_CFLAGS} -fno-threadsafe-statics # -std=gnu++14 COMPILE.c+=${COMMON_CFLAGS} AR:=@AR@ diff --git a/winsup/cygwin/cxx.cc b/winsup/cygwin/cxx.cc index be32685..b69524a 100644 --- a/winsup/cygwin/cxx.cc +++ b/winsup/cygwin/cxx.cc @@ -83,16 +83,6 @@ __cxa_pure_virtual (void) api_fatal ("pure virtual method called"); } -extern "C" void -__cxa_guard_acquire () -{ -} - -extern "C" void -__cxa_guard_release () -{ -} - /* These routines are made available as last-resort fallbacks for the application. Should not be used in practice; the entries in this struct get overwritten by each DLL as it |