Hi,
As following instructions at: http://www2.gnu-pascal.de/gpc/Compiling-GPC.html#Compiling-GPC
In terms of creating symlink to unpackaged "p" and so forth, and the configure line with --enable-languages=pascal, when I then do the "make" I get the following errors at the end:
p/declarations.c: In function `mark_binding_level': p/declarations.c:1587: `shared_decl_lang_specific' undeclared (first use in this function) p/declarations.c:1587: (Each undeclared identifier is reported only once p/declarations.c:1587: for each function it appears in.) make[1]: *** [p/declarations.o] Error 1 make[1]: Leaving directory `/home/apseyed/software/gcc-3.2.3/gcc' make: *** [all-gcc] Error 2
Any help appreciated. This is a system based on RHEL 3. I tried the gpc rpm binary that runs on rh 6 and received the error: ld: cannot open crtbegin.o: No such file or directory
Thanks,
Patrice Seyed Linux System Administrator - LinGA RHCE, SCSA Boston University Medical Campus
Hi,
As following instructions at: http://www2.gnu-pascal.de/gpc/Compiling-GPC.html#Compiling-GPC
In terms of creating symlink to unpackaged "p" and so forth, and the configure line with --enable-languages=pascal, when I then do the "make" I get the following errors at the end:
p/declarations.c: In function `mark_binding_level': p/declarations.c:1587: `shared_decl_lang_specific' undeclared (first use in this function) p/declarations.c:1587: (Each undeclared identifier is reported only once p/declarations.c:1587: for each function it appears in.) make[1]: *** [p/declarations.o] Error 1 make[1]: Leaving directory `/home/apseyed/software/gcc-3.2.3/gcc'
^^^^^^^^^
To build using gcc-3.2.3 as a backend you need extra patch:
diff -u p.orig/declarations.c p/declarations.c --- p.orig/declarations.c Thu Mar 31 20:04:18 2005 +++ p/declarations.c Fri Apr 1 20:53:30 2005 @@ -312,7 +312,7 @@ void pushlevel (int transparent) { -#ifndef GCC_3_3 +#ifndef EGCS97 struct binding_level *newlevel = (struct binding_level *) xmalloc (sizeof (*newlevel)); #else struct binding_level *newlevel = (struct binding_level *) ggc_alloc (sizeof (*newlevel)); @@ -328,7 +328,7 @@ } else { -#ifndef GCC_3_3 +#ifndef EGCS97 newlevel->shared_decl_lang_specific = (struct lang_decl *) xmalloc (sizeof (*(newlevel->shared_decl_lang_specific))); #else newlevel->shared_decl_lang_specific = (struct lang_decl *) ggc_alloc (sizeof (*(newlevel->shared_decl_lang_specific))); @@ -455,7 +455,7 @@ else if (level->blocks) current_binding_level->blocks = chainon (current_binding_level->blocks, level->blocks);
-#ifndef GCC_3_3 +#ifndef EGCS97 free (level); #endif
@@ -1584,7 +1584,8 @@ ggc_mark_tree (level->shadowed); ggc_mark_tree (level->blocks); ggc_mark_tree (level->this_block); - ggc_mark (shared_decl_lang_specific); + ggc_mark (level->shared_decl_lang_specific); + ggc_mark (level); } } #endif diff -u p.orig/gbe.h p/gbe.h --- p.orig/gbe.h Fri Mar 25 21:53:14 2005 +++ p/gbe.h Fri Apr 1 15:42:18 2005 @@ -162,6 +162,9 @@ extern void (*print_error_function) (const char *); extern PTR alloca (size_t); extern tree void_list_node; +#endif + +#ifndef GCC_3_3 #define copy_decl_lang_specific copy_lang_decl #endif
diff -u p.orig/lang.c p/lang.c --- p.orig/lang.c Thu Mar 31 19:52:05 2005 +++ p/lang.c Sat Apr 2 02:50:02 2005 @@ -1232,7 +1234,7 @@ #else
void -lang_mark_tree (int t) +lang_mark_tree (tree t) { if (TREE_CODE (t) == IDENTIFIER_NODE) {