Installation help for the GCC front-end for the PL/I programming language.
GCC PL/I is released under the terms of GNU Public License; Version 2.
** IMPORTANT NOTE ** The installation notes has changed significantly to previous versions, please re-read carefully.
Thank you very much for trying out the PL/I front end. Please drop a note to the project, and let us know how it goes. Any feedback is good feedback.
Since the GCC PL/I is not yet part of mainline GCC, there are some manual steps you have to perform before you can use the GCC PL/I compiler.
If you are using Cygwin under Windows, please follow the instructions in the file INSTALL.cygwin.
First you need the source code for the GCC compiler itself. If you do not already have the sourcecode installed you will have to download it.
This is how we did it; you can probably come up with another way.
Get latest working version of the gcc-core-4.0-2005mmdd weekly snapshot and the latest version of the pl1gcc-0.0.x archive file, from http://pl1gcc.sourceforge.net
Note: The snapshot of gcc downloaded from the pl1gcc project is known to work with pl1gcc. If you try another snapshot from the GCC project, please let us know if it works or not.
GCC recommends to separate the source directories from the build directories, so create a direcory to hold the unpacked source code.
cd mkdir gcc-src
Unpack the downloaded gcc-core-4.0-2005mmdd snapshot into your directory for gcc source, assuming the downloaded files are stored in /download, this will unpack the gcc compiler file: cd /gcc-src tar -xjf /download/gcc-core-4.0-2005mmdd.tar.bz2 Note: this will create a directory named /gcc-src/gcc-4.0-2005mmdd
Unpack the pl1gcc-0.0.x.zip file into your home directory, with these commands cd unzip /download/pl1gcc-0.0.x.zip
This will create the directories /pl1gcc-0.0.x/pl1
Create a link from /gcc-src/gcc-4.0-2005mmdd to your unpacked pl1 library: cd /gcc-src/gcc-4.0-2005mmdd/gcc ln -s /pl1gcc-0.0.x/pl1 pl1
Remove or rename old /gcc directory cd rm -rf /gcc mkdir gcc
Unpacking is now done, and you can start to build your downloaded compiler. This might take a while (*). Now do: cd /gcc ../gcc-src/gcc-4.0-2005mmdd/configure make
and go enjoy some of your favorite bewerages.
(*) You can speed up the compilation considerably, by disabling some of the languages you do no longer need, now you have PL/I as your favorite compiler :-) To do this edit the files /gcc-src/gcc-4.0-2005mmdd/<language>/config-lang.in, and set the variable build_by_default="no"
* * * W A R N I N G * * * Since there is no actual code generation taking place in the PL/I compiler, it does not make any sense to install the newly built compiler. Remember, if you do install the just downloaded and built gcc-4.0 snapshot, you are in fact running the most recent version of gcc. Unless you are sure this is what you want to do, it is generally not recommended to run this compiler as your default compiler.
When the compile is done, it is time to test the new PL/I compiler: cd /pl1gcc-0.0.x/pl1/tests . ./testall
This will invoke your newly created PL/I compiler for a number of tests. If a test fails, there are two files created, one each for the stderr and stdout from the compiler output.
*** Testing the compiler *** The current testsuite is mainly there to detect any regression in the scanning and parsing of the source code. If all goes well, you should see this list on your screen: me@home: /pl1gcc-0.0.10/pl1/tests> . ./testall Checking OK for ./PL1TEST.pl1 Checking OK for ./PL1_TEST_001.pl1 Checking OK for ./PL1_TEST_ASSIGNMENT.pl1 Checking OK for ./PL1_TEST_CONDITIONS.pl1 Checking OK for ./PL1_TEST_CONSTANTS.pl1 Checking OK for ./PL1_TEST_DCL.pl1 Checking OK for ./PL1_TEST_DEFAULT.pl1 Checking OK for ./PL1_TEST_DO.pl1 Checking OK for ./PL1_TEST_IF.pl1 Checking OK for ./PL1_TEST_IO.pl1 Checking OK for ./PL1_TEST_KEYWORDS.pl1 Checking OK for ./PL1_TEST_LABEL.pl1 Checking OK for ./PL1_TEST_SCOPE.pl1 Checking OK for ./PL1_TEST_SELECT.pl1 Checking OK for ./PL1_TEST_STORAGE.pl1
Please try pl1gcc out on some of your own samples, and let us know how it goes. If you ensure the filename ends with '.pl1', the test script will include your file next time you run it. Alternatively you can use the script ./testone, to invoke the compiler for just one file, example cd /pl1gcc-0.0.x/pl1/tests . ./testone my-very-own-pl1file.pl1
If your pl1 test files need to include some files, please place them in the /pl1gcc-0.0.x/pl1/tests/include directory. If you use extensions on the include file on the file system but not on the for example: "-isuffic.incl.pl1" If you want to put your includes in another library, your will have to edit the testone bash script to use your include directories. Further if you plan to compile a large number of files, you can benefit from editing the ./testone script, and set the TEMPPATH variable to a ramdisk.
Finally, if you know of a PL/I project you would like to see supported by the pl1gcc effort, please do get in touch with us.
http://pl1gcc.sourceforge.net
mailto:gccpl1dude@users.sourceforge.net
Have fun
The GCC PL/I Team.