Sir, I downloaded the GNU latest version gpc-20030830 and followed the installation instructions given in your web site. But when I configure the GCC, it asks to do patching, as follows:
*** ./configure detected GCC version 3.2.2. *** GPC 2.1 requires one of the following versions of GCC sources to build: *** *** 2.8.1 *** 2.95.1 *** 2.95.2 *** 2.95.3-5 *** 2.95.3-6 *** 2.95.3 *** 2.95.4 *** 2.95 *** *** (You can try to patch GCC manually by typing a command like *** `patch -p1 < p/diffs/gcc-2.95.diff' and patching possible rejects *** by hand before you run `./configure' again.)
When I tried patch command it didnt work for me. How to install Patch command..? < p/diffs/gcc-2.95.diff - this file is available in my working directory (/gnu/gcc-3.2.2/gcc/) under the same path
[root@EXE-INDIA2 gcc]# patch -p1 < p/diffs/gcc-2.95.diff bash: patch: command not found So please help me how to do patching and successful configuration of GCC. Since there are many pascal types like Turbo, Borland, Standard, let know whether the HP pascal code can be successfully converted to C and get compiled in Linux using GCC. Please advice me.
Thanks and regards, B.Gayathri
B.Gayathri wrote:
When I tried patch command it didnt work for me. How to install Patch command..? < p/diffs/gcc-2.95.diff - this file is available in my working directory (/gnu/gcc-3.2.2/gcc/) under the same path
[root@EXE-INDIA2 gcc]# patch -p1 < p/diffs/gcc-2.95.diff bash: patch: command not found
You can get GNU patch at http://www.gnu.org/directory/patch.html.
(I forgot to mention it in the install instructions, will add it. Thanks for the notice.)
So please help me how to do patching and successful configuration of GCC. Since there are many pascal types like Turbo, Borland, Standard, let know whether the HP pascal code can be successfully converted to C and get compiled in Linux using GCC. Please advice me.
GPC has various options to control the dialect accepted such as `--classic-pascal', `--extended-pascal', `--borland-pascal'. By default it will accept features from all standards (with a few warnings about dangerous constructs), so for most sources no dialect option is actually required.
(BTW, GPC does not convert to C code and compile that, but compiles to assembly code directly. It shares the code generator with the C, C++ and other compilers of the GNU family.)
Frank