Module Name: src
Committed By: martin
Date: Sat Oct 2 11:02:46 UTC 2021
Modified Files:
src/external/gpl3/gcc/dist/libgomp [netbsd-9]: oacc-init.c
Log Message:
Apply patch, requested by manu in ticket #1349:
external/gpl3/gcc/dist/libgomp/oacc-init.c (apply patch)
Fix a pthread_key leak in libgomp. Cherry picked from -current where
it was solved by the GCC 8.4 import.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.2.1 \
src/external/gpl3/gcc/dist/libgomp/oacc-init.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gcc/dist/libgomp/oacc-init.c
diff -u src/external/gpl3/gcc/dist/libgomp/oacc-init.c:1.1.1.3 src/external/gpl3/gcc/dist/libgomp/oacc-init.c:1.1.1.3.2.1
--- src/external/gpl3/gcc/dist/libgomp/oacc-init.c:1.1.1.3 Sat Jan 19 10:14:02 2019
+++ src/external/gpl3/gcc/dist/libgomp/oacc-init.c Sat Oct 2 11:02:46 2021
@@ -657,6 +657,15 @@ goacc_runtime_initialize (void)
goacc_host_init ();
}
+static void __attribute__((destructor))
+goacc_runtime_deinitialize (void)
+{
+#if !(defined HAVE_TLS || defined USE_EMUTLS)
+ pthread_key_delete (goacc_tls_key);
+#endif
+ pthread_key_delete (goacc_cleanup_key);
+}
+
/* Compiler helper functions */
attribute_hidden void