Index: lib/Parrot/Test.pm
===================================================================
--- lib/Parrot/Test.pm  (revision 20652)
+++ lib/Parrot/Test.pm  (revision 20653)
@@ -999,7 +999,7 @@
                     = $PConfig{parrot_is_shared}
                         ? "$PConfig{rpath_blib} -L$PConfig{blib_dir} "
                             . ( $^O =~ m/MSWin32/
-                                ? "libparrot.lib"
+                                ? $PConfig{libparrot_ldflags}
                                 : "-lparrot" )
                         : File::Spec->join( $PConfig{blib_dir},
$PConfig{libparrot_static} );
                 my $cmd =


on windows, with msvc, in Parrot::Configure::Generated, we have:
             'libparrot_ldflags' => 'libparrot$(A)',

but A isn't defined in the windows environment at parrot runtime, and
$(A) wouldn't expand it anyway, as that's make syntax (you'd need %A%
for windows shell expansion, which is $A in unix-speak.)

so i end up with failures like:
t\src\atomic......# 'link -nologo -nodefaultlib -debug
-machine:x86 -debug t\src\atomic_1.obj src\parrot_config.obj
-out:t\src\atomic_1.exe  -Lblib\lib libparrot$(A)  kernel32.lib
ws2_32.lib msvcrt.lib oldnames.lib' failed with exit code 80
# Failed to build 't\src\atomic_1.exe': LINK : warning LNK4044:
unrecognized option '/Lblib\lib'; ignored
# LINK : fatal error LNK1104: cannot open file 'libparrot$(A).obj'

the workaround i hacked in is hardcoding 'libparrot.lib' for win32,
because there's no way for me to get 'libparrot.lib' out of
Parrot::Config. perhaps instead there should be a method to return a
value with all $(FOO) syntax resolved by lookup first in
Parrot::Config and then %ENV. that would provide a way to get the
needed values, without modifying the generation of
Parrot::Config::Generated.

thoughts?
~jerry

Reply via email to