[Perl/perl5] 3c7820: regcomp_debug.c - fixup regex engine build under -...

2023-08-01 Thread Yves Orton via perl5-changes
  Branch: refs/heads/leont/regcomp_static
  Home:   https://github.com/Perl/perl5
  Commit: 3c782000401b8b506eccf83840f3d9a31c64d8cf
  
https://github.com/Perl/perl5/commit/3c782000401b8b506eccf83840f3d9a31c64d8cf
  Author: Yves Orton 
  Date:   2023-08-01 (Tue, 01 Aug 2023)

  Changed paths:
M regcomp_debug.c

  Log Message:
  ---
  regcomp_debug.c - fixup regex engine build under -Uusedl

The regex engine is built a bit different from most of the perl
codebase. It is compiled as part of the main libperl.so, and it is
also compiled, with DEBUGGING enabled, as part of the re extension.
When perl itself is compiled with DEBUGGING enabled then the code
in the re extension and the code in libperl.so are the same.

This all works fine and dandy until you have a static build where
the re.so is linked into libperl.so, which results in duplicate
symbols being defined.

This can be handled by looking at PERL_EXT_RE_DEBUG and
DEBUGGING_RE_ONLY. The latter is only defined if PERL_EXT_RE_DEBUG
is defined and DEBUGGING is NOT defined when ext/re/re_top.h is
compiled:

#if defined(PERL_EXT_RE_DEBUG) && !defined(DEBUGGING)
#  define DEBUGGING
#  define DEBUGGING_RE_ONLY
#endif

This logic ensures that when the re extension is compiled DEBUGGING is
on, and the extra symbol DEBUGGING_RE_ONLY is only defined if it was
defined by re_top.h. If it was on before re_top.h was compiled then
DEBUGGING_RE_ONLY is not defined.

This allows us to tell apart the case where libperl.so already contains
symbols that normally would only be compiled into the re extension.

This patch moves some code around so that static functions in
regcomp_debug.c are compiled regardless, but that non-static functions
are compiled only once.


  Commit: 57f83a339e7fe45c287fb95e4a15d42ce98c5471
  
https://github.com/Perl/perl5/commit/57f83a339e7fe45c287fb95e4a15d42ce98c5471
  Author: Yves Orton 
  Date:   2023-08-01 (Tue, 01 Aug 2023)

  Changed paths:
M regexec.c

  Log Message:
  ---
  regexec.c - only compile debugging code once under -Uusedl

The regex engine is built a bit different from most of the perl
codebase. It is compiled as part of the main libperl.so, and it is
also compiled, with DEBUGGING enabled, as part of the re extension.
When perl itself is compiled with DEBUGGING enabled then the code
in the re extension and the code in libperl.so are the same.

This all works fine and dandy until you have a static build where
the re.so is linked into libperl.so, which results in duplicate
symbols being defined.

This can be handled by looking at PERL_EXT_RE_DEBUG and
DEBUGGING_RE_ONLY. The latter is only defined if PERL_EXT_RE_DEBUG
is defined and DEBUGGING is NOT defined when ext/re/re_top.h is
compiled:

#if defined(PERL_EXT_RE_DEBUG) && !defined(DEBUGGING)
#  define DEBUGGING
#  define DEBUGGING_RE_ONLY
#endif

This logic ensures that when the re extension is compiled DEBUGGING is
on, and the extra symbol DEBUGGING_RE_ONLY is only defined if it was
defined by re_top.h. If it was on before re_top.h was compiled then
DEBUGGING_RE_ONLY is not defined.

This allows us to tell apart the case where libperl.so already contains
symbols that normally would only be compiled into the re extension.

We use this to ensure that Perl_re_exec_indentf() is only compiled once.


Compare: https://github.com/Perl/perl5/compare/75ca7065276b...57f83a339e7f


[Perl/perl5] d7788d: Fix goto tests for static perls

2023-08-01 Thread Leon Timmermans via perl5-changes
  Branch: refs/heads/leont/regcomp_static
  Home:   https://github.com/Perl/perl5
  Commit: d7788dda7bccaef96aa03ab4ad5378431db80c8d
  
https://github.com/Perl/perl5/commit/d7788dda7bccaef96aa03ab4ad5378431db80c8d
  Author: Leon Timmermans 
  Date:   2023-08-01 (Tue, 01 Aug 2023)

  Changed paths:
M t/op/goto.t

  Log Message:
  ---
  Fix goto tests for static perls


  Commit: 35b0cd250c3c44c1fcd3c38eff8b84a23fbef34f
  
https://github.com/Perl/perl5/commit/35b0cd250c3c44c1fcd3c38eff8b84a23fbef34f
  Author: Leon Timmermans 
  Date:   2023-08-01 (Tue, 01 Aug 2023)

  Changed paths:
M t/porting/test_testlist.t

  Log Message:
  ---
  Fix testlist tests for static perls


  Commit: 75ca7065276baca323e488fee0cac34c12ef2d3a
  
https://github.com/Perl/perl5/commit/75ca7065276baca323e488fee0cac34c12ef2d3a
  Author: Leon Timmermans 
  Date:   2023-08-01 (Tue, 01 Aug 2023)

  Changed paths:
M regcomp.c
M regcomp_invlist.c

  Log Message:
  ---
  Deduplicate various re functions in ext/re


Compare: https://github.com/Perl/perl5/compare/d7788dda7bcc%5E...75ca7065276b