This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Patches for GCC 3.0 in bfd/*
- To: binutils at sourceware dot cygnus dot com
- Subject: Patches for GCC 3.0 in bfd/*
- From: Andreas Jaeger <aj at suse dot de>
- Date: 28 Apr 2000 09:58:44 +0200
The next major release of GCC will be 3.0. There're some places in
bfd which check for the version number of GCC which will break with
GCC 3.0.
I'm appending a patch.
Andreas
2000-04-28 Andreas Jaeger <aj@suse.de>
* bfd-in2.h: Correctly check for GCC version.
* libbfd.h: Likewise.
* libhppa.h: Likewise.
* libbfd-in.h: Likewise.
Index: bfd/bfd-in2.h
===================================================================
RCS file: /cvs/src/src/bfd/bfd-in2.h,v
retrieving revision 1.43
diff -u -r1.43 bfd-in2.h
--- bfd-in2.h 2000/04/21 20:22:21 1.43
+++ bfd-in2.h 2000/04/28 07:57:57
@@ -89,7 +89,7 @@
/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */
/* It gets worse if the host also defines a true/false enum... -sts */
/* And even worse if your compiler has built-in boolean types... -law */
-#if defined (__GNUG__) && (__GNUC_MINOR__ > 5)
+#if defined (__GNUG__) && ((__GNUC__ == 2 && __GNUC_MINOR__ > 5) || __GNUC__ > 2)
#define TRUE_FALSE_ALREADY_DEFINED
#endif
#ifdef MPW
Index: bfd/libbfd.h
===================================================================
RCS file: /cvs/src/src/bfd/libbfd.h,v
retrieving revision 1.18
diff -u -r1.18 libbfd.h
--- libbfd.h 2000/04/21 20:22:21 1.18
+++ libbfd.h 2000/04/28 07:57:58
@@ -507,7 +507,7 @@
ATTRIBUTE_NORETURN;
/* if gcc, we can give a function name, too */
-#if !defined (__GNUC__) || __GNUC_MINOR__ <= 5
+#if !defined (__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ <= 5)
#define __PRETTY_FUNCTION__ ((char *) NULL)
#endif
Index: bfd/libhppa.h
===================================================================
RCS file: /cvs/src/src/bfd/libhppa.h,v
retrieving revision 1.10
diff -u -r1.10 libhppa.h
--- libhppa.h 2000/04/24 08:14:43 1.10
+++ libhppa.h 2000/04/28 07:57:58
@@ -35,7 +35,7 @@
#endif /* GNU C? */
#endif /* INLINE */
-#if __GNUC__ >= 2 && __GNUC_MINOR__ >= 7
+#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
/* Declare the functions with the unused attribute to avoid warnings. */
static INLINE unsigned int assemble_3 (unsigned int)
__attribute__ ((__unused__));
Index: bfd/libbfd-in.h
===================================================================
RCS file: /cvs/src/src/bfd/libbfd-in.h,v
retrieving revision 1.7
diff -u -r1.7 libbfd-in.h
--- libbfd-in.h 1999/12/10 18:51:35 1.7
+++ libbfd-in.h 2000/04/28 07:57:59
@@ -507,7 +507,7 @@
ATTRIBUTE_NORETURN;
/* if gcc, we can give a function name, too */
-#if !defined (__GNUC__) || __GNUC_MINOR__ <= 5
+#if !defined (__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ <= 5)
#define __PRETTY_FUNCTION__ ((char *) NULL)
#endif
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de