From owner-freebsd-toolchain@FreeBSD.ORG Fri Feb 21 22:48:05 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E1D0A47; Fri, 21 Feb 2014 22:48:05 +0000 (UTC) Received: from aslan.scsiguy.com (www.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 088DF1617; Fri, 21 Feb 2014 22:48:04 +0000 (UTC) Received: from dansodjalt.sldomain.com (207-225-98-3.dia.static.qwest.net [207.225.98.3]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.7) with ESMTP id s1LMluRC065995 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 21 Feb 2014 15:47:57 -0700 (MST) (envelope-from gibbs@FreeBSD.org) Content-Type: multipart/mixed; boundary="Apple-Mail=_1D5A962F-BDAC-4038-8308-CC0D06F6C254" Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: ctfconvert broken for C++ objects? From: "Justin T. Gibbs" In-Reply-To: <20140220172608.GA85526@freebsd.org> Date: Fri, 21 Feb 2014 15:47:52 -0700 Message-Id: <81C07491-7E51-4CF0-B257-88ED998EE2A0@FreeBSD.org> References: <216B816A-8ADA-438F-B834-8C386C5BC460@FreeBSD.org> <20140220172608.GA85526@freebsd.org> To: Roman Divacky X-Mailer: Apple Mail (2.1827) Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2014 22:48:05 -0000 --Apple-Mail=_1D5A962F-BDAC-4038-8308-CC0D06F6C254 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Feb 20, 2014, at 10:26 AM, Roman Divacky = wrote: > The dwarf backend for ctfconvert was completely reimplemented a few = weeks ago. > It's now based on elftoolchain libdwarf. >=20 > Test on current. The failures I=92ve experienced occur when attempting to ctfconvert the = C++ code in the base (e.g. ATF or devd). You can replicate the failures = on head by applying the share/mk patch below (a version of my previous = patch rebased on head). On a slightly related node, do you know why there is a FreeBSD version = ranged exclusion around bootstrapping the dtrace tools? =46rom src/Makefile.inc1: # dtrace tools are required for older bootstrap env and cross-build = =20 .if ${MK_CDDL} !=3D "no" && \ = =20 ((${BOOTSTRAPPING} < 1000034 && \ = =20 !(${BOOTSTRAPPING} >=3D 901505 && ${BOOTSTRAPPING} < 999999)) = \ =20 || (${MACHINE} !=3D ${TARGET} || ${MACHINE_ARCH} !=3D = ${TARGET_ARCH})) =20 _dtrace_tools=3D cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ = =20 lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge = =20 .endif We had to disable this protection in our build so that the fixes to the = dtrace tool chain took effect prior to compiling any C++ code during = buildworld. In testing this on head, I also found that 9-stable=92s g++ segfaulted = when bootstrapping clang, so I had to buildworld using 9-stable=92s = clang to get past the bootstrap phase. (By 9-stable, I mean a 9-stable = tree from October/November from last year). =97 Justin --Apple-Mail=_1D5A962F-BDAC-4038-8308-CC0D06F6C254 Content-Disposition: attachment; filename=ctf_for_c++.diffs Content-Type: application/octet-stream; x-unix-mode=0644; name="ctf_for_c++.diffs" Content-Transfer-Encoding: 7bit Index: bsd.lib.mk =================================================================== --- bsd.lib.mk (revision 262298) +++ bsd.lib.mk (working copy) @@ -80,12 +80,15 @@ .cc.o .C.o .cpp.o .cxx.o: ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CTFCONVERT_CMD} .cc.po .C.po .cpp.po .cxx.po: ${CXX} ${PO_FLAG} ${STATIC_CXXFLAGS} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CTFCONVERT_CMD} .cc.So .C.So .cpp.So .cxx.So: ${CXX} ${PICFLAG} -DPIC ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CTFCONVERT_CMD} .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} Index: sys.mk =================================================================== --- sys.mk (revision 262298) +++ sys.mk (working copy) @@ -246,9 +246,11 @@ .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} + ${CTFCONVERT_CMD} .cc.o .cpp.o .cxx.o .C.o: ${CXX} ${CXXFLAGS} -c ${.IMPSRC} + ${CTFCONVERT_CMD} .m.o: ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} --Apple-Mail=_1D5A962F-BDAC-4038-8308-CC0D06F6C254--