In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/5f286eeea1a6d97101ebc9f6d579ca42c99e6711?hp=474af99058f4c0fc3b80d73763da5b29c1ff8c66>
- Log ----------------------------------------------------------------- commit 5f286eeea1a6d97101ebc9f6d579ca42c99e6711 Author: Craig A. Berry <[email protected]> Date: Fri Oct 15 14:56:58 2010 -0500 Update regen targets on VMS. M vms/descrip_mms.template commit 0729becf1b30da9d73bf0cab31f9e80d8aa8fd26 Author: Craig A. Berry <[email protected]> Date: Fri Oct 15 14:38:53 2010 -0500 Band-aid to handle long API symbol on VMS. For the first time we now have a symbol longer than 31 characters in the API, not just internally or generated in xsubs. That means we have to provide the shortened name in the linker options file used to produce the shareable image, but the documentation on the CRC used to produce the short name is incomplete. For a more general solution, we may have to root through the demangler database or parse the output of CC/WARN=ENABLE=NAMESHORTENED. M vms/gen_shrfls.pl ----------------------------------------------------------------------- Summary of changes: vms/descrip_mms.template | 34 ++++++++++++++++------------------ vms/gen_shrfls.pl | 24 ++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 20 deletions(-) diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index 48ab9d9..fdd8249 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -1437,27 +1437,25 @@ $(SOCKH) : [.vms]$(SOCKH) .endif # The following files are generated automatically -# keywords.h: keywords.pl -# opcode.h: opcode.pl -# opnames.h: opcode.pl -# overload.h: overload.pl -# pp.sym: opcode.pl -# embed.h: embed.pl [* needs pp.sym generated by opcode.pl! *] -# embedvar.h: embed.pl [* needs pp.sym generated by opcode.pl! *] -# global.sym: embed.pl -# regnodes.h: regcomp.pl -# warnings.h lib/warnings.pm: warnings.pl +# embed.pl: proto.h embed.h embedvar.h global.sym +# perlapi.h perlapi.c +# [* embed.pl needs pp.sym generated by opcode.pl! *] +# keywords.pl: keywords.h +# opcode.pl: opcode.h opnames.h pp.sym +# regcomp.pl: regnodes.h +# warnings.pl: warnings.h lib/warnings.pm # The correct versions should be already supplied with the perl kit, # in case you don't have perl available. -# To force them to run, type -# MMS regen_headers +# To force them to be regenerated, run +# perl regen.pl +# with your existing copy of perl +# (make regen_headers is kept for backwards compatibility) + +regen : + $(INSTPERL) regen.pl + regen_headers : - $(INSTPERL) keywords.pl - $(INSTPERL) opcode.pl - $(INSTPERL) overload.pl - $(INSTPERL) embed.pl - $(INSTPERL) regcomp.pl - $(INSTPERL) warnings.pl + $(INSTPERL) regen.pl -v .ifdef LINK_ONLY .else diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl index c3210e0..15e6418 100644 --- a/vms/gen_shrfls.pl +++ b/vms/gen_shrfls.pl @@ -70,8 +70,8 @@ print "Input \$cc_cmd: \\$cc_cmd\\\n" if $debug; my $docc = ($cc_cmd !~ /^~~/); print "\$docc = $docc\n" if $debug; -my ( $use_threads, $use_mymalloc, $care_about_case, $debugging_enabled, - $hide_mymalloc, $isgcc, $use_perlio, $dir ) +my ( $use_threads, $use_mymalloc, $care_about_case, $shorten_symbols, + $debugging_enabled, $hide_mymalloc, $isgcc, $use_perlio, $dir ) = ( 0, 0, 0, 0, 0, 0, 0, 0 ); if ($docc) { @@ -86,6 +86,7 @@ if ($docc) { $use_threads++ if /usethreads='(define|yes|true|t|y|1)'/i; $use_mymalloc++ if /usemymalloc='(define|yes|true|t|y|1)'/i; $care_about_case++ if /d_vms_case_sensitive_symbols='(define|yes|true|t|y|1)'/i; + $shorten_symbols++ if /d_vms_shorten_long_symbols='(define|yes|true|t|y|1)'/i; $debugging_enabled++ if /usedebugging_perl='(define|yes|true|t|y|1)'/i; $hide_mymalloc++ if /embedmymalloc='(define|yes|true|t|y|1)'/i; $isgcc++ if /gccversion='[^']/; @@ -263,6 +264,25 @@ foreach (split /\s+/, $extnames) { print "Adding boot_$pkgname to \%fcns (for extension $_)\n" if $debug; } +# For symbols over 31 characters, export the shortened name. +# TODO: Make this general purpose so we can predict the shortened name the +# compiler will generate for any symbol over 31 characters in length. The +# docs to CC/NAMES=SHORTENED describe the CRC used to shorten the name, but +# don't describe its use fully enough to actually mimic what the compiler +# does. + +if ($shorten_symbols) { + if (exists $fcns{'Perl_ck_entersub_args_proto_or_list'}) { + delete $fcns{'Perl_ck_entersub_args_proto_or_list'}; + if ($care_about_case) { + $fcns{'Perl_ck_entersub_args_p11c2bjj$'}++; + } + else { + $fcns{'PERL_CK_ENTERSUB_ARGS_P3IAT616$'}++; + } + } +} + # Eventually, we'll check against existing copies here, so we can add new # symbols to an existing options file in an upwardly-compatible manner. -- Perl5 Master Repository
