diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-05-07 18:47:30 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-05-07 18:47:30 +0000 |
commit | 6089a29b0fd5de4d1148443f501935ac22e33724 (patch) | |
tree | e419f4e6de88028755a8ac1b5734552ccc2e1bd0 | |
parent | ef33767496cf58178a6cc5761995a5d6d801506c (diff) |
Bring over changes from gcc3 (and gcc4 in ports) to make C++ exception
handling work with shared libraries.
-rw-r--r-- | gnu/gcc/gcc/unwind-dw2-fde-openbsd.c | 9 | ||||
-rw-r--r-- | gnu/usr.bin/cc/libgcc/Makefile | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gnu/gcc/gcc/unwind-dw2-fde-openbsd.c b/gnu/gcc/gcc/unwind-dw2-fde-openbsd.c new file mode 100644 index 00000000000..69310d9a32d --- /dev/null +++ b/gnu/gcc/gcc/unwind-dw2-fde-openbsd.c @@ -0,0 +1,9 @@ +/* XXX This file provides a few defines such that we can compile the + source from unwind-dw2-fde-glibc.c on OpenBSD. Hopefully we can + integrate these defines in that file and rename it to something + like unwind-de2-fde-phdr.c in the up-stream sources. */ + +#define ElfW(type) Elf_##type + +#define __GLIBC__ 3 /* Fool unwind-dw2-fde-glibc.c. */ +#include "unwind-dw2-fde-glibc.c" diff --git a/gnu/usr.bin/cc/libgcc/Makefile b/gnu/usr.bin/cc/libgcc/Makefile index 7f08d05462f..be17201783e 100644 --- a/gnu/usr.bin/cc/libgcc/Makefile +++ b/gnu/usr.bin/cc/libgcc/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/lib/libgcc/Makefile,v 1.58.8.1 2009/04/15 03:14:26 kensmith Exp $ -# $OpenBSD: Makefile,v 1.10 2010/05/05 21:10:27 robert Exp $ +# $OpenBSD: Makefile,v 1.11 2010/05/07 18:47:29 kettenis Exp $ .include <bsd.own.mk> @@ -69,7 +69,7 @@ LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA) # Additional sources to handle exceptions; overridden by targets as needed. LIB2ADDEH = unwind-dw2.c unwind-sjlj.c gthr-gnat.c \ - unwind-c.c unwind-dw2-fde.c + unwind-c.c unwind-dw2-fde-openbsd.c LIB2ADDEHSTATIC = $(LIB2ADDEH) LIB2ADDEHSHARED = $(LIB2ADDEH) @@ -276,7 +276,7 @@ CLEANFILES += ${ASM_V} ${ASM_V:R:S/$/.vo/} EH_OBJS_T = ${LIB2ADDEHSTATIC:R:S/$/.o/} EH_OBJS_P = ${LIB2ADDEHSTATIC:R:S/$/.po/} EH_OBJS_S = ${LIB2ADDEHSHARED:R:S/$/.So/} -EH_CFLAGS = -fexceptions -D__GLIBC__=3 -DElfW=__ElfN +EH_CFLAGS = -fexceptions SOBJS += ${EH_OBJS_S} OBJS += ${EH_OBJS_T} |