This change would require a revision bump for all Perl XS ports
Otherwise loading the .so module fails.

$ perl -MNet::SSLeay                              
SSLeay.c: loadable library and perl binaries are mismatched (got handshake key 
0xec00000, needed 0xf000000)

On Fri, Jan 21, 2022 at 02:12:25PM +0100, Alexander Bluhm wrote:
> Hi,
> 
> Since clang 13 each Perl or Perl XS module compile spits out a lot
> of -Wcompound-token-split-by-macro warnings.  E.g. p5-Net-SSLeay
> produces 3882 warnings generated.  You cannot spot anything useful.
> The problem is burried deeply in the Perl macros and copied to
> everywhere.
> 
> If we compile Perl with -Wno-compound-token-split-by-macro it gets
> stored in Config.pm and is used for most modules.
> 
> $ perl -MConfig -e 'print $Config{ccflags},"\n"'
> -Wno-compound-token-split-by-macro -fno-strict-aliasing 
> -fno-delete-null-pointer-checks -pipe -fstack-protector-strong 
> -I/usr/local/include
> 
> ok?
> 
> bluhm
> 
> Index: gnu/usr.bin/perl/Makefile.bsd-wrapper
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/src/gnu/usr.bin/perl/Makefile.bsd-wrapper,v
> retrieving revision 1.111
> diff -u -p -r1.111 Makefile.bsd-wrapper
> --- gnu/usr.bin/perl/Makefile.bsd-wrapper     1 Jul 2020 00:08:06 -0000       
> 1.111
> +++ gnu/usr.bin/perl/Makefile.bsd-wrapper     21 Jan 2022 12:39:15 -0000
> @@ -3,10 +3,16 @@
>  # Build wrapper for Perl
>  #
>  
> +.include <bsd.own.mk>
> +
>  CONFIGURE_ARGS=      -dse -Dopenbsd_distribution=defined
>  
>  .if !exists(${.OBJDIR}/config.over)
>  CONFIGURE_ARGS+= -Dmksymlinks
> +.endif
> +
> +.if ${COMPILER_VERSION:L} == "clang"
> +CONFIGURE_ARGS+= -Dccflags=-Wno-compound-token-split-by-macro
>  .endif
>  
>  .MAIN: all

Reply via email to