On 2016-Nov-29, at 2:56 PM, Ed Maste <emaste at freebsd.org> wrote:

> On 29 November 2016 at 16:46, Mark Millard <markmi at dsl-only.net> 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

_______________________________________________
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"

Reply via email to