[Info-vax] GCC for VMS, was: Re: fortran compiler roadmap?
Simon Clubley
clubley at remove_me.eisner.decus.org-Earth.UFP
Sat Apr 20 04:42:01 EDT 2013
On 2013-04-17, Craig A. Berry <craigberry at mac.com.invalid> wrote:
>
> I was recently told by someone from Ada Core that GCC for VMS can be
> built more or less straightforwardly by doing something called a
> "Canadian cross compile." This is how they build their Ada compiler,
> and he was pretty sure they'd contributed back upstream anything needed
> to build GCC targeting VMS.
>
> I asked specifically whether the code generators in GCC were up to
> snuff for Alpha and Itanium, and he said yes; their Ada compiler
> depends on this. (The last version of gcc for VMS I'd heard of
> existing in the wild [2.9 or so] purportedly never had an Alpha code
> generator that actually worked.)
>
> I also asked specifically whether the resulting C compiler could be
> used with the CRTL and he said yes, but you'd have to point the
> compiler build at the headers you already have, which means you'd have
> to already have rights to use the HP C compiler. I remain skeptical
> whether GNU C could even compile those headers given all of the
> pragmas, specific alignment requirements, etc., but I suppose it's
> possible.
>
Actually ACT may already be using the native VMS headers when building
gcc.
When building gcc as a cross compiler[*], you have to supply a support
infrastructure for gcc to use. In the cross compilers I build, that's
either newlib or (for the AVR) avr-libc.
I had a quick look at a recent newlib kit last night, but I didn't see
any obvious signs of VMS support so ACT don't appear to be using newlib
so unless they are using another C support environment, they probably
have imported the VMS headers from a VMS box into their Linux build
environment.
However, as you say, there's a lot of DEC C specific stuff in those
headers (at least the last time I checked) so I don't know if they
have a conversion script or if they can use the headers directly.
[*] The typical build sequence for a gcc cross compiler is to start
with a native binutils and gcc. You then build a cross binutils and
then a cross gcc and newlib.
For a normal Linux hosted cross compiler, you are then done.
However, for this configuration of creating gcc/binutils binaries
under Linux to run on VMS, you would typically then use this Linux
resident cross compiler to build binutils and gcc again, but this
time specifying VMS as the host.
The missing bit is what do you use for the C support environment
in this case if newlib does not have any VMS support ? That's why
I suspect they may already be using the existing VMS headers in
some form.
Simon.
--
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world
More information about the Info-vax
mailing list