From owner-freebsd-toolchain@freebsd.org Sun Dec 4 07:31:41 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA812C66EF1 for ; Sun, 4 Dec 2016 07:31:41 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-5.reflexion.net [208.70.210.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D3F81EB for ; Sun, 4 Dec 2016 07:31:41 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 25660 invoked from network); 4 Dec 2016 07:31:39 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 4 Dec 2016 07:31:39 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sun, 04 Dec 2016 02:31:39 -0500 (EST) Received: (qmail 12799 invoked from network); 4 Dec 2016 07:31:39 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 4 Dec 2016 07:31:39 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id DE4D0EC8AF4; Sat, 3 Dec 2016 23:31:38 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: WITH_LLVM_LIBUNWIND vs. WITHOUT_LLVM_LIBUNWIND [ WITH_LLVM_LIBUNWIND= based buildworld fails on powerpc64 for TARGET_ARCH=powerpc64 ] From: Mark Millard In-Reply-To: Date: Sat, 3 Dec 2016 23:31:38 -0800 Cc: FreeBSD Toolchain , FreeBSD PowerPC ML , Dimitry Andric Content-Transfer-Encoding: 7bit Message-Id: <09B0D6F7-F2F3-4AA3-9EE6-5D51655549BE@dsl-only.net> References: <750FCE4D-F25B-46E1-9383-B8A94AAA8792@dsl-only.net> To: Ed Maste X-Mailer: Apple Mail (2.3251) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Dec 2016 07:31:42 -0000 On 2016-Nov-29, at 2:56 PM, Ed Maste wrote: > On 29 November 2016 at 16:46, Mark Millard wrote: >> >> >> Summary: Does using clang 3.9.0 as the system compiler imply one should or >> must (eventually?) use WITH_LLVM_LIBUNWIND to have C++ exceptions work? >> >> Do WITH_LLVM_LIBUNWIND and WITHOUT_LLVM_LIBUNWIND have the same criteria >> for what dwarfdump should show for the exception information (if the >> information to be shown is to be correct/sufficient for libunwind)? > > It does not. It should be possible to build a functional system both > WITH_ and WITHOUT_LLVM_LIBUNWIND. The compiler is unaware of the > _LLVM_LIBUNWIND setting. Both unwind libraries use the same unwind > data. > > Eventually new features may show up in Clang and LLVM's libunwind (and > new versions of GNU's unwinder) that won't work with the old unwinder. > >> Your answer's detail might indicate that I've misdirected the llvm folks >> in submittals like https://llvm.org/bugs/show_bug.cgi?id=26844 . >> >> There is also the question of if/when llvm's libunwind is ready to be used >> for powerpc64 or powerpc (or . . .) if there are architecture specifics >> involved. That answer might determine when C++ exceptions work (and so >> when devel/kyua might have a chance to work) and is sort of separate from >> the main question here but is still of interest overall. >> >> Should powerpc64 and powerpc clang 3.9.0 testing be using >> WITH_LLVM_LIBUNWIND ? WITHOUT_LLVM_LIBUNWIND ? Both? > > For testing I think WITH_LLVM_LIBUNWIND is the interesting case. My > eventual goal is to have a functioning Clang, LLD, LLDB, libunwind, > and ELF Tool Chain on all of our supported architectures. I tried adding WITH_LLVM_LIBUNWIND= to the SRC_CONF_ENV file that I use on powerpc64 for TARGET_ARCH=powerpc64 for (a minor variation of) head -r309179 based on clang 3.9.0. It failed to complete buildworld: A) An assert failed in libunwind/src/UnwindCursor.hpp . B) Two .S files got massive numbers of error messages ( libgcc_eh/UnwindRegisterRestore.S and libgcc_eh/UnwindRegisterSave.S ) And those points stopped the build. See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215039 Note: using WITHOUT_LLVM_LIBUNWIND= (implicit) I've done buildworld using WITH_LIB32= just fine and rebooted with it installed and then did more buildworld experiments. The above started from a working environment for such things. Unfortunately for gcc's libunwind clang's code generation is broken (counting .eh dwarf information as code). C++ exceptions are one area that does not even do simple things correctly for powerpc64 (or for powerpc): I have to avoid using programs that depend on C++ exceptions happening. === Mark Millard markmi at dsl-only.net