--- inc/Devel/CheckLib.pm.orig	2019-11-11 11:13:36.000000000 +1100
+++ inc/Devel/CheckLib.pm	2022-05-29 13:17:19.000000000 +1000
@@ -482,7 +482,7 @@
     my @ccflags = grep { length } quotewords('\s+', 1, $Config_ccflags||'', $user_ccflags||'');
     my @ldflags = grep { length && $_ !~ m/^-Wl/ } quotewords('\s+', 1, @Config_ldflags, $user_ldflags||'');
     my @paths = split(/$Config{path_sep}/, $ENV{PATH});
-    my @cc = split(/\s+/, $Config{cc});
+    my @cc = split(/\s+/, $ENV{CC});
     if (check_compiler ($cc[0], $debug)) {
 	return ( [ @cc, @ccflags ], \@ldflags );
     }
