This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Unable to install gcc-3.2.3 on RHEL-4 64 bit machine
ithelp@india.synfora.com wrote:
> Hi Andrew,
>
> Thank you so much for your prompt reply.
>
> I have created a directory under /picowork/ithelp/gcc-3.2.3
>
> 1) mkdir /picowork10/ithelp/gcc-3.2.3
> 2) cd /backup/ithelp/gcc-3.2.3
> 3) ./configure --prefix=/picowork10/ithelp/gcc-3.2.3/
> 4) make bootstrap
>
> and i got the same error!
It was worth a try. You're going to have to assume that libffi
really wasn't ported to 3.2 on x86_64 -- it was a long time ago.
Configuring with --enable-languages=c++ ought to fix this. However,
you may well have other problems building it.
I've appended the patch that I use to build gcc 3.2.3 on my box.
Andrew.
Index: gcc/read-rtl.c
===================================================================
--- gcc/read-rtl.c (revision 131336)
+++ gcc/read-rtl.c (working copy)
@@ -659,7 +659,7 @@
{
ungetc (c, infile);
list_counter++;
- obstack_ptr_grow (&vector_stack, (PTR) read_rtx (infile));
+ obstack_ptr_grow (&vector_stack, read_rtx (infile));
}
if (list_counter > 0)
{
Index: gcc/system.h
===================================================================
--- gcc/system.h (revision 131336)
+++ gcc/system.h (working copy)
@@ -578,6 +578,7 @@
#define really_call_calloc calloc
#define really_call_realloc realloc
+
#if (GCC_VERSION >= 3000)
/* Note autoconf checks for prototype declarations and includes
@@ -589,7 +590,9 @@
#undef realloc
#undef calloc
#undef strdup
+#if ! (defined(FLEX_SCANNER) || defined(YYBISON) || defined(YYBYACC))
#pragma GCC poison malloc realloc calloc strdup
+#endif
/* Old target macros that have moved to the target hooks structure. */
#pragma GCC poison ASM_OPEN_PAREN ASM_CLOSE_PAREN \
@@ -628,4 +631,11 @@
#endif /* GCC >= 3.0 */
+#if defined(FLEX_SCANNER) || defined(YYBISON) || defined(YYBYACC)
+/* Flex and bison use malloc and realloc. Yuk. Note that this means
+ really_call_* cannot be used in a .l or .y file. */
+#define malloc xmalloc
+#define realloc xrealloc
+#endif
+
#endif /* ! GCC_SYSTEM_H */
Index: include/obstack.h
===================================================================
--- include/obstack.h (revision 131336)
+++ include/obstack.h (working copy)
@@ -349,7 +349,7 @@
#define obstack_memory_used(h) _obstack_memory_used (h)
-#if defined __GNUC__ && defined __STDC__ && __STDC__
+#if 0 && defined __GNUC__ && defined __STDC__ && __STDC__
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
does not implement __extension__. But that compiler doesn't define
__GNUC_MINOR__. */