Ken Williams wrote:
Hi John,
After my last email I reworked the patch so that all the modifications
are in Platform/VMS.pm. Could you confirm that it still works for you
and I haven't broken it?
First I discovered that I had a bug in my patch to base.pm that was
causing a diagnostic to be displayed. I did not notice it until running
the tests under the harness and it flagged it.
Then when I backed out my patch and applied yours, I discovered that it
does not work.
In particular, the value of @temp_files is only filled in by
$self->_do_link after VMS.
I have fixed it locally in VMS.PM, but I do not have time to submit a
patch now.
Obviously my previous patch needs to be backed out of blead.
-John
[EMAIL PROTECTED]
Personal Opinion Only
Thanks,
-Ken
Index: lib/ExtUtils/CBuilder/Platform/VMS.pm
===================================================================
RCS file:
/Users/ken/src/CVS-repository/modules/ExtUtils-CBuilder/lib/ExtUtils/
CBuilder/Platform/VMS.pm,v
retrieving revision 1.7
diff -u -r1.7 VMS.pm
--- VMS.pm 2005/05/20 00:50:04 1.7
+++ VMS.pm 2005/09/08 12:17:04
@@ -7,11 +7,40 @@
$VERSION = '0.12';
@ISA = qw(ExtUtils::CBuilder::Base);
-sub need_prelink { 0 }
+sub need_prelink { 1 }
sub arg_include_dirs {
- my $self = shift;
- return '/include=(' . join(',', @_) . ')';
+ my ($self, @dirs) = @_;
+
+ # VMS can only have one include list, remove the one from config.
+ if ($self->{config}{ccflags} =~ s{/include=\(([^\)]*)\)} {}i) {
+ unshift @dirs, $1;
+ }
+ return unless @dirs;
+
+ return ('/include=(' . join(',', @dirs) . ')');
+}
+
+sub _do_link {
+ my ($self, $type, %args) = @_;
+
+ my $objects = delete $args{objects};
+ $objects = [$objects] unless ref $objects;
+
+ # VMS has two option files, the external symbol, and to pull in PerlShr
+ $objects->[-1] .= ',';
+ push @$objects, 'sys$disk:[]' . @temp_files[0] . '/opt,';
------------------------------------ $temp_files[0]
+ push @$objects, $self->perl_inc() . 'PerlShr.Opt/opt';
+
+ # Need to create with the same name as DynaLoader will load with.
+ if (defined &DynaLoader::mod2fname) {
+ my $out = $args{$type} || $self->$type($objects->[0]);
+ my ($dev,$dir,$file) = File::Spec->splitpath($out);
+ $file = DynaLoader::mod2fname([$file]);
+ $args{$type} = File::Spec->catpath($dev,$dir,$file);
+ }
+
+ return $self->SUPER::_do_link($type, %args, objects => $objects);
}
sub arg_nolink { return; }
===================================================================
On Sep 7, 2005, at 6:59 PM, John E. Malmberg wrote:
This patch is needed for the lib/ExtUtils/ParseXS.t/basic.t test to
pass on VMS.
In lib/ExtUtils/CBuilder/Platform/VMS.pm, VMS needs to have a
pre-link file generated.
In lib/ExtUtils/CBuilder/Base.pm:
VMS can only have one /include qualifier on the CC command, and the
last one wins, so if one is present in @ccflags, remove it.
VMS needs to have the executable named the same way that dynaloader
will look for it.
VMS needs to have two option files specified in the link, one to
indicate the exported symbols, and one to locate the PERLSHR image.