Index: lib/Parrot/Configure/Step.pm
===================================================================
--- lib/Parrot/Configure/Step.pm	(revision 8170)
+++ lib/Parrot/Configure/Step.pm	(working copy)
@@ -346,7 +346,7 @@
       'test.cco', 'test.cco')
         and confess "C compiler failed (see test.cco)";
 
-    _run_command("$link $linkflags $link_args test$o ${cc_exe_out}test$exe $libs",
+    _run_command("$link $linkflags test$o $link_args ${cc_exe_out}test$exe $libs",
       'test.ldo', 'test.ldo')
         and confess "Linker failed (see test.ldo)";
 }
Index: config/auto/gdbm.pl
===================================================================
--- config/auto/gdbm.pl	(revision 8170)
+++ config/auto/gdbm.pl	(working copy)
@@ -25,6 +25,7 @@
 sub runstep {
     my ($verbose) = @_;
 
+    my $cc        = Configure::Data->get('cc');
     my $libs      = Configure::Data->get('libs');
     my $linkflags = Configure::Data->get('linkflags');
     my $ccflags   = Configure::Data->get('ccflags');
@@ -48,7 +49,11 @@
 
     cc_gen('config/auto/gdbm/gdbm.in');
     if ($^O =~ /mswin32/i) {
-        eval { cc_build('', 'gdbm.lib'); };
+        if ($cc =~ /^gcc/i) {
+            eval { cc_build('', '-llibgdbm'); };
+        } else {
+            eval { cc_build('', 'gdbm.lib'); };
+        }
     } else { 
         eval { cc_build('', '-lgdbm'); };
     }
