On Sat, Jan 11, 2014 at 7:05 PM, Jeffrey Kegler <
jeffreykeg...@jeffreykegler.com> wrote:

>  That's right -- environment CFLAGS should be honored by Libmarpa -- but
> not by XS and Module::Build!.
>
> The difference is tradition and practice.  GNU autoconf goes to a lot of
> trouble to honor the environment CFLAGS.  The tradition in Perl builds,
> however, is the opposite, I believe.  This means that if you are building
> Libmarpa via the normal install, CFLAGS will *not* be honored.  But if you
> build separately, they should be.
>
> If in a separate Libmarpa build, environment CFLAGS are not being honored,
> I will treat it as a bug and follow up.
>
This can be fixed by adding, e.g. --libmarpa-cflags and --xs-cflags to
Build script to be accessed via Module::Build's
args()<http://search.cpan.org/~leont/Module-Build-0.4204/lib/Module/Build/API.pod#METHODS>,
which I'd volunteer to do.


>
>
> -- jeffrey
>
>  On 01/11/2014 05:24 AM, Durand Jean-Damien wrote:
>
> A priori environment variable $CFLAGS should be honored.
> To be confirmed, though - I am not in front of this part of code right now
> -;
>
> Le samedi 11 janvier 2014 14:13:13 UTC+1, rns a écrit :
>>
>>  On Sat, Jan 11, 2014 at 2:34 PM, Durand Jean-Damien <
>> jeandami...@gmail.com> wrote:
>>
>>> Excellent.
>>>
>> I was thinking of adding options to Build script to enable others to do
>> warnings squashing, e.g.
>>
>>  --libmarpa-cflags
>>  --xs-cflags
>>
>>  to pass Wall, Za, Wp64 and possibly other flags to C compiler.
>>
>>  Makes sense, for reproducibiltiy? Perhaps somebody (e.g. me :) ) would
>> like to do some warnings squashing.
>>
>>  My module::build config::autoconf skills are sparse, so is this a
>> proper way to do such things with it? If not, what is?
>>
>>
>>>  Jeffrey, look to "possible loss of data" in the log.
>>>
>>>  A priori:
>>>
>>>  c:\.cpan\build\Marpa-R2-2.079_008\libmarpa_build\marpa_obs.h(121) :
>>> warning C4244: 'initializing' : conversion from '__w64 int' to 'const int',
>>> possible loss of data
>>> marpa_avl.c(114) : warning C4244: '=' : conversion from 'int' to
>>> 'unsigned char', possible loss of data
>>> c:\.cpan\build\Marpa-R2-2.079_008\libmarpa_build\marpa_obs.h(121) :
>>> warning C4244: 'initializing' : conversion from '__w64 int' to 'const int',
>>> possible loss of data
>>> marpa.w(5014) : warning C4244: '=' : conversion from '__w64 int' to
>>> 'int', possible loss of data
>>> marpa.w(5023) : warning C4244: '=' : conversion from '__w64 int' to
>>> 'int', possible loss of data
>>> marpa.w(5872) : warning C4244: '=' : conversion from '__w64 int' to
>>> 'Marpa_AHFA_Item_ID', possible loss of data
>>> marpa.w(5888) : warning C4244: '=' : conversion from '__w64 int' to
>>> 'Marpa_AHFA_State_ID', possible loss of data
>>> marpa.w(6060) : warning C4244: '=' : conversion from '__w64 int' to
>>> 'Marpa_AHFA_State_ID', possible loss of data
>>> marpa.w(5059) : warning C4244: 'return' : conversion from '__w64 int' to
>>> 'int', possible loss of data
>>> marpa.w(5416) : warning C4244: 'return' : conversion from '__w64 int' to
>>> 'Marpa_AHFA_Item_ID', possible loss of data
>>> marpa.w(6399) : warning C4244: '=' : conversion from '__w64 int' to
>>> 'Marpa_AHFA_State_ID', possible loss of data
>>> marpa.w(9326) : warning C4244: '=' : conversion from '__w64 int' to
>>> 'int', possible loss of data
>>> marpa.w(12512) : warning C4267: 'return' : conversion from 'size_t' to
>>> 'int', possible loss of data
>>> marpa.w(13306) : warning C4244: 'initializing' : conversion from '__w64
>>> int' to 'int', possible loss of data
>>> marpa.w(14886) : warning C4267: 'function' : conversion from 'size_t' to
>>> 'int', possible loss of data
>>> marpa.w(15350) : warning C4267: 'function' : conversion from 'size_t' to
>>> 'int', possible loss of data
>>> c:\.cpan\build\Marpa-R2-2.079_008\libmarpa_build\marpa_obs.h(121) :
>>> warning C4244: 'initializing' : conversion from '__w64 int' to 'const int',
>>> possible loss of data
>>> marpa_tavl.c(150) : warning C4244: '=' : conversion from 'int' to
>>> 'unsigned char', possible loss of data
>>> c:\perl-5.18.1\lib\CORE\inline.h(147) : warning C4244: 'return' :
>>> conversion from 'int' to 'char', possible loss of data
>>> c:\perl-5.18.1\lib\CORE\inline.h(155) : warning C4244: 'return' :
>>> conversion from 'int' to 'char', possible loss of data
>>>
>>>  Thanks / JD.
>>>
>>> Le samedi 11 janvier 2014 13:26:14 UTC+1, rns a écrit :
>>>>
>>>>   On Sat, Jan 11, 2014 at 2:12 PM, Durand Jean-Damien <
>>>> jeandami...@gmail.com> wrote:
>>>>
>>>>>  I am not in front of a Windows right now, but I know MSVC is very
>>>>> good also at finding 64bits portability 
>>>>> issues<http://msdn.microsoft.com/en-us/library/yt4xw8fh.aspx>.
>>>>> /Wp64 or /W4 option, would you mind to add it ?
>>>>>
>>>> Sure, log attached.
>>>>
>>>>    Thanks / JD.
>>>>>
>>>>> Le samedi 11 janvier 2014 12:58:31 UTC+1, rns a écrit :
>>>>>
>>>>>> Under winxp sp3 as part of Marpa::R2's install. /Wall is -Wall in a
>>>>>> happier world of gcc :) and /Za is a rough [1] equivalent of -ansi
>>>>>> -pedantic.
>>>>>>
>>>>>>  Log file attached, perhaps some warnings can be useful.
>>>>>>
>>>>>>  That's because libmarpa uses no MS-specific code, as MS system
>>>>>> headers are known to not compile with /Za [2], [3] and AFAIK, XS code
>>>>>> doesn't compile with /Za unless (possibly) windows.h is isolated in a 
>>>>>> file
>>>>>> with this option disabled.
>>>>>>
>>>>>>  [1] "GCC can be a lot more pedantic than VStudio" -- and vice
>>>>>> versa. They're pedantic about different things.
>>>>>> — http://stackoverflow.com/questions/2292701/what-visual-c-set
>>>>>> ting-option-flag-is-the-counterpart-of-ansi-pedantic-in-g
>>>>>>
>>>>>>  [2] http://stackoverflow.com/questions/5489326/za-compiler-direc
>>>>>> tive-does-not-compile-system-headers-in-vs2010
>>>>>>
>>>>>>  [3] http://connect.microsoft.com/VisualStudio/feedback/details/7
>>>>>> 80509/including-windows-h-and-compiling-with-za-disable-lang
>>>>>> uage-extensions
>>>>>>
>>>>>     --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "marpa parser" group.
>>>>>  To unsubscribe from this group and stop receiving emails from it,
>>>>> send an email to marpa-parser...@googlegroups.com.
>>>>>
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>
>>>>     --
>>> You received this message because you are subscribed to the Google
>>> Groups "marpa parser" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to marpa-parser...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>    --
> You received this message because you are subscribed to the Google Groups
> "marpa parser" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to marpa-parser+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "marpa parser" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to marpa-parser+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to