public inbox for
help / color / mirror / Atom feed
From: Corinna Vinschen <>
Subject: [newlib-cygwin] Fix dynamic initialization for static local variables
Date: Mon, 18 Jan 2021 11:32:26 +0000 (GMT)	[thread overview]
Message-ID: <> (raw);h=9e88e840c2062ee1492e303da5fc696eec849328

commit 9e88e840c2062ee1492e303da5fc696eec849328
Author: Ben Wijen <>
Date:   Fri Jan 15 14:45:29 2021 +0100 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.)

 winsup/cygwin/ |  2 +-
 winsup/cygwin/      | 10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/winsup/cygwin/ b/winsup/cygwin/
index a840f2b83..73d9b37fd 100644
--- a/winsup/cygwin/
+++ b/winsup/cygwin/
@@ -69,7 +69,7 @@ COMMON_CFLAGS=-MMD ${$(*F)_CFLAGS} -Wimplicit-fallthrough=5 -Werror -fmerge-cons
 ifeq ($(target_cpu),x86_64)
 endif${COMMON_CFLAGS} # -std=gnu++14${COMMON_CFLAGS} -fno-threadsafe-statics # -std=gnu++14
diff --git a/winsup/cygwin/ b/winsup/cygwin/
index be3268549..b69524aca 100644
--- a/winsup/cygwin/
+++ b/winsup/cygwin/
@@ -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

                 reply	other threads:[~2021-01-18 11:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).