Skip to content

Instantly share code, notes, and snippets.

@exodist
Created September 27, 2015 05:43
Show Gist options
  • Save exodist/73e5d671d99121397e5e to your computer and use it in GitHub Desktop.
Save exodist/73e5d671d99121397e5e to your computer and use it in GitHub Desktop.
commit 9f39a706c009646a5876cf205c8b6c13b7445e28
Author: Chad Granum <[email protected]>
Date: Sat Sep 26 22:40:04 2015 -0700
Capabilities: detect bad 5.10.0 threads
diff --git a/lib/Test/Stream/Capabilities.pm b/lib/Test/Stream/Capabilities.pm
index 4e65ff9..27b8cae 100644
--- a/lib/Test/Stream/Capabilities.pm
+++ b/lib/Test/Stream/Capabilities.pm
@@ -46,6 +46,12 @@ sub CAN_THREAD {
return 0 unless $] >= 5.008001;
return 0 unless $Config{'useithreads'};
+ # Threads are broken on perl 5.10.0 built with gcc 5.8+
+ if ($] == 5.010000 && $Config{'ccname'} eq 'gcc' && $Config{'gccversion'}) {
+ my @parts = split /\./, $Config{'gccversion'};
+ return 0 if $parts[0] >= 4 && $parts[1] >= 8;
+ }
+
# Change to a version check if this ever changes
return 0 if $INC{'Devel/Cover.pm'};
return 1;
@kentfredric
Copy link

built with gcc 5.8+

4.8*

5.2 is the latest version AFAIK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment