Skip to content

Commit 07a9d48

Browse files
Blackhexeukarpov
authored andcommitted
0007-Cygwin-__cxa-atexit.patch
1 parent 9356f55 commit 07a9d48

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

gcc/config.gcc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,7 @@ i[34567]86-*-cygwin*)
22022202
fi
22032203
default_use_cxa_atexit=yes
22042204
use_gcc_stdint=wrap
2205+
default_use_cxa_atexit=yes
22052206
;;
22062207
x86_64-*-cygwin*)
22072208
need_64bit_isa=yes
@@ -2846,6 +2847,7 @@ mipstx39-*-elf* | mipstx39el-*-elf*)
28462847
mmix-knuth-mmixware)
28472848
tm_file="${tm_file} newlib-stdint.h"
28482849
use_gcc_stdint=wrap
2850+
default_use_cxa_atexit=yes
28492851
;;
28502852
mn10300-*-*)
28512853
tm_file="elfos.h newlib-stdint.h ${tm_file}"

libgcc/config/i386/cygming-crtbegin.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,11 @@ __gcc_register_frame (void)
146146
/* If we use the __cxa_atexit method to register C++ dtors
147147
at object construction, also use atexit to register eh frame
148148
info cleanup. */
149+
#ifdef __CYGWIN__
150+
__cxa_atexit(__gcc_deregister_frame, NULL, (void *)&__dso_handle);
151+
#else
149152
atexit(__gcc_deregister_frame);
153+
#endif /* __CYGWIN__ */
150154
#endif /* DEFAULT_USE_CXA_ATEXIT */
151155
}
152156

0 commit comments

Comments
 (0)