Subject: pkg/23424: devel/tpasm fails to link
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: netbsd-bugs
Date: 11/13/2003 12:48:10
>Number:         23424
>Category:       pkg
>Synopsis:       devel/tpasm fails to link
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 13 11:49:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Thilo Manske
>Release:        NetBSD 1.6ZE
>Organization:
>Environment:
System: NetBSD WintelKiller 1.6ZE NetBSD 1.6ZE (WintelKiller) #401: Fri Nov 7 21:47:53 MET 2003 thilo@WintelKiller:/sys/arch/i386/compile/WintelKiller i386
Architecture: i386
Machine: i386
compiler suite: gcc 3.3.2-nb1
>Description:
tpasm's gmakefile compiles the sources as c++ files but then tries to link
the produced objects as normal C objects (without including the proper
standdard c++ libraries).

[...]
cc -I. -O2 -Wall -x c++   -o processors/sunplus.o -c processors/sunplus.c
cc -I. -O2 -Wall -x c++   -o processors/z80.o -c processors/z80.c
cc -O globals.o tpasm.o memory.o files.o symbols.o label.o segment.o pseudo.o parser.o context.o macro.o listing.o outfile.o processors.o support.o outfiles/intel_seg.o outfiles/mot_seg.o outfiles/sunplus_sym.o outfiles/text_sym.o processors/6502.o processors/6805.o processors/68hc11.o processors/8051.o processors/avr.o processors/pic.o processors/sunplus.o processors/z80.o -o tpasm
tpasm.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
files.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
symbols.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
label.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
segment.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
pseudo.o(.eh_frame+0x11): more undefined references to `__gxx_personality_v0' follow
gmake: *** [tpasm] Error 1
>How-To-Repeat:
>Fix:
--- Makefile.orig	2001-04-15 16:57:56.000000000 +0200
+++ Makefile	2003-11-13 12:32:29.000000000 +0100
@@ -65,7 +65,7 @@
 all : tpasm
 
 tpasm : $(OBJECTS)
-	$(CC) -O $(OBJECTS) -o tpasm
+	$(CXX) -O $(OBJECTS) -o tpasm
 
 clean :
 	rm -f *.o
>Release-Note:
>Audit-Trail:
>Unformatted: