develooper Front page | perl.perl5.porters | Postings from December 2016

[perl #130046] Bleadperl v5.25.6-90-g3619505 breaksSMUELLER/XS-TCC-0.04.tar.gz

Thread Previous | Thread Next
James E Keenan via RT
December 26, 2016 13:07
[perl #130046] Bleadperl v5.25.6-90-g3619505 breaksSMUELLER/XS-TCC-0.04.tar.gz
Message ID:
On Mon, 26 Dec 2016 02:55:19 GMT, run4flat wrote:
> Hello James,
> Quick answer: in this case it's probably easiest for Steffen to just
> #define __builtin_expect in his xs files.
> Long answer: This is an error thrown by the Tiny C Compiler as it
> tries to
> compile the Perl header files using a configuration generated assuming
> gcc.
> I have worked a lot trying to get the Tiny C Compiler to interface
> nicely
> with Perl, though my efforts have been directed at C::Blocks. There
> are two
> interleaved problems here. First, gcc was used at the configure stage
> when
> building Perl, and at that time some compiler-specific switches get
> turned
> on. Second, tcc is so similar to tcc that it is not worth the effort
> of
> re-running or emulating a configure script when setting up modules
> like
> XS::TCC. It is easier to just borrow settings from with a
> couple
> of manual modifications.
> Two gccisms that Perl uses (if configure indicates that it can)
> include
> __builtin_expect and brace groups. With C::Blocks, I have worked
> around
> __builtin_expect by tweaking my fork of tcc (though a preprocessor
> macro
> should also fix it). I have fixed issues with brace groups by
> scrubbing
> -DDEBUGGING and -DDEBIAN from the compiler arguments. (Presumably
> adding
> -DPERL_GCC_BRACE_GROUPS_FORBIDDEN should fix this issue, but it did
> not
> work for me.) See
> Blocks/blob/master/lib/C/Blocks/PerlAPI.xs.PL#L80
> I hope that provides enough context for the situation. It would be
> very
> nice if ExtUtils;:Embed or some other tool could generate a Perl
> configuration consistent with the currently compiled perl that does
> not
> include the gcc-isms, but that is a wishlist item, not a bug. I would
> say
> this is an issue with XS::TCC.
> @Stephen, if you like, I can try to look into this and figure out a
> pull
> request for XS::TCC. If you know exactly where this needs to get
> fixed, it
> may be faster for you to do it.
> I hope that helps!
> David

Thanks, David.  On the basis of your explanation, there is no bug in perl.  So I'm closing this ticket.

James E Keenan (

via perlbug:  queue: perl5 status: open

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About