gcl-devel
[Top][All Lists]
Advanced

[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

Camm,

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
  #endif
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.

Tim

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

--- /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 @@
 #undef HAVE_LIBBFD
 #ifdef HAVE_LIBBFD
 #define IN_GCC
+#define CONST const
 #include <bfd.h>
 #include <bfdlink.h>
 #endif




reply via email to

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