Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/lib/libgcc While gcc may automatically add -fexecptions ...
details: https://anonhg.NetBSD.org/src/rev/eb22793cda1e
branches: trunk
changeset: 518603:eb22793cda1e
user: jmc <jmc%NetBSD.org@localhost>
date: Sun Dec 02 12:23:52 2001 +0000
description:
While gcc may automatically add -fexecptions to c++ code it will only do that
for files named .cc or .C. _eh gets generated into a .c file so we need
explicit rules for it's targets (.o .po and .so) to compile it correctly.
Without this exceptions just plain don't work. Nothing ever gets caught.
diffstat:
gnu/lib/libgcc/Makefile | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (39 lines):
diff -r da7339516cd2 -r eb22793cda1e gnu/lib/libgcc/Makefile
--- a/gnu/lib/libgcc/Makefile Sun Dec 02 12:17:12 2001 +0000
+++ b/gnu/lib/libgcc/Makefile Sun Dec 02 12:23:52 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2001/12/02 03:06:55 jmc Exp $
+# $NetBSD: Makefile,v 1.30 2001/12/02 12:23:52 jmc Exp $
REQUIRETOOLS= yes
@@ -25,11 +25,12 @@
CFLAGS+= -msoft-quad-float
.endif
-LIB2FUNCS= ${G_LIB2FUNCS:=.c} ${G_LIB2FUNCS_EH:=.c}
+LIB2FUNCS= ${G_LIB2FUNCS:=.c}
CXX_LIB2FUNCS= ${G_CXX_LIB2FUNCS:Mop*:S/opdel.o/opdelete.o/:.o=.cc}
SRCS+= ${LIB2FUNCS} ${CXX_LIB2FUNCS} \
${G_CXX_LIB2FUNCS:Nop*:.o=.cc} ${G_LIB2ADD:M*.c:T}
+OBJS+= ${G_LIB2FUNCS_EH:=.o}
# XXX fp-bit.c should be removed from this list after some grace period.
CLEANFILES+= ${LIB2FUNCS} ${CXX_LIB2FUNCS} dp-bit.c fp-bit.c
@@ -37,6 +38,15 @@
${LIB2FUNCS}: ${.CURDIR}/Makefile
printf '#define L${.PREFIX}\n#include <libgcc2.c>\n' >${.TARGET}
+${G_LIB2FUNCS_EH:=.o}: libgcc2.c
+ ${COMPILE.c} -fexceptions -DL$* -o $@ ${>:M*.c}
+
+${G_LIB2FUNCS_EH:=.po}: libgcc2.c
+ ${COMPILE.c} -pg -fexceptions -DL$* -o $@ ${>:M*.c}
+
+${G_LIB2FUNCS_EH:=.so}: libgcc2.c
+ ${COMPILE.c} ${CPICFLAGS} -fexceptions -DL$* -o $@ ${>:M*.c}
+
${CXX_LIB2FUNCS}: ${.CURDIR}/Makefile
printf '#define L_op_${.PREFIX:S/^op//}\n#include <new1.cc>\n#include <new2.cc>\n' >${.TARGET}
Home |
Main Index |
Thread Index |
Old Index