diff options
author | Craig A. Berry <craigberry@mac.com> | 2022-10-17 20:05:13 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2022-10-18 16:51:03 -0500 |
commit | 86afe6b06de7f1c961f08890ea7dad6c1acbb0d8 (patch) | |
tree | 821c26e4a29c9ed559cfbba0fea89177d29e4e8b /vms | |
parent | cbe0d257f1da7358d391918e27708774c141ad21 (diff) | |
download | perl-86afe6b06de7f1c961f08890ea7dad6c1acbb0d8.tar.gz |
Remove ancient and broken GCC for VMS support
There has not been a viable GCC for VMS in a couple of decades and
the hacks and workarounds that were necessary then are unlikely to
be helpful for any future work. Reportedly significant portions of
the GCC toolchain were available in GNAT Ada, but there was never
an independent release of the C compiler and that support has now
been removed as well.
Cleaning this up should make it easier to add alternate compiler
support in the future, such as for the clang port in progress at
VSI.
Diffstat (limited to 'vms')
-rw-r--r-- | vms/descrip_mms.template | 17 | ||||
-rw-r--r-- | vms/gen_shrfls.pl | 30 | ||||
-rw-r--r-- | vms/vmsish.h | 4 |
3 files changed, 7 insertions, 44 deletions
diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index d9426b4153..951c842c0d 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -23,7 +23,6 @@ ~DECC~ ~DECCXX~ -~GNUC~ ~ARCH-TYPE~ = 1 ~THREAD~ ~SOCKET~ @@ -86,21 +85,6 @@ ARCHCORE = [.lib.$(ARCHNAME).$(PERL_VERSION).CORE] ARCHAUTO = [.lib.$(ARCHNAME).$(PERL_VERSION).auto] #: >>>>>Compiler-specific options <<<<< -.ifdef GNUC -.first - @ If F$TrnLnm("Sys").eqs."" Then Define/NoLog SYS GNU_CC_Include:[VMS] -CC = gcc -# -fno-builtin avoids bug in gcc up to version 2.6.2 which can destroy -# data when memcpy() is called on large (>64 kB) blocks of memory -# (fixed in gcc 2.6.3) -XTRACCFLAGS = /Obj=$(MMS$TARGET_NAME)$(O)/NoCase_Hack/Optimize=2 -DBGSPECFLAGS = -XTRADEF = -XTRAOBJS = -LIBS1 = GNU_CC:[000000]GCCLIB.OLB/Library -LIBS2 = Sys$Share:VAXCRTL/Shareable -POSIX = -.else XTRAOBJS = LIBS1 = $(XTRAOBJS) DBGSPECFLAGS = /Show=(expansion,include)/machine @@ -125,7 +109,6 @@ XTRACCFLAGS = /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=$(OBJVAL) .endif XTRADEF = POSIX = POSIX -.endif #: >>>>> Configuration options <<<<< #: __DEBUG__: builds images with full VMS debugger support diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl index 7b9f606194..660da1dbed 100644 --- a/vms/gen_shrfls.pl +++ b/vms/gen_shrfls.pl @@ -56,8 +56,8 @@ my $docc = ($cc_cmd !~ /^~~/); print "\$docc = $docc\n" if $debug; 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 ); + $debugging_enabled, $hide_mymalloc, $use_perlio, $dir ) + = ( 0, 0, 0, 0, 0, 0, 0 ); if (-f 'perl.h') { $dir = '[]'; } elsif (-f '[-]perl.h') { $dir = '[-]'; } @@ -73,7 +73,6 @@ while(<CONFIG>) { $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='[^']/; $use_perlio++ if /useperlio='(define|yes|true|t|y|1)'/i; } close CONFIG; @@ -89,10 +88,6 @@ if (my ($prefix,$defines,$suffix) = } print "Filtered \$cc_cmd: \\$cc_cmd\\\n" if $debug; -# check for gcc - if present, we'll need to use MACRO hack to -# define global symbols for shared variables - -print "\$isgcc: $isgcc\n" if $debug; print "\$debugging_enabled: $debugging_enabled\n" if $debug; my $objsuffix = shift @ARGV; @@ -127,7 +122,6 @@ while (my $line = <$makedefs>) { } } -if ($debugging_enabled and $isgcc) { $vars{'colors'}++ } foreach (split /\s+/, $extnames) { my($pkgname) = $_; $pkgname =~ s/::/__/g; @@ -142,9 +136,8 @@ my $marord = 1; open(OPTBLD,'>', "${dir}${dbgprefix}perlshr_bld.opt") or die "$0: Can't write to ${dir}${dbgprefix}perlshr_bld.opt: $!\n"; -unless ($isgcc) { - print OPTBLD "PSECT_ATTR=LIB\$INITIALIZE,GBL,NOEXE,NOWRT,NOSHR,LONG\n"; -} + +print OPTBLD "PSECT_ATTR=LIB\$INITIALIZE,GBL,NOEXE,NOWRT,NOSHR,LONG\n"; print OPTBLD "case_sensitive=yes\n" if $care_about_case; my $count = 0; foreach my $var (sort (keys %vars)) { @@ -157,19 +150,8 @@ foreach my $func (sort keys %fcns) { open(OPTATTR, '>', "${dir}perlshr_attr.opt") or die "$0: Can't write to ${dir}perlshr_attr.opt: $!\n"; -if ($isgcc) { -# TODO -- lost ability to distinguish constant vars from others when -# we switched to using makedef.pl for input. -# foreach my $var (sort keys %cvars) { -# print OPTATTR "PSECT_ATTR=${var},PIC,OVR,RD,NOEXE,NOWRT,SHR\n"; -# } - foreach my $var (sort keys %vars) { - print OPTATTR "PSECT_ATTR=${var},PIC,OVR,RD,NOEXE,WRT,NOSHR\n"; - } -} -else { - print OPTATTR "! No additional linker directives are needed when using DECC\n"; -} + +print OPTATTR "! No additional linker directives are needed when using DECC\n"; close OPTATTR; my $incstr = 'perl,globals'; diff --git a/vms/vmsish.h b/vms/vmsish.h index 3e5dea7fa0..c22b2a009e 100644 --- a/vms/vmsish.h +++ b/vms/vmsish.h @@ -46,9 +46,7 @@ #include <unixio.h> #include <unixlib.h> #include <file.h> /* it's not <sys/file.h>, so don't use I_SYS_FILE */ -#if (defined(__DECC) && defined(__DECC_VER) && __DECC_VER > 20000000) || defined(__DECCXX) -# include <unistd.h> /* DECC has this; gcc doesn't */ -#endif +#include <unistd.h> #ifdef NO_PERL_TYPEDEFS /* a2p; we don't want Perl's special routines */ # define DONT_MASK_RTL_CALLS |