Skip to content

Commit ab7befd

Browse files
Blackhexgithub-actions
authored andcommitted
0007-Cygwin-__cxa-atexit.patch
1 parent 263b4ea commit ab7befd

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
@@ -2205,6 +2205,7 @@ i[34567]86-*-cygwin*)
22052205
fi
22062206
default_use_cxa_atexit=yes
22072207
use_gcc_stdint=wrap
2208+
default_use_cxa_atexit=yes
22082209
;;
22092210
x86_64-*-cygwin*)
22102211
need_64bit_isa=yes
@@ -2849,6 +2850,7 @@ mipstx39-*-elf* | mipstx39el-*-elf*)
28492850
mmix-knuth-mmixware)
28502851
tm_file="${tm_file} newlib-stdint.h"
28512852
use_gcc_stdint=wrap
2853+
default_use_cxa_atexit=yes
28522854
;;
28532855
mn10300-*-*)
28542856
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)