Re: [Module::Build] ExtUtils::CBuilder: cygwin gcc in mingw mode misparses command line
Status: Beta
Brought to you by:
kwilliams
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-02-27 09:50:37
|
This was a problem with a win32 build using the cygwin compiler in its
mingw cross-compilation mode.
On Sun, Feb 26, 2006 at 08:02:48PM -0600, Ken Williams wrote:
> Hi guys,
>
> How come a cygwin issue needs a patch in Windows.pm? Or is this just
> a general Windows issue with us doing the shell quoting wrong?
>
> -Ken
>
>
> On Feb 21, 2006, at 3:27 AM, Randy W. Sims wrote:
>
> >Yitzchak Scott-Thoennes wrote:
> >>Cygwin programs when run by non-cygwin programs do not interpret
> >>\" as
> >>an escaped " except within "". This results in errors like the
> >>following when using cygwin gcc in "mingw" mode:
> >>gcc -mno-cygwin -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -
> >>DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -
> >>DPERL_MSVCRT_READFIX -s -O2 -DXS_VERSION=\"0.01\" -DVERSION=\"0.01
> >>\" -I"..\..\..\lib\CORE" -I"C:\MinGW\include" -o "lib\Simple.o"
> >>"lib\Simple.c"
> >>gcc: no input files
> >>error building dll file from 'lib\Simple.c' at C:\cygwin\home
> >>\sthoenna\bleadperl\wp\lib/ExtUtils/CBuilder/Platform/Windows.pm
> >>line 143.
> >>The first backslash in -DXS_VERSION=\"0.01\" is treated as a literal
> >>backslash, and the " after it starts a quoted string, resulting in
> >>gcc
> >>getting everything after -O2 as a single argument:
> >> -DXS_VERSION=\0.01" -DVERSION="0.01" -I......libCORE -
> >>IC:MinGWinclude -o libSimple.o libSimple.c
> >>The following patch fixes this and in theory should not cause any
> >>problems.
> >
> >Thanks. I've checked this into CVS.
> >
> >Randy.
> >
> >
> >>--- lib/ExtUtils/CBuilder/Platform/Windows.pm.orig 2005-10-04
> >>04:32:20.000000000 -0700
> >>+++ lib/ExtUtils/CBuilder/Platform/Windows.pm 2006-01-09
> >>19:55:07.807132800 -0800
> >>@@ -93,7 +93,7 @@
> >> sub arg_defines {
> >> my ($self, %args) = @_;
> >> s/"/\\"/g foreach values %args;
> >>- return map "-D$_=$args{$_}", keys %args;
> >>+ return map qq{"-D$_=$args{$_}"}, keys %args;
> >> }
>
|