public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Build GCC lower versions on fedora 8
@ 2008-03-30  7:59 se7en_hills
  2008-03-30 10:16 ` Andrew Haley
  0 siblings, 1 reply; 2+ messages in thread
From: se7en_hills @ 2008-03-30  7:59 UTC (permalink / raw)
  To: gcc-help


Hello,
      I have built GCC 4.2.1 on fedora 8 and i tried installing GCC 3.2.3 on
the same OS. But after configuration   it shows an error while building. It
shows the error in the code like,
             
              error in function regex.c : line no 662 lvalue required for
incrementing operand.

I dont understand whether the probl is with the code or with building. Can i
build the lower versions while the higher versions are being installed.?


-- 
View this message in context: http://www.nabble.com/Build-GCC-lower-versions-on-fedora-8-tp16379406p16379406.html
Sent from the gcc - Help mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Build GCC lower versions on fedora 8
  2008-03-30  7:59 Build GCC lower versions on fedora 8 se7en_hills
@ 2008-03-30 10:16 ` Andrew Haley
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Haley @ 2008-03-30 10:16 UTC (permalink / raw)
  To: se7en_hills; +Cc: gcc-help

se7en_hills wrote:
> Hello,
>       I have built GCC 4.2.1 on fedora 8 and i tried installing GCC 3.2.3 on
> the same OS. But after configuration   it shows an error while building. It
> shows the error in the code like,
>              
>               error in function regex.c : line no 662 lvalue required for
> incrementing operand.
> 
> I dont understand whether the probl is with the code or with building. Can i
> build the lower versions while the higher versions are being installed.?

It's because of a change in the languge gcc supports.  If you tell us
the exact error, we can tell you how to fix it.  I've appended the changes I
needed to build gcc-3_2-branch.

Don't build 3.2.1.  Build 3.2.3; the only difference is bug fixes.

Andrew.

Index: read-rtl.c
===================================================================
--- read-rtl.c  (revision 131336)
+++ 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: system.h
===================================================================
--- system.h    (revision 131336)
+++ 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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-30 10:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-30  7:59 Build GCC lower versions on fedora 8 se7en_hills
2008-03-30 10:16 ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).