Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2014 15:47:52 -0700
From:      "Justin T. Gibbs" <gibbs@FreeBSD.org>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        freebsd-toolchain@freebsd.org
Subject:   Re: ctfconvert broken for C++ objects?
Message-ID:  <81C07491-7E51-4CF0-B257-88ED998EE2A0@FreeBSD.org>
In-Reply-To: <20140220172608.GA85526@freebsd.org>
References:  <216B816A-8ADA-438F-B834-8C386C5BC460@FreeBSD.org> <20140220172608.GA85526@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <rdivacky@freebsd.org> =
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?81C07491-7E51-4CF0-B257-88ED998EE2A0>