axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] _BOOL problem in GCL 2.4.3 for GCC 2.96 (typo fix)


From: root
Subject: [Axiom-developer] _BOOL problem in GCL 2.4.3 for GCC 2.96 (typo fix)
Date: Wed, 20 Nov 2002 21:41:25 -0500

Camm, I fat-fingered the last mail. The actual .defs file is in the
'h' directory, not the 'o' directory. These are the correct instructions:


This patch will fix 2.4.3 to work on all systems.
You can just save this mail file to 386-linux.defs.patch and type:
   cd gcl-2.4.3/h
   patch < 386-linux.defs.patch 
Perhaps you could call it 2.4.4?

The problem is the include of the file
/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdbool.h
which typedefs bool. This causes sfasl.c to fail to compile.

To fix the build on GCC 2.96 add the flag -D_STDBOOL_H to the
sfasl.h compile line. The correct way to do this is to apply
the attached patch file. Note that configure writes over several
files so you can't patch them directly. Under Bill's scheme you
make platform specific changes in the h/*.defs files.

The "bug" was introduced when bfd support was added.
In this particular case the "include <bfd.h>" also does an
"include <stdbool.h>" which typedefs bool causing the conflict.
If you read the include <bfd.h> file you'll find that this bug
has bitten many people. There are checks in the file so that
<stdbool.h> is only included if the compiler version is 2
and the subversion > 95. Since my RedHat 7.2 is gcc 2.95 this
works. My RedHat 7.3 is gcc 2.96 and fails. The correct fix
is NEVER to include this file as it will always cause a conflict
for GCL. The easiest way to do this is to claim that the file
has already been included. The first time it is included it
defines a flag _STDBOOL_H. So, we lie about it and always
define the flag thus avoiding the problem. 

Some day I should sign up as a GCL developer :-)

Tim

===================================================================
--- 386-linux.defs      Sun Feb  3 13:44:07 2002
+++ /tmp/386-linux.defs Wed Nov 20 21:21:08 2002
@@ -21,7 +21,7 @@
 # and also in the compiler::*cc* variable for later compilation of
 # lisp files.
 # (the -pipe is just since our file system is slow..)
-CC = ${GCC} -pipe -fwritable-strings  -DVOL=volatile -I$(GCLDIR)/o 
-fsigned-char
+CC = ${GCC} -pipe -fwritable-strings  -DVOL=volatile -I$(GCLDIR)/o 
-fsigned-char -D_STDBOOL_H 
 
 # under redhat 6.1 and slackware 7.0 we needed to have this
 # link be static, but should be ok with the fix to unixport/rsym_elf.c




reply via email to

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