This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[PATCH] gcc/unwind-pe.h : add #include <stdlib.h> if using abort for __gxx_abort
- From: "Ronald Landheer" <ronald at landheer dot com>
- To: <gcc-bugs at gcc dot gnu dot org>
- Date: Wed, 25 Dec 2002 22:23:24 +0100
- Subject: [PATCH] gcc/unwind-pe.h : add #include <stdlib.h> if using abort for __gxx_abort
Hello all,
Below is a patch I had to apply to get the compiler to compile for a
linux-x-freebsd4.7 cross compiler. I think it is harmless on itself (but
don't shoot me if I'm wrong) and I think it's small enough for you not
to need a copyright waiver to apply.
To note why I had to do this: I was compiling gcc-3.2.1 with Newlib
1.10.0 and binutils (latest version but forgot the number - downloaded
it from ftp.gnu.org yesterday, think it was 2.13.1) and was at the
fourth step of these four:
1. compile & install binutils for i386-unknown-freebsd4.7
2. compile & install gcc for i386-unknown-freebsd4.7 for C only, setting
--with-newlib, --disable-shared
3. use this new cross compiler to compile &install Newlib for
i386-unknown-freebsd4.7
4. compile gcc with newlib, for i386-unknown-freebsd4.7, disabling
threads (because pthreads runs into trouble) and having to apply the
patch below because of "abort is not defined" error
Note that one of the test programs doesn't compile either and the
sys/types.h header from FreeBSD doesn't get fixed correctly: FS_ZERO
remains unfixed, uses bzero and makes some Java sources run into
trouble.
I'll probably send in a patch for one of the libjava sources as well
(for a kill() being called when NO_SIGNALS is defined) but I have to
look up where I fixed that first - after Xmas.
Any feedback will be welcome - I'll look into the threads thing (I
have to get that working anyway) and send the patch for libjava later
on, unless you don't want it.
Kind regards,
Ronald Landheer-Cieslak
NB: I'll be on vacation until X-mas, so if you do reply to this, don't
expect me to until at least the 26th :)
2002-12-20 Ronald Landheer-Cieslak <ronald@landheer.com>
* gcc/unwind-pe.h : add #include <stdlib.h> if using abort for __gxx_abort
--- /usr/src/gcc-3.2.1/gcc/unwind-pe.h 2002-01-21 14:08:31.000000000 +0100
+++ gcc/unwind-pe.h 2002-12-20 12:02:26.000000000 +0100
@@ -26,6 +26,7 @@
#if __cplusplus
#define __gxx_abort std::abort
#else
+#include <stdlib.h>
#define __gxx_abort abort
#endif