[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] [GCL, Axiom] proper bfd/CONST fix

From: root
Subject: [Gcl-devel] [GCL, Axiom] proper bfd/CONST fix
Date: Sun, 16 Jun 2002 23:52:45 -0400


I've fixed the GCL build in the correct place. The patch files are
attached. Basically, the problem is that acconfig.h and gclincl.h.in
both include the line:
  #define IN_GCC
just before including /usr/include/bfd.h. 
bfd.h includes /usr/include/ansidecl.h.
ansidecl.h has
  #ifndef IN_GCC
  #define CONST const
which means that the CONST redefinition does not occur during build.

This is reasonable behavior but the current system needs the CONST
redefinition in order to compile correctly because my copy of bfd.h
uses uppercase CONST. However, we can't just remove the IN_GCC
definition as this also breaks the system. So the solution is to place
the needed CONST redefinition inline (the lines marked with + in
acconfig.h and gclincl.h.in).
By the way, you can't test for this in configure because during
configure the IN_GCC definition does not exist so CONST gets
rewritten to const by default. That was the source of confusion.

It took a while to find the correct place to do this but the system
builds cleanly from scratch now.


--- /home/gcl/acconfig.h        Wed Jun 12 22:26:01 2002
+++ acconfig.h  Sun Jun 16 23:22:28 2002
@@ -139,6 +139,7 @@
 #define IN_GCC
+#define CONST const
 #include <bfd.h>
 #include <bfdlink.h>

--- /home/gcl/h/gclincl.h.in    Wed Jun 12 22:26:01 2002
+++ h/gclincl.h.in      Sun Jun 16 23:22:43 2002
@@ -91,6 +91,7 @@
 #define IN_GCC
+#define CONST const
 #include <bfd.h>
 #include <bfdlink.h>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]