User:Wxwisiasdf/Compile GCCMVS under MVS3.8j

From OSDev Wiki
Jump to: navigation, search

This article is a stub! This page or section is a stub. You can help the wiki by accurately contributing to it.

Building GCCMVS is a quite trivial task - depending on who you ask.

You need Windows/Wine for this.

Contents

Preparation

Create a folder called `gccmvs`, this is where `pdos` and `gcc` folders should reside (see below).

Download custom.zip from PDOS.org:

Extract gcc-stage-*.zip (* = any version, 320, 270, etc) in the `gccmvs` folder; the extraction should yield a folder named `gcc` (do not extract and make directory!)

Download PDOS and put it on your `gccmvs/` folder, so that the pdos/pdpclib can be accessed via gccmvs/pdos/pdpclib:

Now your `gccmvs` folder should look roughly like this:

gccmvs/
    pdos/
        pdpclib/
            allmvs.bat
            ...
        src/
        ...
    gcc/
        gcc/
            allmvs.bat
            ...
        ...

PDPCLIB is required by GCCMVS to properly cross-build.

You need an emulator for this, since MVS/380 does not run under x86, it only runs on S/390. So download the Hercules/380 emulator (it implements an S/380 to allow usage of more than 16 MiB of memory, which to be realistic is pretty cool, it won't run on realiron however (but your compiled programs should do tho)).

You'll also need a program called m4 for macro processing, make sure it's in your %PATH% and that you can run it:

MVS/380 has a 2.0 release but it had a malicious file embedded on it - so I made a version without the file; the file in question was located on `utils/URL2FILE.EXE`, it seems to have gotten there purely by accident.

Note: URL2FILE.EXE might be a false positive? (better be prepared than sorry)

Now, you have code, which is mostly known to be useless if not compiled - so let's get into that.

Building

Open a command prompt in your root directory where you extracted `pdos` and `gcc`. Type in the following:

cd gcc/gcc
allmvs.bat

You now patiently wait until everything finishes.

If you see an RC=12 or **FLUSH** message from ASMA90 then you have an error - good luck with that!

I run out of memory!

You must use Hercules/380, you can't use normal Hercules.

GCC ABENDs when trying to compile itself

You have AM31 enabled, go to your mvs380 installation and comment out the line on conf/mvs380.conf where it mentions AMODE31/AMODE32

IEFCOMPR fails

TODO: someone should attempt to get gccmvs C++ frontend

Personal tools
Namespaces
Variants
Actions
Navigation
About
Toolbox