diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2021-09-02 17:33:55 -0400 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2021-09-02 17:33:55 -0400 |
commit | 041920c9533fad4a517fe6f268ebbd3af2a903a7 (patch) | |
tree | 8bd6477a4b39d73a8121d7292ffad82591eacf41 /0007-Cygwin-__cxa-atexit.patch | |
parent | 58aad36b016765d2b651b9167f0a4caa6142d5f9 (diff) | |
download | cygwin-gcc-041920c9533fad4a517fe6f268ebbd3af2a903a7.tar.gz cygwin-gcc-041920c9533fad4a517fe6f268ebbd3af2a903a7.tar.xz cygwin-gcc-041920c9533fad4a517fe6f268ebbd3af2a903a7.zip |
cygwin-gcc 11.2.0
Diffstat (limited to '0007-Cygwin-__cxa-atexit.patch')
-rw-r--r-- | 0007-Cygwin-__cxa-atexit.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/0007-Cygwin-__cxa-atexit.patch b/0007-Cygwin-__cxa-atexit.patch new file mode 100644 index 0000000..6933294 --- /dev/null +++ b/0007-Cygwin-__cxa-atexit.patch @@ -0,0 +1,49 @@ +From e83f365cde50e5566b270efd9b69ddc6eb900979 Mon Sep 17 00:00:00 2001 +From: Jonathan Yong <10walls@gmail.com> +Date: Thu, 30 Oct 2014 17:15:02 +0800 +Subject: [PATCH 07/11] Cygwin: __cxa-atexit + +--- + gcc/config.gcc | 2 ++ + libgcc/config/i386/cygming-crtbegin.c | 4 ++++ + 2 files changed, 6 insertions(+) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 357b0bed067..d67edad6df3 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2130,6 +2130,7 @@ i[34567]86-*-cygwin*) + fi + default_use_cxa_atexit=yes + use_gcc_stdint=wrap ++ default_use_cxa_atexit=yes + ;; + x86_64-*-cygwin*) + need_64bit_isa=yes +@@ -2744,6 +2745,7 @@ mipstx39-*-elf* | mipstx39el-*-elf*) + mmix-knuth-mmixware) + tm_file="${tm_file} newlib-stdint.h" + use_gcc_stdint=wrap ++ default_use_cxa_atexit=yes + ;; + mn10300-*-*) + tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}" +diff --git a/libgcc/config/i386/cygming-crtbegin.c b/libgcc/config/i386/cygming-crtbegin.c +index a89dfedca76..76fd3907ec5 100644 +--- a/libgcc/config/i386/cygming-crtbegin.c ++++ b/libgcc/config/i386/cygming-crtbegin.c +@@ -145,7 +145,11 @@ __gcc_register_frame (void) + /* If we use the __cxa_atexit method to register C++ dtors + at object construction, also use atexit to register eh frame + info cleanup. */ ++#ifdef __CYGWIN__ ++ __cxa_atexit(__gcc_deregister_frame, NULL, (void *)&__dso_handle); ++#else + atexit(__gcc_deregister_frame); ++#endif /* __CYGWIN__ */ + #endif /* DEFAULT_USE_CXA_ATEXIT */ + } + +-- +2.31.1 + |