User:Wxwisiasdf/Compile GCCMVS under MVS3.8j: Difference between revisions
mNo edit summary |
m (Bot: Replace deprecated source tag with syntaxhighlight) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
== Preparation == |
== Preparation == |
||
Create a folder called `gccmvs`, this is where `pdos` and `gcc` folders should reside (see below). |
|||
Download custom.zip from PDOS.org: |
Download custom.zip from PDOS.org: |
||
* http://www.pdos.org/custom.zip |
* http://www.pdos.org/custom.zip |
||
Extract gcc-stage-*.zip (* = any version, 320, 270, etc); the extraction should yield a folder named `gcc` (do not extract and make directory!) |
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: |
Download PDOS and put it on your `gccmvs/` folder, so that the pdos/pdpclib can be accessed via gccmvs/pdos/pdpclib: |
||
* https://sourceforge.net/p/pdos/gitcode/ci/master/tree/s370/ |
* https://sourceforge.net/p/pdos/gitcode/ci/master/tree/s370/ |
||
Now your `gccmvs` folder should look roughly like this: |
|||
<syntaxhighlight lang="asm"> |
|||
gccmvs/ |
|||
pdos/ |
|||
pdpclib/ |
|||
allmvs.bat |
|||
... |
|||
src/ |
|||
... |
|||
gcc/ |
|||
gcc/ |
|||
allmvs.bat |
|||
... |
|||
... |
|||
</syntaxhighlight> |
|||
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 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)). |
||
Line 23: | Line 43: | ||
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. |
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. |
||
* https://archive.org/details/mvs380-2_0 |
* https://archive.org/details/mvs380-2_0 |
||
'''Note:''' [https://technologydribble.info/2008/09/18/url-to-file/ 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. |
Now, you have code, which is mostly known to be useless if not compiled - so let's get into that. |
||
Line 28: | Line 50: | ||
== Building == |
== Building == |
||
Open a command prompt in your root directory where you extracted `pdos` and `gcc`. Type in the following: |
Open a command prompt in your root directory where you extracted `pdos` and `gcc`. Type in the following: |
||
< |
<syntaxhighlight lang="bash"> |
||
cd gcc/gcc |
cd gcc/gcc |
||
allmvs.bat |
allmvs.bat |
||
</syntaxhighlight> |
|||
</source> |
|||
You now patiently wait until everything finishes. |
You now patiently wait until everything finishes. |
||
Line 40: | Line 62: | ||
You must use Hercules/380, you can't use normal Hercules. |
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 == |
|||
⚫ |
Latest revision as of 06:51, 9 June 2024
Building GCCMVS is a quite trivial task - depending on who you ask.
You need Windows/Wine for this.
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