Skip Menu |

This queue is for tickets about the ExtUtils-Depends CPAN distribution.

Report information
The Basics
Id: 62455
Status: resolved
Priority: 0/
Queue: ExtUtils-Depends

People
Owner: Nobody in particular
Requestors: sisyphus [...] cpan.org
Cc: JDB [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: 0.302
Fixed in: (no value)



Subject: [Win32] Incorrect assumptions re 'dlltool' and 'gcc
Depends.pm currently assumes that if, on Win32, the gcc compiler is being used then $Config{cc} will match /^gcc/i . It also assumes that if the compiler is gcc, then the dlltool executable will be name 'dlltool'. Both assumptions are incorrect - attached is a patch that portably fixes the problem. Cheers, Rob
Subject: Depends_pm.diff
--- Depends.pm_orig Tue Oct 26 19:32:58 2010 +++ Depends.pm Tue Oct 26 19:21:14 2010 @@ -348,15 +348,17 @@ sub static_lib { my $base = shift->SUPER::static_lib(@_); - return $base unless $^O =~ /MSWin32/ && $Config{cc} =~ /^gcc/i; + return $base unless $^O =~ /MSWin32/ && $Config{cc} =~ /\bgcc\b/i; - return <<'__EOM__'; + my $DLLTOOL = $Config{'dlltool'} || 'dlltool'; + + return " # This isn't actually a static lib, it just has the same name on Win32. -$(INST_DYNAMIC_LIB): $(INST_DYNAMIC) - dlltool --def $(EXPORT_LIST) --output-lib $@ --dllname $(BASEEXT).$(SO) $(INST_DYNAMIC) +\$(INST_DYNAMIC_LIB): \$(INST_DYNAMIC) + $DLLTOOL --def \$(EXPORT_LIST) --output-lib \$\@ --dllname \$(BASEEXT).\$(SO) \$(INST_DYNAMIC) -dynamic:: $(INST_DYNAMIC_LIB) -__EOM__ +dynamic:: \$(INST_DYNAMIC_LIB) +" } 1;