lol

Merge staging-next into staging

authored by

github-actions[bot] and committed by
GitHub
92f5b045 581059ae

+1625 -60
+306
pkgs/development/compilers/gcc/10/Added-mcf-thread-model-support-from-mcfgthread.patch
··· 1 + From 86f2f767ddffd9f7c6f1470b987ae7b0d251b988 Mon Sep 17 00:00:00 2001 2 + From: Liu Hao <lh_mouse@126.com> 3 + Date: Wed, 25 Apr 2018 21:54:19 +0800 4 + Subject: [PATCH] Added 'mcf' thread model support from mcfgthread. 5 + 6 + Signed-off-by: Liu Hao <lh_mouse@126.com> 7 + --- 8 + config/gthr.m4 | 1 + 9 + gcc/config.gcc | 3 +++ 10 + gcc/config/i386/mingw-mcfgthread.h | 1 + 11 + gcc/config/i386/mingw-w64.h | 2 +- 12 + gcc/config/i386/mingw32.h | 11 ++++++++++- 13 + gcc/configure | 2 +- 14 + gcc/configure.ac | 2 +- 15 + libatomic/configure.tgt | 2 +- 16 + libgcc/config.host | 6 ++++++ 17 + libgcc/config/i386/gthr-mcf.h | 1 + 18 + libgcc/config/i386/t-mingw-mcfgthread | 2 ++ 19 + libgcc/configure | 1 + 20 + libstdc++-v3/configure | 1 + 21 + libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++ 22 + libstdc++-v3/libsupc++/guard.cc | 23 +++++++++++++++++++++++ 23 + libstdc++-v3/src/c++11/thread.cc | 9 +++++++++ 24 + 16 files changed, 80 insertions(+), 5 deletions(-) 25 + create mode 100644 gcc/config/i386/mingw-mcfgthread.h 26 + create mode 100644 libgcc/config/i386/gthr-mcf.h 27 + create mode 100644 libgcc/config/i386/t-mingw-mcfgthread 28 + 29 + diff --git a/config/gthr.m4 b/config/gthr.m4 30 + index 7b29f1f3327..82e21fe1709 100644 31 + --- a/config/gthr.m4 32 + +++ b/config/gthr.m4 33 + @@ -21,6 +21,7 @@ case $1 in 34 + tpf) thread_header=config/s390/gthr-tpf.h ;; 35 + vxworks) thread_header=config/gthr-vxworks.h ;; 36 + win32) thread_header=config/i386/gthr-win32.h ;; 37 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 38 + esac 39 + AC_SUBST(thread_header) 40 + ]) 41 + diff --git a/gcc/config.gcc b/gcc/config.gcc 42 + index 46a9029acec..112c24e95a3 100644 43 + --- a/gcc/config.gcc 44 + +++ b/gcc/config.gcc 45 + @@ -1758,6 +1758,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) 46 + if test x$enable_threads = xposix ; then 47 + tm_file="${tm_file} i386/mingw-pthread.h" 48 + fi 49 + + if test x$enable_threads = xmcf ; then 50 + + tm_file="${tm_file} i386/mingw-mcfgthread.h" 51 + + fi 52 + tm_file="${tm_file} i386/mingw32.h" 53 + # This makes the logic if mingw's or the w64 feature set has to be used 54 + case ${target} in 55 + diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h 56 + new file mode 100644 57 + index 00000000000..ec381a7798f 58 + --- /dev/null 59 + +++ b/gcc/config/i386/mingw-mcfgthread.h 60 + @@ -0,0 +1 @@ 61 + +#define TARGET_USE_MCFGTHREAD 1 62 + diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h 63 + index 484dc7a9e9f..a15bbeea500 100644 64 + --- a/gcc/config/i386/mingw-w64.h 65 + +++ b/gcc/config/i386/mingw-w64.h 66 + @@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see 67 + "%{mwindows:-lgdi32 -lcomdlg32} " \ 68 + "%{fvtable-verify=preinit:-lvtv -lpsapi; \ 69 + fvtable-verify=std:-lvtv -lpsapi} " \ 70 + - "-ladvapi32 -lshell32 -luser32 -lkernel32" 71 + + LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" 72 + 73 + #undef SPEC_32 74 + #undef SPEC_64 75 + diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h 76 + index 0612b87199a..76cea94f3b7 100644 77 + --- a/gcc/config/i386/mingw32.h 78 + +++ b/gcc/config/i386/mingw32.h 79 + @@ -32,6 +32,14 @@ along with GCC; see the file COPYING3. If not see 80 + | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \ 81 + | MASK_MS_BITFIELD_LAYOUT) 82 + 83 + +#ifndef TARGET_USE_MCFGTHREAD 84 + +#define CPP_MCFGTHREAD() ((void)0) 85 + +#define LIB_MCFGTHREAD "" 86 + +#else 87 + +#define CPP_MCFGTHREAD() (builtin_define("__USING_MCFGTHREAD__")) 88 + +#define LIB_MCFGTHREAD " -lmcfgthread " 89 + +#endif 90 + + 91 + /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS 92 + is for compatibility with native compiler. */ 93 + #define EXTRA_OS_CPP_BUILTINS() \ 94 + @@ -50,6 +58,7 @@ along with GCC; see the file COPYING3. If not see 95 + builtin_define_std ("WIN64"); \ 96 + builtin_define ("_WIN64"); \ 97 + } \ 98 + + CPP_MCFGTHREAD(); \ 99 + } \ 100 + while (0) 101 + 102 + @@ -93,7 +102,7 @@ along with GCC; see the file COPYING3. If not see 103 + "%{mwindows:-lgdi32 -lcomdlg32} " \ 104 + "%{fvtable-verify=preinit:-lvtv -lpsapi; \ 105 + fvtable-verify=std:-lvtv -lpsapi} " \ 106 + - "-ladvapi32 -lshell32 -luser32 -lkernel32" 107 + + LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" 108 + 109 + /* Weak symbols do not get resolved if using a Windows dll import lib. 110 + Make the unwind registration references strong undefs. */ 111 + diff --git a/gcc/configure b/gcc/configure 112 + index 6121e163259..52f0e00efe6 100755 113 + --- a/gcc/configure 114 + +++ b/gcc/configure 115 + @@ -11693,7 +11693,7 @@ case ${enable_threads} in 116 + target_thread_file='single' 117 + ;; 118 + aix | dce | lynx | mipssde | posix | rtems | \ 119 + - single | tpf | vxworks | win32) 120 + + single | tpf | vxworks | win32 | mcf) 121 + target_thread_file=${enable_threads} 122 + ;; 123 + *) 124 + diff --git a/gcc/configure.ac b/gcc/configure.ac 125 + index b066cc609e1..4ecdba88de7 100644 126 + --- a/gcc/configure.ac 127 + +++ b/gcc/configure.ac 128 + @@ -1612,7 +1612,7 @@ case ${enable_threads} in 129 + target_thread_file='single' 130 + ;; 131 + aix | dce | lynx | mipssde | posix | rtems | \ 132 + - single | tpf | vxworks | win32) 133 + + single | tpf | vxworks | win32 | mcf) 134 + target_thread_file=${enable_threads} 135 + ;; 136 + *) 137 + diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt 138 + index ea8c34f8c71..23134ad7363 100644 139 + --- a/libatomic/configure.tgt 140 + +++ b/libatomic/configure.tgt 141 + @@ -145,7 +145,7 @@ case "${target}" in 142 + *-*-mingw*) 143 + # OS support for atomic primitives. 144 + case ${target_thread_file} in 145 + - win32) 146 + + win32 | mcf) 147 + config_path="${config_path} mingw" 148 + ;; 149 + posix) 150 + diff --git a/libgcc/config.host b/libgcc/config.host 151 + index 11b4acaff55..9fbd38650bd 100644 152 + --- a/libgcc/config.host 153 + +++ b/libgcc/config.host 154 + @@ -737,6 +737,9 @@ i[34567]86-*-mingw*) 155 + posix) 156 + tmake_file="i386/t-mingw-pthread $tmake_file" 157 + ;; 158 + + mcf) 159 + + tmake_file="i386/t-mingw-mcfgthread $tmake_file" 160 + + ;; 161 + esac 162 + # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h 163 + if test x$ac_cv_sjlj_exceptions = xyes; then 164 + @@ -761,6 +764,9 @@ x86_64-*-mingw*) 165 + posix) 166 + tmake_file="i386/t-mingw-pthread $tmake_file" 167 + ;; 168 + + mcf) 169 + + tmake_file="i386/t-mingw-mcfgthread $tmake_file" 170 + + ;; 171 + esac 172 + # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h 173 + if test x$ac_cv_sjlj_exceptions = xyes; then 174 + diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h 175 + new file mode 100644 176 + index 00000000000..5ea2908361f 177 + --- /dev/null 178 + +++ b/libgcc/config/i386/gthr-mcf.h 179 + @@ -0,0 +1 @@ 180 + +#include <mcfgthread/gthread.h> 181 + diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread 182 + new file mode 100644 183 + index 00000000000..4b9b10e32d6 184 + --- /dev/null 185 + +++ b/libgcc/config/i386/t-mingw-mcfgthread 186 + @@ -0,0 +1,2 @@ 187 + +SHLIB_PTHREAD_CFLAG = 188 + +SHLIB_PTHREAD_LDFLAG = -lmcfgthread 189 + diff --git a/libgcc/configure b/libgcc/configure 190 + index b2f3f870844..eff889dc3b3 100644 191 + --- a/libgcc/configure 192 + +++ b/libgcc/configure 193 + @@ -5451,6 +5451,7 @@ case $target_thread_file in 194 + tpf) thread_header=config/s390/gthr-tpf.h ;; 195 + vxworks) thread_header=config/gthr-vxworks.h ;; 196 + win32) thread_header=config/i386/gthr-win32.h ;; 197 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 198 + esac 199 + 200 + 201 + diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure 202 + index ba094be6f15..979a5ab9ace 100755 203 + --- a/libstdc++-v3/configure 204 + +++ b/libstdc++-v3/configure 205 + @@ -15187,6 +15187,7 @@ case $target_thread_file in 206 + tpf) thread_header=config/s390/gthr-tpf.h ;; 207 + vxworks) thread_header=config/gthr-vxworks.h ;; 208 + win32) thread_header=config/i386/gthr-win32.h ;; 209 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 210 + esac 211 + 212 + 213 + diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc 214 + index de920d714c6..665fb74bd6b 100644 215 + --- a/libstdc++-v3/libsupc++/atexit_thread.cc 216 + +++ b/libstdc++-v3/libsupc++/atexit_thread.cc 217 + @@ -25,6 +25,22 @@ 218 + #include <cstdlib> 219 + #include <new> 220 + #include "bits/gthr.h" 221 + + 222 + +#ifdef __USING_MCFGTHREAD__ 223 + + 224 + +#include <mcfgthread/gthread.h> 225 + + 226 + +extern "C" int 227 + +__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), 228 + + void *obj, void *dso_handle) 229 + + _GLIBCXX_NOTHROW 230 + +{ 231 + + return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1; 232 + + (void)dso_handle; 233 + +} 234 + + 235 + +#else // __USING_MCFGTHREAD__ 236 + + 237 + #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32 238 + #define WIN32_LEAN_AND_MEAN 239 + #include <windows.h> 240 + @@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha 241 + } 242 + 243 + #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ 244 + + 245 + +#endif // __USING_MCFGTHREAD__ 246 + diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc 247 + index 3a2ec3ad0d6..8b4cc96199b 100644 248 + --- a/libstdc++-v3/libsupc++/guard.cc 249 + +++ b/libstdc++-v3/libsupc++/guard.cc 250 + @@ -28,6 +28,27 @@ 251 + #include <cxxabi.h> 252 + #include <exception> 253 + #include <new> 254 + + 255 + +#ifdef __USING_MCFGTHREAD__ 256 + + 257 + +#include <mcfgthread/gthread.h> 258 + + 259 + +namespace __cxxabiv1 { 260 + + 261 + +extern "C" int __cxa_guard_acquire(__guard *g){ 262 + + return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial; 263 + +} 264 + +extern "C" void __cxa_guard_abort(__guard *g) throw() { 265 + + ::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g); 266 + +} 267 + +extern "C" void __cxa_guard_release(__guard *g) throw() { 268 + + ::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g); 269 + +} 270 + + 271 + +} 272 + + 273 + +#else // __USING_MCFGTHREAD__ 274 + + 275 + #include <ext/atomicity.h> 276 + #include <ext/concurrence.h> 277 + #include <bits/atomic_lockfree_defines.h> 278 + @@ -425,3 +446,5 @@ namespace __cxxabiv1 279 + #endif 280 + } 281 + } 282 + + 283 + +#endif 284 + diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc 285 + index 8238817c2e9..0c6a1f85f6f 100644 286 + --- a/libstdc++-v3/src/c++11/thread.cc 287 + +++ b/libstdc++-v3/src/c++11/thread.cc 288 + @@ -55,6 +55,15 @@ static inline int get_nprocs() 289 + #elif defined(_GLIBCXX_USE_SC_NPROC_ONLN) 290 + # include <unistd.h> 291 + # define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN) 292 + +#elif defined(_WIN32) 293 + +# include <windows.h> 294 + +static inline int get_nprocs() 295 + +{ 296 + + SYSTEM_INFO sysinfo; 297 + + GetSystemInfo(&sysinfo); 298 + + return (int)sysinfo.dwNumberOfProcessors; 299 + +} 300 + +# define _GLIBCXX_NPROCS get_nprocs() 301 + #else 302 + # define _GLIBCXX_NPROCS 0 303 + #endif 304 + -- 305 + 2.17.0 306 +
+3 -4
pkgs/development/compilers/gcc/10/default.nix
··· 66 66 ++ optional langAda ../gnat-cflags.patch 67 67 ++ optional langFortran ../gfortran-driving.patch 68 68 ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch 69 - ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch { 70 - url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch"; 71 - sha256 = "1in5kvcknlpi9z1vvjw6jfmwy8k12zvbqlqfnq84qpm99r0rh00a"; 72 - }); 69 + 70 + # Obtain latest patch with ../update-mcfgthread-patches.sh 71 + ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch; 73 72 74 73 /* Cross-gcc settings (build == host != target) */ 75 74 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
+285
pkgs/development/compilers/gcc/6/Added-mcf-thread-model-support-from-mcfgthread.patch
··· 1 + From 30534f48c6ede142dad0008d1641392d82b8a137 Mon Sep 17 00:00:00 2001 2 + From: Liu Hao <lh_mouse@126.com> 3 + Date: Mon, 18 Apr 2016 11:50:55 +0800 4 + Subject: [PATCH] Added 'mcf' thread model support from mcfgthread. 5 + 6 + Signed-off-by: Liu Hao <lh_mouse@126.com> 7 + --- 8 + config/gthr.m4 | 1 + 9 + gcc/config.gcc | 3 +++ 10 + gcc/config/i386/mingw-mcfgthread.h | 1 + 11 + gcc/config/i386/mingw-w64.h | 2 +- 12 + gcc/config/i386/mingw32.h | 11 ++++++++++- 13 + gcc/configure | 2 +- 14 + gcc/configure.ac | 2 +- 15 + libatomic/configure.tgt | 2 +- 16 + libgcc/config.host | 6 ++++++ 17 + libgcc/config/i386/gthr-mcf.h | 1 + 18 + libgcc/config/i386/t-mingw-mcfgthread | 2 ++ 19 + libgcc/configure | 1 + 20 + libstdc++-v3/configure | 1 + 21 + libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++ 22 + libstdc++-v3/libsupc++/guard.cc | 23 +++++++++++++++++++++++ 23 + 15 files changed, 71 insertions(+), 5 deletions(-) 24 + create mode 100644 gcc/config/i386/mingw-mcfgthread.h 25 + create mode 100644 libgcc/config/i386/gthr-mcf.h 26 + create mode 100644 libgcc/config/i386/t-mingw-mcfgthread 27 + 28 + diff --git a/config/gthr.m4 b/config/gthr.m4 29 + index 7b29f1f3327..82e21fe1709 100644 30 + --- a/config/gthr.m4 31 + +++ b/config/gthr.m4 32 + @@ -21,6 +21,7 @@ case $1 in 33 + tpf) thread_header=config/s390/gthr-tpf.h ;; 34 + vxworks) thread_header=config/gthr-vxworks.h ;; 35 + win32) thread_header=config/i386/gthr-win32.h ;; 36 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 37 + esac 38 + AC_SUBST(thread_header) 39 + ]) 40 + diff --git a/gcc/config.gcc b/gcc/config.gcc 41 + index 858b878d4b3..6f745790d64 100644 42 + --- a/gcc/config.gcc 43 + +++ b/gcc/config.gcc 44 + @@ -1722,6 +1722,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) 45 + if test x$enable_threads = xposix ; then 46 + tm_file="${tm_file} i386/mingw-pthread.h" 47 + fi 48 + + if test x$enable_threads = xmcf ; then 49 + + tm_file="${tm_file} i386/mingw-mcfgthread.h" 50 + + fi 51 + tm_file="${tm_file} i386/mingw32.h" 52 + # This makes the logic if mingw's or the w64 feature set has to be used 53 + case ${target} in 54 + diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h 55 + new file mode 100644 56 + index 00000000000..ec381a7798f 57 + --- /dev/null 58 + +++ b/gcc/config/i386/mingw-mcfgthread.h 59 + @@ -0,0 +1 @@ 60 + +#define TARGET_USE_MCFGTHREAD 1 61 + diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h 62 + index fe11333a2d1..cac85802f38 100644 63 + --- a/gcc/config/i386/mingw-w64.h 64 + +++ b/gcc/config/i386/mingw-w64.h 65 + @@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see 66 + "%{mwindows:-lgdi32 -lcomdlg32} " \ 67 + "%{fvtable-verify=preinit:-lvtv -lpsapi; \ 68 + fvtable-verify=std:-lvtv -lpsapi} " \ 69 + - "-ladvapi32 -lshell32 -luser32 -lkernel32" 70 + + LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" 71 + 72 + #undef SPEC_32 73 + #undef SPEC_64 74 + diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h 75 + index e04818966fa..7b75a372506 100644 76 + --- a/gcc/config/i386/mingw32.h 77 + +++ b/gcc/config/i386/mingw32.h 78 + @@ -32,6 +32,14 @@ along with GCC; see the file COPYING3. If not see 79 + | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \ 80 + | MASK_MS_BITFIELD_LAYOUT) 81 + 82 + +#ifndef TARGET_USE_MCFGTHREAD 83 + +#define CPP_MCFGTHREAD() ((void)0) 84 + +#define LIB_MCFGTHREAD "" 85 + +#else 86 + +#define CPP_MCFGTHREAD() (builtin_define("__USING_MCFGTHREAD__")) 87 + +#define LIB_MCFGTHREAD " -lmcfgthread " 88 + +#endif 89 + + 90 + /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS 91 + is for compatibility with native compiler. */ 92 + #define EXTRA_OS_CPP_BUILTINS() \ 93 + @@ -50,6 +58,7 @@ along with GCC; see the file COPYING3. If not see 94 + builtin_define_std ("WIN64"); \ 95 + builtin_define ("_WIN64"); \ 96 + } \ 97 + + CPP_MCFGTHREAD(); \ 98 + } \ 99 + while (0) 100 + 101 + @@ -93,7 +102,7 @@ along with GCC; see the file COPYING3. If not see 102 + "%{mwindows:-lgdi32 -lcomdlg32} " \ 103 + "%{fvtable-verify=preinit:-lvtv -lpsapi; \ 104 + fvtable-verify=std:-lvtv -lpsapi} " \ 105 + - "-ladvapi32 -lshell32 -luser32 -lkernel32" 106 + + LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" 107 + 108 + /* Weak symbols do not get resolved if using a Windows dll import lib. 109 + Make the unwind registration references strong undefs. */ 110 + diff --git a/gcc/configure b/gcc/configure 111 + index 954673c1c43..6b5667f1c70 100755 112 + --- a/gcc/configure 113 + +++ b/gcc/configure 114 + @@ -11702,7 +11702,7 @@ case ${enable_threads} in 115 + target_thread_file='single' 116 + ;; 117 + aix | dce | lynx | mipssde | posix | rtems | \ 118 + - single | tpf | vxworks | win32) 119 + + single | tpf | vxworks | win32 | mcf) 120 + target_thread_file=${enable_threads} 121 + ;; 122 + *) 123 + diff --git a/gcc/configure.ac b/gcc/configure.ac 124 + index 4c65d441e72..e6fa04ada4f 100644 125 + --- a/gcc/configure.ac 126 + +++ b/gcc/configure.ac 127 + @@ -1593,7 +1593,7 @@ case ${enable_threads} in 128 + target_thread_file='single' 129 + ;; 130 + aix | dce | lynx | mipssde | posix | rtems | \ 131 + - single | tpf | vxworks | win32) 132 + + single | tpf | vxworks | win32 | mcf) 133 + target_thread_file=${enable_threads} 134 + ;; 135 + *) 136 + diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt 137 + index eab2765d7fd..f4058b6f4a2 100644 138 + --- a/libatomic/configure.tgt 139 + +++ b/libatomic/configure.tgt 140 + @@ -124,7 +124,7 @@ case "${target}" in 141 + *-*-mingw*) 142 + # OS support for atomic primitives. 143 + case ${target_thread_file} in 144 + - win32) 145 + + win32 | mcf) 146 + config_path="${config_path} mingw" 147 + ;; 148 + posix) 149 + diff --git a/libgcc/config.host b/libgcc/config.host 150 + index 2b139b8befc..fb18d2a042e 100644 151 + --- a/libgcc/config.host 152 + +++ b/libgcc/config.host 153 + @@ -712,6 +712,9 @@ i[34567]86-*-mingw*) 154 + posix) 155 + tmake_file="i386/t-mingw-pthread $tmake_file" 156 + ;; 157 + + mcf) 158 + + tmake_file="i386/t-mingw-mcfgthread $tmake_file" 159 + + ;; 160 + esac 161 + # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h 162 + if test x$ac_cv_sjlj_exceptions = xyes; then 163 + @@ -736,6 +739,9 @@ x86_64-*-mingw*) 164 + posix) 165 + tmake_file="i386/t-mingw-pthread $tmake_file" 166 + ;; 167 + + mcf) 168 + + tmake_file="i386/t-mingw-mcfgthread $tmake_file" 169 + + ;; 170 + esac 171 + # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h 172 + if test x$ac_cv_sjlj_exceptions = xyes; then 173 + diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h 174 + new file mode 100644 175 + index 00000000000..5ea2908361f 176 + --- /dev/null 177 + +++ b/libgcc/config/i386/gthr-mcf.h 178 + @@ -0,0 +1 @@ 179 + +#include <mcfgthread/gthread.h> 180 + diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread 181 + new file mode 100644 182 + index 00000000000..4b9b10e32d6 183 + --- /dev/null 184 + +++ b/libgcc/config/i386/t-mingw-mcfgthread 185 + @@ -0,0 +1,2 @@ 186 + +SHLIB_PTHREAD_CFLAG = 187 + +SHLIB_PTHREAD_LDFLAG = -lmcfgthread 188 + diff --git a/libgcc/configure b/libgcc/configure 189 + index e7d6c75a6f7..664d0f852c4 100644 190 + --- a/libgcc/configure 191 + +++ b/libgcc/configure 192 + @@ -5077,6 +5077,7 @@ case $target_thread_file in 193 + tpf) thread_header=config/s390/gthr-tpf.h ;; 194 + vxworks) thread_header=config/gthr-vxworks.h ;; 195 + win32) thread_header=config/i386/gthr-win32.h ;; 196 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 197 + esac 198 + 199 + 200 + diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure 201 + index b5ae4213f94..c484d3aee5f 100755 202 + --- a/libstdc++-v3/configure 203 + +++ b/libstdc++-v3/configure 204 + @@ -15177,6 +15177,7 @@ case $target_thread_file in 205 + tpf) thread_header=config/s390/gthr-tpf.h ;; 206 + vxworks) thread_header=config/gthr-vxworks.h ;; 207 + win32) thread_header=config/i386/gthr-win32.h ;; 208 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 209 + esac 210 + 211 + 212 + diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc 213 + index e6520c1094f..3d6907796dd 100644 214 + --- a/libstdc++-v3/libsupc++/atexit_thread.cc 215 + +++ b/libstdc++-v3/libsupc++/atexit_thread.cc 216 + @@ -25,6 +25,22 @@ 217 + #include <cstdlib> 218 + #include <new> 219 + #include "bits/gthr.h" 220 + + 221 + +#ifdef __USING_MCFGTHREAD__ 222 + + 223 + +#include <mcfgthread/gthread.h> 224 + + 225 + +extern "C" int 226 + +__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), 227 + + void *obj, void *dso_handle) 228 + + _GLIBCXX_NOTHROW 229 + +{ 230 + + return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1; 231 + + (void)dso_handle; 232 + +} 233 + + 234 + +#else // __USING_MCFGTHREAD__ 235 + + 236 + #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32 237 + #define WIN32_LEAN_AND_MEAN 238 + #include <windows.h> 239 + @@ -163,3 +179,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha 240 + } 241 + 242 + #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ 243 + + 244 + +#endif // __USING_MCFGTHREAD__ 245 + diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc 246 + index 9b617998ffe..a441fdbb616 100644 247 + --- a/libstdc++-v3/libsupc++/guard.cc 248 + +++ b/libstdc++-v3/libsupc++/guard.cc 249 + @@ -28,6 +28,27 @@ 250 + #include <cxxabi.h> 251 + #include <exception> 252 + #include <new> 253 + + 254 + +#ifdef __USING_MCFGTHREAD__ 255 + + 256 + +#include <mcfgthread/gthread.h> 257 + + 258 + +namespace __cxxabiv1 { 259 + + 260 + +extern "C" int __cxa_guard_acquire(__guard *g){ 261 + + return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial; 262 + +} 263 + +extern "C" void __cxa_guard_abort(__guard *g) throw() { 264 + + ::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g); 265 + +} 266 + +extern "C" void __cxa_guard_release(__guard *g) throw() { 267 + + ::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g); 268 + +} 269 + + 270 + +} 271 + + 272 + +#else // __USING_MCFGTHREAD__ 273 + + 274 + #include <ext/atomicity.h> 275 + #include <ext/concurrence.h> 276 + #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \ 277 + @@ -424,3 +445,5 @@ namespace __cxxabiv1 278 + #endif 279 + } 280 + } 281 + + 282 + +#endif 283 + -- 284 + 2.12.1 285 +
+3 -4
pkgs/development/compilers/gcc/6/default.nix
··· 76 76 ++ optional langAda ../gnat-cflags.patch 77 77 ++ optional langFortran ../gfortran-driving.patch 78 78 ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch 79 - ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch { 80 - url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch"; 81 - sha256 = "1c449jgm1vx9g4kv82bxmvlgrwb8f6kwkl0gqmjlmhf7f4hjy2nr"; 82 - }); 79 + 80 + # Obtain latest patch with ../update-mcfgthread-patches.sh 81 + ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch; 83 82 84 83 javaEcj = fetchurl { 85 84 # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
+285
pkgs/development/compilers/gcc/7/Added-mcf-thread-model-support-from-mcfgthread.patch
··· 1 + From d3cb66e4751fcbd581b81a14a973de2d78fc02ad Mon Sep 17 00:00:00 2001 2 + From: Liu Hao <lh_mouse@126.com> 3 + Date: Mon, 18 Apr 2016 11:50:55 +0800 4 + Subject: [PATCH] Added 'mcf' thread model support from mcfgthread. 5 + 6 + Signed-off-by: Liu Hao <lh_mouse@126.com> 7 + --- 8 + config/gthr.m4 | 1 + 9 + gcc/config.gcc | 3 +++ 10 + gcc/config/i386/mingw-mcfgthread.h | 1 + 11 + gcc/config/i386/mingw-w64.h | 2 +- 12 + gcc/config/i386/mingw32.h | 11 ++++++++++- 13 + gcc/configure | 2 +- 14 + gcc/configure.ac | 2 +- 15 + libatomic/configure.tgt | 2 +- 16 + libgcc/config.host | 6 ++++++ 17 + libgcc/config/i386/gthr-mcf.h | 1 + 18 + libgcc/config/i386/t-mingw-mcfgthread | 2 ++ 19 + libgcc/configure | 1 + 20 + libstdc++-v3/configure | 1 + 21 + libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++ 22 + libstdc++-v3/libsupc++/guard.cc | 23 +++++++++++++++++++++++ 23 + 15 files changed, 71 insertions(+), 5 deletions(-) 24 + create mode 100644 gcc/config/i386/mingw-mcfgthread.h 25 + create mode 100644 libgcc/config/i386/gthr-mcf.h 26 + create mode 100644 libgcc/config/i386/t-mingw-mcfgthread 27 + 28 + diff --git a/config/gthr.m4 b/config/gthr.m4 29 + index 7b29f1f3327..82e21fe1709 100644 30 + --- a/config/gthr.m4 31 + +++ b/config/gthr.m4 32 + @@ -21,6 +21,7 @@ case $1 in 33 + tpf) thread_header=config/s390/gthr-tpf.h ;; 34 + vxworks) thread_header=config/gthr-vxworks.h ;; 35 + win32) thread_header=config/i386/gthr-win32.h ;; 36 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 37 + esac 38 + AC_SUBST(thread_header) 39 + ]) 40 + diff --git a/gcc/config.gcc b/gcc/config.gcc 41 + index 8f91197f34e..59db37cac04 100644 42 + --- a/gcc/config.gcc 43 + +++ b/gcc/config.gcc 44 + @@ -1719,6 +1719,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) 45 + if test x$enable_threads = xposix ; then 46 + tm_file="${tm_file} i386/mingw-pthread.h" 47 + fi 48 + + if test x$enable_threads = xmcf ; then 49 + + tm_file="${tm_file} i386/mingw-mcfgthread.h" 50 + + fi 51 + tm_file="${tm_file} i386/mingw32.h" 52 + # This makes the logic if mingw's or the w64 feature set has to be used 53 + case ${target} in 54 + diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h 55 + new file mode 100644 56 + index 00000000000..ec381a7798f 57 + --- /dev/null 58 + +++ b/gcc/config/i386/mingw-mcfgthread.h 59 + @@ -0,0 +1 @@ 60 + +#define TARGET_USE_MCFGTHREAD 1 61 + diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h 62 + index 270ec0dd037..88966f79695 100644 63 + --- a/gcc/config/i386/mingw-w64.h 64 + +++ b/gcc/config/i386/mingw-w64.h 65 + @@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see 66 + "%{mwindows:-lgdi32 -lcomdlg32} " \ 67 + "%{fvtable-verify=preinit:-lvtv -lpsapi; \ 68 + fvtable-verify=std:-lvtv -lpsapi} " \ 69 + - "-ladvapi32 -lshell32 -luser32 -lkernel32" 70 + + LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" 71 + 72 + #undef SPEC_32 73 + #undef SPEC_64 74 + diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h 75 + index e5f014cb473..989cfbe894e 100644 76 + --- a/gcc/config/i386/mingw32.h 77 + +++ b/gcc/config/i386/mingw32.h 78 + @@ -32,6 +32,14 @@ along with GCC; see the file COPYING3. If not see 79 + | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \ 80 + | MASK_MS_BITFIELD_LAYOUT) 81 + 82 + +#ifndef TARGET_USE_MCFGTHREAD 83 + +#define CPP_MCFGTHREAD() ((void)0) 84 + +#define LIB_MCFGTHREAD "" 85 + +#else 86 + +#define CPP_MCFGTHREAD() (builtin_define("__USING_MCFGTHREAD__")) 87 + +#define LIB_MCFGTHREAD " -lmcfgthread " 88 + +#endif 89 + + 90 + /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS 91 + is for compatibility with native compiler. */ 92 + #define EXTRA_OS_CPP_BUILTINS() \ 93 + @@ -50,6 +58,7 @@ along with GCC; see the file COPYING3. If not see 94 + builtin_define_std ("WIN64"); \ 95 + builtin_define ("_WIN64"); \ 96 + } \ 97 + + CPP_MCFGTHREAD(); \ 98 + } \ 99 + while (0) 100 + 101 + @@ -93,7 +102,7 @@ along with GCC; see the file COPYING3. If not see 102 + "%{mwindows:-lgdi32 -lcomdlg32} " \ 103 + "%{fvtable-verify=preinit:-lvtv -lpsapi; \ 104 + fvtable-verify=std:-lvtv -lpsapi} " \ 105 + - "-ladvapi32 -lshell32 -luser32 -lkernel32" 106 + + LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" 107 + 108 + /* Weak symbols do not get resolved if using a Windows dll import lib. 109 + Make the unwind registration references strong undefs. */ 110 + diff --git a/gcc/configure b/gcc/configure 111 + index ea73b151a4e..317200e5620 100755 112 + --- a/gcc/configure 113 + +++ b/gcc/configure 114 + @@ -11681,7 +11681,7 @@ case ${enable_threads} in 115 + target_thread_file='single' 116 + ;; 117 + aix | dce | lynx | mipssde | posix | rtems | \ 118 + - single | tpf | vxworks | win32) 119 + + single | tpf | vxworks | win32 | mcf) 120 + target_thread_file=${enable_threads} 121 + ;; 122 + *) 123 + diff --git a/gcc/configure.ac b/gcc/configure.ac 124 + index 9d4c792a33f..d51899a5676 100644 125 + --- a/gcc/configure.ac 126 + +++ b/gcc/configure.ac 127 + @@ -1612,7 +1612,7 @@ case ${enable_threads} in 128 + target_thread_file='single' 129 + ;; 130 + aix | dce | lynx | mipssde | posix | rtems | \ 131 + - single | tpf | vxworks | win32) 132 + + single | tpf | vxworks | win32 | mcf) 133 + target_thread_file=${enable_threads} 134 + ;; 135 + *) 136 + diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt 137 + index b8af3ab2546..73248438a8c 100644 138 + --- a/libatomic/configure.tgt 139 + +++ b/libatomic/configure.tgt 140 + @@ -125,7 +125,7 @@ case "${target}" in 141 + *-*-mingw*) 142 + # OS support for atomic primitives. 143 + case ${target_thread_file} in 144 + - win32) 145 + + win32 | mcf) 146 + config_path="${config_path} mingw" 147 + ;; 148 + posix) 149 + diff --git a/libgcc/config.host b/libgcc/config.host 150 + index b279a6458f9..20d22f585da 100644 151 + --- a/libgcc/config.host 152 + +++ b/libgcc/config.host 153 + @@ -710,6 +710,9 @@ i[34567]86-*-mingw*) 154 + posix) 155 + tmake_file="i386/t-mingw-pthread $tmake_file" 156 + ;; 157 + + mcf) 158 + + tmake_file="i386/t-mingw-mcfgthread $tmake_file" 159 + + ;; 160 + esac 161 + # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h 162 + if test x$ac_cv_sjlj_exceptions = xyes; then 163 + @@ -734,6 +737,9 @@ x86_64-*-mingw*) 164 + posix) 165 + tmake_file="i386/t-mingw-pthread $tmake_file" 166 + ;; 167 + + mcf) 168 + + tmake_file="i386/t-mingw-mcfgthread $tmake_file" 169 + + ;; 170 + esac 171 + # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h 172 + if test x$ac_cv_sjlj_exceptions = xyes; then 173 + diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h 174 + new file mode 100644 175 + index 00000000000..5ea2908361f 176 + --- /dev/null 177 + +++ b/libgcc/config/i386/gthr-mcf.h 178 + @@ -0,0 +1 @@ 179 + +#include <mcfgthread/gthread.h> 180 + diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread 181 + new file mode 100644 182 + index 00000000000..4b9b10e32d6 183 + --- /dev/null 184 + +++ b/libgcc/config/i386/t-mingw-mcfgthread 185 + @@ -0,0 +1,2 @@ 186 + +SHLIB_PTHREAD_CFLAG = 187 + +SHLIB_PTHREAD_LDFLAG = -lmcfgthread 188 + diff --git a/libgcc/configure b/libgcc/configure 189 + index 45c459788c3..8fc569ef16e 100644 190 + --- a/libgcc/configure 191 + +++ b/libgcc/configure 192 + @@ -5086,6 +5086,7 @@ case $target_thread_file in 193 + tpf) thread_header=config/s390/gthr-tpf.h ;; 194 + vxworks) thread_header=config/gthr-vxworks.h ;; 195 + win32) thread_header=config/i386/gthr-win32.h ;; 196 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 197 + esac 198 + 199 + 200 + diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure 201 + index 2406cb9d946..50e7e4ced89 100755 202 + --- a/libstdc++-v3/configure 203 + +++ b/libstdc++-v3/configure 204 + @@ -15182,6 +15182,7 @@ case $target_thread_file in 205 + tpf) thread_header=config/s390/gthr-tpf.h ;; 206 + vxworks) thread_header=config/gthr-vxworks.h ;; 207 + win32) thread_header=config/i386/gthr-win32.h ;; 208 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 209 + esac 210 + 211 + 212 + diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc 213 + index 923a0707556..a55d85aad2d 100644 214 + --- a/libstdc++-v3/libsupc++/atexit_thread.cc 215 + +++ b/libstdc++-v3/libsupc++/atexit_thread.cc 216 + @@ -25,6 +25,22 @@ 217 + #include <cstdlib> 218 + #include <new> 219 + #include "bits/gthr.h" 220 + + 221 + +#ifdef __USING_MCFGTHREAD__ 222 + + 223 + +#include <mcfgthread/gthread.h> 224 + + 225 + +extern "C" int 226 + +__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), 227 + + void *obj, void *dso_handle) 228 + + _GLIBCXX_NOTHROW 229 + +{ 230 + + return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1; 231 + + (void)dso_handle; 232 + +} 233 + + 234 + +#else // __USING_MCFGTHREAD__ 235 + + 236 + #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32 237 + #define WIN32_LEAN_AND_MEAN 238 + #include <windows.h> 239 + @@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha 240 + } 241 + 242 + #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ 243 + + 244 + +#endif // __USING_MCFGTHREAD__ 245 + diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc 246 + index 19953bc52f0..72fd5f26d5b 100644 247 + --- a/libstdc++-v3/libsupc++/guard.cc 248 + +++ b/libstdc++-v3/libsupc++/guard.cc 249 + @@ -28,6 +28,27 @@ 250 + #include <cxxabi.h> 251 + #include <exception> 252 + #include <new> 253 + + 254 + +#ifdef __USING_MCFGTHREAD__ 255 + + 256 + +#include <mcfgthread/gthread.h> 257 + + 258 + +namespace __cxxabiv1 { 259 + + 260 + +extern "C" int __cxa_guard_acquire(__guard *g){ 261 + + return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial; 262 + +} 263 + +extern "C" void __cxa_guard_abort(__guard *g) throw() { 264 + + ::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g); 265 + +} 266 + +extern "C" void __cxa_guard_release(__guard *g) throw() { 267 + + ::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g); 268 + +} 269 + + 270 + +} 271 + + 272 + +#else // __USING_MCFGTHREAD__ 273 + + 274 + #include <ext/atomicity.h> 275 + #include <ext/concurrence.h> 276 + #include <bits/atomic_lockfree_defines.h> 277 + @@ -425,3 +446,5 @@ namespace __cxxabiv1 278 + #endif 279 + } 280 + } 281 + + 282 + +#endif 283 + -- 284 + 2.12.1 285 +
+3 -4
pkgs/development/compilers/gcc/7/default.nix
··· 73 73 ++ optional langFortran ../gfortran-driving.patch 74 74 ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch 75 75 ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch 76 - ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch { 77 - url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch"; 78 - sha256 = "1nyjnshpq5gbcbbpfv27hy4ajvycmgkpiabkjlxnnrnq1d99k1ay"; 79 - }); 76 + 77 + # Obtain latest patch with ../update-mcfgthread-patches.sh 78 + ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch; 80 79 81 80 /* Cross-gcc settings (build == host != target) */ 82 81 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
+306
pkgs/development/compilers/gcc/8/Added-mcf-thread-model-support-from-mcfgthread.patch
··· 1 + From 86f2f767ddffd9f7c6f1470b987ae7b0d251b988 Mon Sep 17 00:00:00 2001 2 + From: Liu Hao <lh_mouse@126.com> 3 + Date: Wed, 25 Apr 2018 21:54:19 +0800 4 + Subject: [PATCH] Added 'mcf' thread model support from mcfgthread. 5 + 6 + Signed-off-by: Liu Hao <lh_mouse@126.com> 7 + --- 8 + config/gthr.m4 | 1 + 9 + gcc/config.gcc | 3 +++ 10 + gcc/config/i386/mingw-mcfgthread.h | 1 + 11 + gcc/config/i386/mingw-w64.h | 2 +- 12 + gcc/config/i386/mingw32.h | 11 ++++++++++- 13 + gcc/configure | 2 +- 14 + gcc/configure.ac | 2 +- 15 + libatomic/configure.tgt | 2 +- 16 + libgcc/config.host | 6 ++++++ 17 + libgcc/config/i386/gthr-mcf.h | 1 + 18 + libgcc/config/i386/t-mingw-mcfgthread | 2 ++ 19 + libgcc/configure | 1 + 20 + libstdc++-v3/configure | 1 + 21 + libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++ 22 + libstdc++-v3/libsupc++/guard.cc | 23 +++++++++++++++++++++++ 23 + libstdc++-v3/src/c++11/thread.cc | 9 +++++++++ 24 + 16 files changed, 80 insertions(+), 5 deletions(-) 25 + create mode 100644 gcc/config/i386/mingw-mcfgthread.h 26 + create mode 100644 libgcc/config/i386/gthr-mcf.h 27 + create mode 100644 libgcc/config/i386/t-mingw-mcfgthread 28 + 29 + diff --git a/config/gthr.m4 b/config/gthr.m4 30 + index 7b29f1f3327..82e21fe1709 100644 31 + --- a/config/gthr.m4 32 + +++ b/config/gthr.m4 33 + @@ -21,6 +21,7 @@ case $1 in 34 + tpf) thread_header=config/s390/gthr-tpf.h ;; 35 + vxworks) thread_header=config/gthr-vxworks.h ;; 36 + win32) thread_header=config/i386/gthr-win32.h ;; 37 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 38 + esac 39 + AC_SUBST(thread_header) 40 + ]) 41 + diff --git a/gcc/config.gcc b/gcc/config.gcc 42 + index 46a9029acec..112c24e95a3 100644 43 + --- a/gcc/config.gcc 44 + +++ b/gcc/config.gcc 45 + @@ -1758,6 +1758,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) 46 + if test x$enable_threads = xposix ; then 47 + tm_file="${tm_file} i386/mingw-pthread.h" 48 + fi 49 + + if test x$enable_threads = xmcf ; then 50 + + tm_file="${tm_file} i386/mingw-mcfgthread.h" 51 + + fi 52 + tm_file="${tm_file} i386/mingw32.h" 53 + # This makes the logic if mingw's or the w64 feature set has to be used 54 + case ${target} in 55 + diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h 56 + new file mode 100644 57 + index 00000000000..ec381a7798f 58 + --- /dev/null 59 + +++ b/gcc/config/i386/mingw-mcfgthread.h 60 + @@ -0,0 +1 @@ 61 + +#define TARGET_USE_MCFGTHREAD 1 62 + diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h 63 + index 484dc7a9e9f..a15bbeea500 100644 64 + --- a/gcc/config/i386/mingw-w64.h 65 + +++ b/gcc/config/i386/mingw-w64.h 66 + @@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see 67 + "%{mwindows:-lgdi32 -lcomdlg32} " \ 68 + "%{fvtable-verify=preinit:-lvtv -lpsapi; \ 69 + fvtable-verify=std:-lvtv -lpsapi} " \ 70 + - "-ladvapi32 -lshell32 -luser32 -lkernel32" 71 + + LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" 72 + 73 + #undef SPEC_32 74 + #undef SPEC_64 75 + diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h 76 + index 0612b87199a..76cea94f3b7 100644 77 + --- a/gcc/config/i386/mingw32.h 78 + +++ b/gcc/config/i386/mingw32.h 79 + @@ -32,6 +32,14 @@ along with GCC; see the file COPYING3. If not see 80 + | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \ 81 + | MASK_MS_BITFIELD_LAYOUT) 82 + 83 + +#ifndef TARGET_USE_MCFGTHREAD 84 + +#define CPP_MCFGTHREAD() ((void)0) 85 + +#define LIB_MCFGTHREAD "" 86 + +#else 87 + +#define CPP_MCFGTHREAD() (builtin_define("__USING_MCFGTHREAD__")) 88 + +#define LIB_MCFGTHREAD " -lmcfgthread " 89 + +#endif 90 + + 91 + /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS 92 + is for compatibility with native compiler. */ 93 + #define EXTRA_OS_CPP_BUILTINS() \ 94 + @@ -50,6 +58,7 @@ along with GCC; see the file COPYING3. If not see 95 + builtin_define_std ("WIN64"); \ 96 + builtin_define ("_WIN64"); \ 97 + } \ 98 + + CPP_MCFGTHREAD(); \ 99 + } \ 100 + while (0) 101 + 102 + @@ -93,7 +102,7 @@ along with GCC; see the file COPYING3. If not see 103 + "%{mwindows:-lgdi32 -lcomdlg32} " \ 104 + "%{fvtable-verify=preinit:-lvtv -lpsapi; \ 105 + fvtable-verify=std:-lvtv -lpsapi} " \ 106 + - "-ladvapi32 -lshell32 -luser32 -lkernel32" 107 + + LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" 108 + 109 + /* Weak symbols do not get resolved if using a Windows dll import lib. 110 + Make the unwind registration references strong undefs. */ 111 + diff --git a/gcc/configure b/gcc/configure 112 + index 6121e163259..52f0e00efe6 100755 113 + --- a/gcc/configure 114 + +++ b/gcc/configure 115 + @@ -11693,7 +11693,7 @@ case ${enable_threads} in 116 + target_thread_file='single' 117 + ;; 118 + aix | dce | lynx | mipssde | posix | rtems | \ 119 + - single | tpf | vxworks | win32) 120 + + single | tpf | vxworks | win32 | mcf) 121 + target_thread_file=${enable_threads} 122 + ;; 123 + *) 124 + diff --git a/gcc/configure.ac b/gcc/configure.ac 125 + index b066cc609e1..4ecdba88de7 100644 126 + --- a/gcc/configure.ac 127 + +++ b/gcc/configure.ac 128 + @@ -1612,7 +1612,7 @@ case ${enable_threads} in 129 + target_thread_file='single' 130 + ;; 131 + aix | dce | lynx | mipssde | posix | rtems | \ 132 + - single | tpf | vxworks | win32) 133 + + single | tpf | vxworks | win32 | mcf) 134 + target_thread_file=${enable_threads} 135 + ;; 136 + *) 137 + diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt 138 + index ea8c34f8c71..23134ad7363 100644 139 + --- a/libatomic/configure.tgt 140 + +++ b/libatomic/configure.tgt 141 + @@ -145,7 +145,7 @@ case "${target}" in 142 + *-*-mingw*) 143 + # OS support for atomic primitives. 144 + case ${target_thread_file} in 145 + - win32) 146 + + win32 | mcf) 147 + config_path="${config_path} mingw" 148 + ;; 149 + posix) 150 + diff --git a/libgcc/config.host b/libgcc/config.host 151 + index 11b4acaff55..9fbd38650bd 100644 152 + --- a/libgcc/config.host 153 + +++ b/libgcc/config.host 154 + @@ -737,6 +737,9 @@ i[34567]86-*-mingw*) 155 + posix) 156 + tmake_file="i386/t-mingw-pthread $tmake_file" 157 + ;; 158 + + mcf) 159 + + tmake_file="i386/t-mingw-mcfgthread $tmake_file" 160 + + ;; 161 + esac 162 + # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h 163 + if test x$ac_cv_sjlj_exceptions = xyes; then 164 + @@ -761,6 +764,9 @@ x86_64-*-mingw*) 165 + posix) 166 + tmake_file="i386/t-mingw-pthread $tmake_file" 167 + ;; 168 + + mcf) 169 + + tmake_file="i386/t-mingw-mcfgthread $tmake_file" 170 + + ;; 171 + esac 172 + # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h 173 + if test x$ac_cv_sjlj_exceptions = xyes; then 174 + diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h 175 + new file mode 100644 176 + index 00000000000..5ea2908361f 177 + --- /dev/null 178 + +++ b/libgcc/config/i386/gthr-mcf.h 179 + @@ -0,0 +1 @@ 180 + +#include <mcfgthread/gthread.h> 181 + diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread 182 + new file mode 100644 183 + index 00000000000..4b9b10e32d6 184 + --- /dev/null 185 + +++ b/libgcc/config/i386/t-mingw-mcfgthread 186 + @@ -0,0 +1,2 @@ 187 + +SHLIB_PTHREAD_CFLAG = 188 + +SHLIB_PTHREAD_LDFLAG = -lmcfgthread 189 + diff --git a/libgcc/configure b/libgcc/configure 190 + index b2f3f870844..eff889dc3b3 100644 191 + --- a/libgcc/configure 192 + +++ b/libgcc/configure 193 + @@ -5451,6 +5451,7 @@ case $target_thread_file in 194 + tpf) thread_header=config/s390/gthr-tpf.h ;; 195 + vxworks) thread_header=config/gthr-vxworks.h ;; 196 + win32) thread_header=config/i386/gthr-win32.h ;; 197 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 198 + esac 199 + 200 + 201 + diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure 202 + index ba094be6f15..979a5ab9ace 100755 203 + --- a/libstdc++-v3/configure 204 + +++ b/libstdc++-v3/configure 205 + @@ -15187,6 +15187,7 @@ case $target_thread_file in 206 + tpf) thread_header=config/s390/gthr-tpf.h ;; 207 + vxworks) thread_header=config/gthr-vxworks.h ;; 208 + win32) thread_header=config/i386/gthr-win32.h ;; 209 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 210 + esac 211 + 212 + 213 + diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc 214 + index de920d714c6..665fb74bd6b 100644 215 + --- a/libstdc++-v3/libsupc++/atexit_thread.cc 216 + +++ b/libstdc++-v3/libsupc++/atexit_thread.cc 217 + @@ -25,6 +25,22 @@ 218 + #include <cstdlib> 219 + #include <new> 220 + #include "bits/gthr.h" 221 + + 222 + +#ifdef __USING_MCFGTHREAD__ 223 + + 224 + +#include <mcfgthread/gthread.h> 225 + + 226 + +extern "C" int 227 + +__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), 228 + + void *obj, void *dso_handle) 229 + + _GLIBCXX_NOTHROW 230 + +{ 231 + + return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1; 232 + + (void)dso_handle; 233 + +} 234 + + 235 + +#else // __USING_MCFGTHREAD__ 236 + + 237 + #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32 238 + #define WIN32_LEAN_AND_MEAN 239 + #include <windows.h> 240 + @@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha 241 + } 242 + 243 + #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ 244 + + 245 + +#endif // __USING_MCFGTHREAD__ 246 + diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc 247 + index 3a2ec3ad0d6..8b4cc96199b 100644 248 + --- a/libstdc++-v3/libsupc++/guard.cc 249 + +++ b/libstdc++-v3/libsupc++/guard.cc 250 + @@ -28,6 +28,27 @@ 251 + #include <cxxabi.h> 252 + #include <exception> 253 + #include <new> 254 + + 255 + +#ifdef __USING_MCFGTHREAD__ 256 + + 257 + +#include <mcfgthread/gthread.h> 258 + + 259 + +namespace __cxxabiv1 { 260 + + 261 + +extern "C" int __cxa_guard_acquire(__guard *g){ 262 + + return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial; 263 + +} 264 + +extern "C" void __cxa_guard_abort(__guard *g) throw() { 265 + + ::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g); 266 + +} 267 + +extern "C" void __cxa_guard_release(__guard *g) throw() { 268 + + ::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g); 269 + +} 270 + + 271 + +} 272 + + 273 + +#else // __USING_MCFGTHREAD__ 274 + + 275 + #include <ext/atomicity.h> 276 + #include <ext/concurrence.h> 277 + #include <bits/atomic_lockfree_defines.h> 278 + @@ -425,3 +446,5 @@ namespace __cxxabiv1 279 + #endif 280 + } 281 + } 282 + + 283 + +#endif 284 + diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc 285 + index 8238817c2e9..0c6a1f85f6f 100644 286 + --- a/libstdc++-v3/src/c++11/thread.cc 287 + +++ b/libstdc++-v3/src/c++11/thread.cc 288 + @@ -55,6 +55,15 @@ static inline int get_nprocs() 289 + #elif defined(_GLIBCXX_USE_SC_NPROC_ONLN) 290 + # include <unistd.h> 291 + # define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN) 292 + +#elif defined(_WIN32) 293 + +# include <windows.h> 294 + +static inline int get_nprocs() 295 + +{ 296 + + SYSTEM_INFO sysinfo; 297 + + GetSystemInfo(&sysinfo); 298 + + return (int)sysinfo.dwNumberOfProcessors; 299 + +} 300 + +# define _GLIBCXX_NPROCS get_nprocs() 301 + #else 302 + # define _GLIBCXX_NPROCS 0 303 + #endif 304 + -- 305 + 2.17.0 306 +
+3 -4
pkgs/development/compilers/gcc/8/default.nix
··· 63 63 ++ optional langFortran ../gfortran-driving.patch 64 64 ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch 65 65 ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch 66 - ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch { 67 - url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch"; 68 - sha256 = "1in5kvcknlpi9z1vvjw6jfmwy8k12zvbqlqfnq84qpm99r0rh00a"; 69 - }); 66 + 67 + # Obtain latest patch with ../update-mcfgthread-patches.sh 68 + ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch; 70 69 71 70 /* Cross-gcc settings (build == host != target) */ 72 71 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
+306
pkgs/development/compilers/gcc/9/Added-mcf-thread-model-support-from-mcfgthread.patch
··· 1 + From 86f2f767ddffd9f7c6f1470b987ae7b0d251b988 Mon Sep 17 00:00:00 2001 2 + From: Liu Hao <lh_mouse@126.com> 3 + Date: Wed, 25 Apr 2018 21:54:19 +0800 4 + Subject: [PATCH] Added 'mcf' thread model support from mcfgthread. 5 + 6 + Signed-off-by: Liu Hao <lh_mouse@126.com> 7 + --- 8 + config/gthr.m4 | 1 + 9 + gcc/config.gcc | 3 +++ 10 + gcc/config/i386/mingw-mcfgthread.h | 1 + 11 + gcc/config/i386/mingw-w64.h | 2 +- 12 + gcc/config/i386/mingw32.h | 11 ++++++++++- 13 + gcc/configure | 2 +- 14 + gcc/configure.ac | 2 +- 15 + libatomic/configure.tgt | 2 +- 16 + libgcc/config.host | 6 ++++++ 17 + libgcc/config/i386/gthr-mcf.h | 1 + 18 + libgcc/config/i386/t-mingw-mcfgthread | 2 ++ 19 + libgcc/configure | 1 + 20 + libstdc++-v3/configure | 1 + 21 + libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++ 22 + libstdc++-v3/libsupc++/guard.cc | 23 +++++++++++++++++++++++ 23 + libstdc++-v3/src/c++11/thread.cc | 9 +++++++++ 24 + 16 files changed, 80 insertions(+), 5 deletions(-) 25 + create mode 100644 gcc/config/i386/mingw-mcfgthread.h 26 + create mode 100644 libgcc/config/i386/gthr-mcf.h 27 + create mode 100644 libgcc/config/i386/t-mingw-mcfgthread 28 + 29 + diff --git a/config/gthr.m4 b/config/gthr.m4 30 + index 7b29f1f3327..82e21fe1709 100644 31 + --- a/config/gthr.m4 32 + +++ b/config/gthr.m4 33 + @@ -21,6 +21,7 @@ case $1 in 34 + tpf) thread_header=config/s390/gthr-tpf.h ;; 35 + vxworks) thread_header=config/gthr-vxworks.h ;; 36 + win32) thread_header=config/i386/gthr-win32.h ;; 37 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 38 + esac 39 + AC_SUBST(thread_header) 40 + ]) 41 + diff --git a/gcc/config.gcc b/gcc/config.gcc 42 + index 46a9029acec..112c24e95a3 100644 43 + --- a/gcc/config.gcc 44 + +++ b/gcc/config.gcc 45 + @@ -1758,6 +1758,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) 46 + if test x$enable_threads = xposix ; then 47 + tm_file="${tm_file} i386/mingw-pthread.h" 48 + fi 49 + + if test x$enable_threads = xmcf ; then 50 + + tm_file="${tm_file} i386/mingw-mcfgthread.h" 51 + + fi 52 + tm_file="${tm_file} i386/mingw32.h" 53 + # This makes the logic if mingw's or the w64 feature set has to be used 54 + case ${target} in 55 + diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h 56 + new file mode 100644 57 + index 00000000000..ec381a7798f 58 + --- /dev/null 59 + +++ b/gcc/config/i386/mingw-mcfgthread.h 60 + @@ -0,0 +1 @@ 61 + +#define TARGET_USE_MCFGTHREAD 1 62 + diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h 63 + index 484dc7a9e9f..a15bbeea500 100644 64 + --- a/gcc/config/i386/mingw-w64.h 65 + +++ b/gcc/config/i386/mingw-w64.h 66 + @@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see 67 + "%{mwindows:-lgdi32 -lcomdlg32} " \ 68 + "%{fvtable-verify=preinit:-lvtv -lpsapi; \ 69 + fvtable-verify=std:-lvtv -lpsapi} " \ 70 + - "-ladvapi32 -lshell32 -luser32 -lkernel32" 71 + + LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" 72 + 73 + #undef SPEC_32 74 + #undef SPEC_64 75 + diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h 76 + index 0612b87199a..76cea94f3b7 100644 77 + --- a/gcc/config/i386/mingw32.h 78 + +++ b/gcc/config/i386/mingw32.h 79 + @@ -32,6 +32,14 @@ along with GCC; see the file COPYING3. If not see 80 + | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \ 81 + | MASK_MS_BITFIELD_LAYOUT) 82 + 83 + +#ifndef TARGET_USE_MCFGTHREAD 84 + +#define CPP_MCFGTHREAD() ((void)0) 85 + +#define LIB_MCFGTHREAD "" 86 + +#else 87 + +#define CPP_MCFGTHREAD() (builtin_define("__USING_MCFGTHREAD__")) 88 + +#define LIB_MCFGTHREAD " -lmcfgthread " 89 + +#endif 90 + + 91 + /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS 92 + is for compatibility with native compiler. */ 93 + #define EXTRA_OS_CPP_BUILTINS() \ 94 + @@ -50,6 +58,7 @@ along with GCC; see the file COPYING3. If not see 95 + builtin_define_std ("WIN64"); \ 96 + builtin_define ("_WIN64"); \ 97 + } \ 98 + + CPP_MCFGTHREAD(); \ 99 + } \ 100 + while (0) 101 + 102 + @@ -93,7 +102,7 @@ along with GCC; see the file COPYING3. If not see 103 + "%{mwindows:-lgdi32 -lcomdlg32} " \ 104 + "%{fvtable-verify=preinit:-lvtv -lpsapi; \ 105 + fvtable-verify=std:-lvtv -lpsapi} " \ 106 + - "-ladvapi32 -lshell32 -luser32 -lkernel32" 107 + + LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" 108 + 109 + /* Weak symbols do not get resolved if using a Windows dll import lib. 110 + Make the unwind registration references strong undefs. */ 111 + diff --git a/gcc/configure b/gcc/configure 112 + index 6121e163259..52f0e00efe6 100755 113 + --- a/gcc/configure 114 + +++ b/gcc/configure 115 + @@ -11693,7 +11693,7 @@ case ${enable_threads} in 116 + target_thread_file='single' 117 + ;; 118 + aix | dce | lynx | mipssde | posix | rtems | \ 119 + - single | tpf | vxworks | win32) 120 + + single | tpf | vxworks | win32 | mcf) 121 + target_thread_file=${enable_threads} 122 + ;; 123 + *) 124 + diff --git a/gcc/configure.ac b/gcc/configure.ac 125 + index b066cc609e1..4ecdba88de7 100644 126 + --- a/gcc/configure.ac 127 + +++ b/gcc/configure.ac 128 + @@ -1612,7 +1612,7 @@ case ${enable_threads} in 129 + target_thread_file='single' 130 + ;; 131 + aix | dce | lynx | mipssde | posix | rtems | \ 132 + - single | tpf | vxworks | win32) 133 + + single | tpf | vxworks | win32 | mcf) 134 + target_thread_file=${enable_threads} 135 + ;; 136 + *) 137 + diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt 138 + index ea8c34f8c71..23134ad7363 100644 139 + --- a/libatomic/configure.tgt 140 + +++ b/libatomic/configure.tgt 141 + @@ -145,7 +145,7 @@ case "${target}" in 142 + *-*-mingw*) 143 + # OS support for atomic primitives. 144 + case ${target_thread_file} in 145 + - win32) 146 + + win32 | mcf) 147 + config_path="${config_path} mingw" 148 + ;; 149 + posix) 150 + diff --git a/libgcc/config.host b/libgcc/config.host 151 + index 11b4acaff55..9fbd38650bd 100644 152 + --- a/libgcc/config.host 153 + +++ b/libgcc/config.host 154 + @@ -737,6 +737,9 @@ i[34567]86-*-mingw*) 155 + posix) 156 + tmake_file="i386/t-mingw-pthread $tmake_file" 157 + ;; 158 + + mcf) 159 + + tmake_file="i386/t-mingw-mcfgthread $tmake_file" 160 + + ;; 161 + esac 162 + # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h 163 + if test x$ac_cv_sjlj_exceptions = xyes; then 164 + @@ -761,6 +764,9 @@ x86_64-*-mingw*) 165 + posix) 166 + tmake_file="i386/t-mingw-pthread $tmake_file" 167 + ;; 168 + + mcf) 169 + + tmake_file="i386/t-mingw-mcfgthread $tmake_file" 170 + + ;; 171 + esac 172 + # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h 173 + if test x$ac_cv_sjlj_exceptions = xyes; then 174 + diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h 175 + new file mode 100644 176 + index 00000000000..5ea2908361f 177 + --- /dev/null 178 + +++ b/libgcc/config/i386/gthr-mcf.h 179 + @@ -0,0 +1 @@ 180 + +#include <mcfgthread/gthread.h> 181 + diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread 182 + new file mode 100644 183 + index 00000000000..4b9b10e32d6 184 + --- /dev/null 185 + +++ b/libgcc/config/i386/t-mingw-mcfgthread 186 + @@ -0,0 +1,2 @@ 187 + +SHLIB_PTHREAD_CFLAG = 188 + +SHLIB_PTHREAD_LDFLAG = -lmcfgthread 189 + diff --git a/libgcc/configure b/libgcc/configure 190 + index b2f3f870844..eff889dc3b3 100644 191 + --- a/libgcc/configure 192 + +++ b/libgcc/configure 193 + @@ -5451,6 +5451,7 @@ case $target_thread_file in 194 + tpf) thread_header=config/s390/gthr-tpf.h ;; 195 + vxworks) thread_header=config/gthr-vxworks.h ;; 196 + win32) thread_header=config/i386/gthr-win32.h ;; 197 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 198 + esac 199 + 200 + 201 + diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure 202 + index ba094be6f15..979a5ab9ace 100755 203 + --- a/libstdc++-v3/configure 204 + +++ b/libstdc++-v3/configure 205 + @@ -15187,6 +15187,7 @@ case $target_thread_file in 206 + tpf) thread_header=config/s390/gthr-tpf.h ;; 207 + vxworks) thread_header=config/gthr-vxworks.h ;; 208 + win32) thread_header=config/i386/gthr-win32.h ;; 209 + + mcf) thread_header=config/i386/gthr-mcf.h ;; 210 + esac 211 + 212 + 213 + diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc 214 + index de920d714c6..665fb74bd6b 100644 215 + --- a/libstdc++-v3/libsupc++/atexit_thread.cc 216 + +++ b/libstdc++-v3/libsupc++/atexit_thread.cc 217 + @@ -25,6 +25,22 @@ 218 + #include <cstdlib> 219 + #include <new> 220 + #include "bits/gthr.h" 221 + + 222 + +#ifdef __USING_MCFGTHREAD__ 223 + + 224 + +#include <mcfgthread/gthread.h> 225 + + 226 + +extern "C" int 227 + +__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), 228 + + void *obj, void *dso_handle) 229 + + _GLIBCXX_NOTHROW 230 + +{ 231 + + return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1; 232 + + (void)dso_handle; 233 + +} 234 + + 235 + +#else // __USING_MCFGTHREAD__ 236 + + 237 + #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32 238 + #define WIN32_LEAN_AND_MEAN 239 + #include <windows.h> 240 + @@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha 241 + } 242 + 243 + #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ 244 + + 245 + +#endif // __USING_MCFGTHREAD__ 246 + diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc 247 + index 3a2ec3ad0d6..8b4cc96199b 100644 248 + --- a/libstdc++-v3/libsupc++/guard.cc 249 + +++ b/libstdc++-v3/libsupc++/guard.cc 250 + @@ -28,6 +28,27 @@ 251 + #include <cxxabi.h> 252 + #include <exception> 253 + #include <new> 254 + + 255 + +#ifdef __USING_MCFGTHREAD__ 256 + + 257 + +#include <mcfgthread/gthread.h> 258 + + 259 + +namespace __cxxabiv1 { 260 + + 261 + +extern "C" int __cxa_guard_acquire(__guard *g){ 262 + + return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial; 263 + +} 264 + +extern "C" void __cxa_guard_abort(__guard *g) throw() { 265 + + ::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g); 266 + +} 267 + +extern "C" void __cxa_guard_release(__guard *g) throw() { 268 + + ::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g); 269 + +} 270 + + 271 + +} 272 + + 273 + +#else // __USING_MCFGTHREAD__ 274 + + 275 + #include <ext/atomicity.h> 276 + #include <ext/concurrence.h> 277 + #include <bits/atomic_lockfree_defines.h> 278 + @@ -425,3 +446,5 @@ namespace __cxxabiv1 279 + #endif 280 + } 281 + } 282 + + 283 + +#endif 284 + diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc 285 + index 8238817c2e9..0c6a1f85f6f 100644 286 + --- a/libstdc++-v3/src/c++11/thread.cc 287 + +++ b/libstdc++-v3/src/c++11/thread.cc 288 + @@ -55,6 +55,15 @@ static inline int get_nprocs() 289 + #elif defined(_GLIBCXX_USE_SC_NPROC_ONLN) 290 + # include <unistd.h> 291 + # define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN) 292 + +#elif defined(_WIN32) 293 + +# include <windows.h> 294 + +static inline int get_nprocs() 295 + +{ 296 + + SYSTEM_INFO sysinfo; 297 + + GetSystemInfo(&sysinfo); 298 + + return (int)sysinfo.dwNumberOfProcessors; 299 + +} 300 + +# define _GLIBCXX_NPROCS get_nprocs() 301 + #else 302 + # define _GLIBCXX_NPROCS 0 303 + #endif 304 + -- 305 + 2.17.0 306 +
+3 -4
pkgs/development/compilers/gcc/9/default.nix
··· 79 79 ++ optional langD ../libphobos.patch 80 80 ++ optional langFortran ../gfortran-driving.patch 81 81 ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch 82 - ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch { 83 - url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch"; 84 - sha256 = "1in5kvcknlpi9z1vvjw6jfmwy8k12zvbqlqfnq84qpm99r0rh00a"; 85 - }); 82 + 83 + # Obtain latest patch with ../update-mcfgthread-patches.sh 84 + ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch; 86 85 87 86 /* Cross-gcc settings (build == host != target) */ 88 87 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
-1
pkgs/development/compilers/gcc/common/mfcgthreads-patches-repo.nix
··· 1 - "740f233da00c4fb5bcc225b2e29768824bcecc58"
+15
pkgs/development/compilers/gcc/update-mcfgthread-patches.sh
··· 1 + #!/usr/bin/env nix-shell 2 + #! nix-shell -i bash -p curl 3 + 4 + # We use this script to download local copies instead of using 5 + # fetchpatch because lmhouse/MINGW-packages-dev is constantly rebased 6 + # against msys2/MINGW-packages-dev and won't have stable commit hashes. 7 + 8 + name=Added-mcf-thread-model-support-from-mcfgthread.patch 9 + source=https://raw.githubusercontent.com/lhmouse/MINGW-packages-dev/master/mingw-w64-gcc-git 10 + dest=$(dirname "$0") 11 + 12 + for majorVersion in 6 7 8 9 10; do 13 + curl "$source/9000-gcc-$majorVersion-branch-$name" \ 14 + > "$dest/$majorVersion/$name" 15 + done
+2 -2
pkgs/development/compilers/idris2/default.nix
··· 5 5 # Uses scheme to bootstrap the build of idris2 6 6 stdenv.mkDerivation rec { 7 7 pname = "idris2"; 8 - version = "0.2.1"; 8 + version = "0.2.2"; 9 9 10 10 src = fetchFromGitHub { 11 11 owner = "idris-lang"; 12 12 repo = "Idris2"; 13 13 rev = "v${version}"; 14 - sha256 = "044slgl2pwvj939kz3z92n6l182plc5fzng1n4z4k6bg11msqq14"; 14 + sha256 = "18m483vccijfh9z6x4zgi37fql3q765x3ypkwixv3rwq9nxnd6hm"; 15 15 }; 16 16 17 17 strictDeps = true;
+6 -4
pkgs/development/python-modules/impacket/default.nix
··· 1 - { lib, buildPythonPackage, fetchPypi, isPy3k }: 1 + { lib, buildPythonPackage, fetchPypi, flask, ldapdomaindump, pycryptodomex, pyasn1, pyopenssl }: 2 2 3 3 buildPythonPackage rec { 4 4 pname = "impacket"; ··· 9 9 sha256 = "4bf7e7b595356585599b4b2773b8a463d7b9765c97012dcd5a44eb6d547f6a1d"; 10 10 }; 11 11 12 - disabled = isPy3k; 12 + propagatedBuildInputs = [ flask ldapdomaindump pycryptodomex pyasn1 pyopenssl ]; 13 13 14 - # no tests 14 + # fail with: 15 + # RecursionError: maximum recursion depth exceeded 15 16 doCheck = false; 17 + pythonImportsCheck = [ "impacket" ]; 16 18 17 19 meta = with lib; { 18 20 description = "Network protocols Constructors and Dissectors"; 19 21 homepage = "https://github.com/CoreSecurity/impacket"; 20 22 # Modified Apache Software License, Version 1.1 21 23 license = licenses.free; 22 - maintainers = with maintainers; [ peterhoeg ]; 24 + maintainers = with maintainers; [ SuperSandro2000 ]; 23 25 }; 24 26 }
+24
pkgs/development/python-modules/ldapdomaindump/default.nix
··· 1 + { lib, buildPythonPackage, fetchPypi, dnspython, future, ldap3 }: 2 + 3 + buildPythonPackage rec { 4 + pname = "ldapdomaindump"; 5 + version = "0.9.3"; 6 + 7 + src = fetchPypi { 8 + inherit pname version; 9 + sha256 = "10cis8cllpa9qi5qil9k7521ag3921mxwg2wj9nyn0lk41rkjagc"; 10 + }; 11 + 12 + propagatedBuildInputs = [ dnspython future ldap3 ]; 13 + 14 + # requires ldap server 15 + doCheck = false; 16 + pythonImportsCheck = [ "ldapdomaindump" ]; 17 + 18 + meta = with lib; { 19 + description = "Active Directory information dumper via LDAP"; 20 + homepage = "https://github.com/dirkjanm/ldapdomaindump/"; 21 + license = licenses.mit; 22 + maintainers = with maintainers; [ SuperSandro2000 ]; 23 + }; 24 + }
+2 -2
pkgs/development/python-modules/micawber/default.nix
··· 2 2 3 3 buildPythonPackage rec { 4 4 pname = "micawber"; 5 - version = "0.5.1"; 5 + version = "0.5.2"; 6 6 7 7 src = fetchPypi { 8 8 inherit pname version; 9 - sha256 = "5e1e6fbab5bfc1edc6d575b900707c24a3484c51cf2e01f059a7e070724a3633"; 9 + sha256 = "ac2d737d8ff27ed01ea3825ed8806970e8137d7b342cef37b39b6dd17e6eb3a4"; 10 10 }; 11 11 12 12 propagatedBuildInputs = [ beautifulsoup4 ];
+2 -2
pkgs/development/python-modules/mocket/default.nix
··· 9 9 10 10 buildPythonPackage rec { 11 11 pname = "mocket"; 12 - version = "3.9.4"; 12 + version = "3.9.35"; 13 13 14 14 src = fetchPypi { 15 15 inherit pname version; 16 - sha256 = "0b3nx8qa66isfl7rm3ljgxflr087qwabnf0a2xa1l5s28rikfj04"; 16 + sha256 = "d822a2adfd8e028a2856785fbfe78e7dd8c7a3b623516298aef6d42a4c9149d1"; 17 17 }; 18 18 19 19 patchPhase = ''
+13 -6
pkgs/development/python-modules/patator/default.nix
··· 1 - { stdenv, buildPythonPackage, isPy3k, fetchPypi, 2 - paramiko, pycurl, ajpy, pyopenssl, cx_oracle, mysqlclient, 3 - psycopg2, pycrypto, dnspython, ipy, pysnmp, pyasn1 }: 1 + { stdenv, buildPythonPackage, isPy27, fetchPypi 2 + , paramiko, pycurl, ajpy, impacket, pyopenssl, cx_oracle, mysqlclient 3 + , psycopg2, pycrypto, dnspython, ipy, pysnmp, pyasn1, pysqlcipher3 }: 4 4 5 5 6 6 buildPythonPackage rec { 7 7 pname = "patator"; 8 8 version = "0.9"; 9 - disabled = !(isPy3k); 9 + disabled = isPy27; 10 10 11 11 src = fetchPypi { 12 12 inherit pname version; 13 13 sha256 = "68cb24bdc3042ee0d47a288b19a8b99a6c54bdbd4ddf0c5817d9b9ac0a0d8a15"; 14 14 }; 15 15 16 + postPatch = '' 17 + substituteInPlace requirements.txt \ 18 + --replace psycopg2-binary psycopg2 19 + ''; 20 + 16 21 propagatedBuildInputs = [ 17 22 paramiko 18 23 pycurl 19 24 ajpy 25 + impacket 20 26 pyopenssl 21 27 cx_oracle 22 28 mysqlclient ··· 26 32 ipy 27 33 pysnmp 28 34 pyasn1 35 + pysqlcipher3 29 36 ]; 30 37 31 - # No tests provided by patator 38 + # tests require docker-compose and vagrant 32 39 doCheck = false; 33 40 34 41 meta = with stdenv.lib; { 35 42 description = "multi-purpose brute-forcer"; 36 43 homepage = "https://github.com/lanjelot/patator"; 37 44 license = licenses.gpl2; 38 - maintainers = with maintainers; [ y0no ]; 45 + maintainers = with maintainers; [ y0no SuperSandro2000 ]; 39 46 }; 40 47 }
+24
pkgs/development/python-modules/pysqlcipher3/default.nix
··· 1 + { lib, buildPythonPackage, fetchPypi, pythonAtLeast, sqlcipher }: 2 + 3 + buildPythonPackage rec { 4 + pname = "pysqlcipher3"; 5 + version = "1.0.3"; 6 + 7 + disabled = pythonAtLeast "3.9"; 8 + 9 + src = fetchPypi { 10 + inherit pname version; 11 + sha256 = "0c54m18h52llwkfc9zaag3qkmfzzp5a1w9jzsm5hd2nfdsxmnkk9"; 12 + }; 13 + 14 + buildInputs = [ sqlcipher ]; 15 + 16 + pythonImportsCheck = [ "pysqlcipher3" ]; 17 + 18 + meta = with lib; { 19 + description = "Python 3 bindings for SQLCipher"; 20 + homepage = "https://github.com/rigglemania/pysqlcipher3/"; 21 + license = licenses.zlib; 22 + maintainers = with maintainers; [ SuperSandro2000 ]; 23 + }; 24 + }
+8 -11
pkgs/development/python-modules/quandl/default.nix
··· 1 - { 2 - lib, fetchPypi, buildPythonPackage, isPy3k, pythonOlder, 3 - # runtime dependencies 4 - pandas, numpy, requests, inflection, python-dateutil, six, more-itertools, importlib-metadata, 5 - # test suite dependencies 6 - nose, unittest2, flake8, httpretty, mock, jsondate, parameterized, faker, factory_boy, 7 - # additional runtime dependencies are required on Python 2.x 8 - pyOpenSSL ? null, ndg-httpsclient ? null, pyasn1 ? null 1 + { lib, fetchPypi, buildPythonPackage, isPy3k, pythonOlder 2 + # runtime dependencies 3 + , pandas, numpy, requests, inflection, python-dateutil, six, more-itertools, importlib-metadata 4 + # test suite dependencies 5 + , nose, unittest2, flake8, httpretty, mock, jsondate, parameterized, faker, factory_boy 6 + # additional runtime dependencies are required on Python 2.x 7 + , pyopenssl, ndg-httpsclient, pyasn1 9 8 }: 10 9 11 10 buildPythonPackage rec { ··· 18 17 pname = "Quandl"; 19 18 sha256 = "0zpw0nwqr4g56l9z4my0fahfgpcmfx74acbmv6nfx1dmq5ggraf3"; 20 19 }; 21 - 22 - doCheck = true; 23 20 24 21 checkInputs = [ 25 22 nose ··· 42 39 six 43 40 more-itertools 44 41 ] ++ lib.optionals (!isPy3k) [ 45 - pyOpenSSL 42 + pyopenssl 46 43 ndg-httpsclient 47 44 pyasn1 48 45 ] ++ lib.optionals (pythonOlder "3.8") [
+2 -2
pkgs/development/python-modules/weasyprint/default.nix
··· 23 23 24 24 buildPythonPackage rec { 25 25 pname = "weasyprint"; 26 - version = "50"; 26 + version = "52"; 27 27 disabled = !isPy3k; 28 28 29 29 # excluded test needs the Ahem font ··· 59 59 src = fetchPypi { 60 60 inherit version; 61 61 pname = "WeasyPrint"; 62 - sha256 = "0invs96zvmcr6wh5klj52jrcnr9qg150v9wpmbhcsf3vv1d1hbcw"; 62 + sha256 = "0rwf43111ws74m8b1alkkxzz57g0np3vmd8as74adwnxslfcg4gs"; 63 63 }; 64 64 65 65 meta = with stdenv.lib; {
+8 -8
pkgs/development/python-modules/weasyprint/library-paths.patch
··· 1 1 diff --git a/weasyprint/fonts.py b/weasyprint/fonts.py 2 - index 377716c1..2016e01c 100644 2 + index 79e3b5b..4438eb4 100644 3 3 --- a/weasyprint/fonts.py 4 4 +++ b/weasyprint/fonts.py 5 - @@ -48,11 +48,8 @@ else: 5 + @@ -45,11 +45,8 @@ else: 6 6 # with OSError: dlopen() failed to load a library: cairo / cairo-2 7 7 # So let's hope we find the same file as cairo already did ;) 8 8 # Same applies to pangocairo requiring pangoft2 ··· 10 10 - 'libfontconfig-1.dll', 11 11 - 'libfontconfig.so.1', 'libfontconfig-1.dylib') 12 12 - pangoft2 = dlopen(ffi, 'pangoft2-1.0', 'libpangoft2-1.0-0', 13 - - 'libpangoft2-1.0.so', 'libpangoft2-1.0.dylib') 13 + - 'libpangoft2-1.0.so.0', 'libpangoft2-1.0.dylib') 14 14 + fontconfig = dlopen(ffi, '@fontconfig@') 15 15 + pangoft2 = dlopen(ffi, '@pangoft2@') 16 16 17 17 ffi.cdef(''' 18 18 // FontConfig 19 19 diff --git a/weasyprint/text.py b/weasyprint/text.py 20 - index 035074e9..08e40395 100644 20 + index 1dc5e4d..b070bad 100644 21 21 --- a/weasyprint/text.py 22 22 +++ b/weasyprint/text.py 23 - @@ -243,12 +243,9 @@ def dlopen(ffi, *names): 23 + @@ -255,12 +255,9 @@ def dlopen(ffi, *names): 24 24 return ffi.dlopen(names[0]) # pragma: no cover 25 25 26 26 27 - -gobject = dlopen(ffi, 'gobject-2.0', 'libgobject-2.0-0', 'libgobject-2.0.so', 27 + -gobject = dlopen(ffi, 'gobject-2.0', 'libgobject-2.0-0', 'libgobject-2.0.so.0', 28 28 - 'libgobject-2.0.dylib') 29 - -pango = dlopen(ffi, 'pango-1.0', 'libpango-1.0-0', 'libpango-1.0.so', 29 + -pango = dlopen(ffi, 'pango-1.0', 'libpango-1.0-0', 'libpango-1.0.so.0', 30 30 - 'libpango-1.0.dylib') 31 31 -pangocairo = dlopen(ffi, 'pangocairo-1.0', 'libpangocairo-1.0-0', 32 - - 'libpangocairo-1.0.so', 'libpangocairo-1.0.dylib') 32 + - 'libpangocairo-1.0.so.0', 'libpangocairo-1.0.dylib') 33 33 +gobject = dlopen(ffi, '@gobject@') 34 34 +pango = dlopen(ffi, '@pango@') 35 35 +pangocairo = dlopen(ffi, '@pangocairo@')
+7 -1
pkgs/tools/misc/ttygif/default.nix
··· 1 - { stdenv, fetchFromGitHub }: 1 + { stdenv, fetchFromGitHub, makeWrapper, imagemagick, xorg }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "ttygif"; ··· 12 12 }; 13 13 14 14 makeFlags = [ "CC:=$(CC)" "PREFIX=${placeholder "out"}" ]; 15 + 16 + nativeBuildInputs = [ makeWrapper ]; 17 + postInstall = '' 18 + wrapProgram $out/bin/ttygif \ 19 + --prefix PATH : ${stdenv.lib.makeBinPath [ imagemagick xorg.xwd ]} 20 + ''; 15 21 16 22 meta = with stdenv.lib; { 17 23 homepage = "https://github.com/icholy/ttygif";
+9 -1
pkgs/top-level/python-packages.nix
··· 3405 3405 3406 3406 lazy-object-proxy = callPackage ../development/python-modules/lazy-object-proxy { }; 3407 3407 3408 + ldap = callPackage ../development/python-modules/ldap { 3409 + inherit (pkgs) openldap cyrus_sasl; 3410 + }; 3411 + 3408 3412 ldap3 = callPackage ../development/python-modules/ldap3 { }; 3409 3413 3410 - ldap = callPackage ../development/python-modules/ldap { inherit (pkgs) openldap cyrus_sasl; }; 3414 + ldapdomaindump = callPackage ../development/python-modules/ldapdomaindump { }; 3411 3415 3412 3416 ldappool = callPackage ../development/python-modules/ldappool { }; 3413 3417 ··· 5721 5725 pyspread = callPackage ../development/python-modules/pyspread { }; 5722 5726 5723 5727 pysptk = callPackage ../development/python-modules/pysptk { }; 5728 + 5729 + pysqlcipher3 = callPackage ../development/python-modules/pysqlcipher3 { 5730 + inherit (pkgs) sqlcipher; 5731 + }; 5724 5732 5725 5733 pysqlite = callPackage ../development/python-modules/pysqlite { }; 5726 5734