Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Oct 2017 17:47:38 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>
Subject:   Re: Exceptions Handling on PPC64 with clang - gnu ld bug identified
Message-ID:  <331A07C5-E87B-4644-B716-217EC05BBD39@dsl-only.net>

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

Roman Divacky rdivacky at freebsd.org wrote on
Sat Oct 7 10:03:10 UTC 2017 :

> In a followup to https://lists.freebsd.org/pipermail/freebsd-toolchain/2017-May/002961.html
>  
> I attempted to fix gnu ld in base to fix the wrongly set bit.
> 
> The following patch 
> http://www.vlakno.cz/~rdivacky/ppc64.exceptions.fix.patch
> 
> switches a few computations to happen in 64bits instead of 32bit and fixes the
> wrong personality/LDSA info in binaries.
> 
> As a result clang compiled/assembled c++ binaries with EH start to work for me.
> 
> Can someone verify this works for everyone? I can see the same cast in upstream
> binutils but in a couple more places, so this is probably not the final answer
> but is good enough for me.

Just for the record: in a separate exchange it was realized that:

A) This was for a context of a buildworld that was built
   via gcc 4.2.1 and being able to use clang in such a
   context.

B) This is insufficient to fully fix a buildworld that was built
   via clang and then use either clang or gcc (such as gcc7) to
   generate code bound to the system libc++ and libcxxrt for
   code that throws C++ exceptions.

A clang-based builworld results in problems in libc++ and/or
libcxxrt for handling thrown C++ exceptions.

===
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?331A07C5-E87B-4644-B716-217EC05BBD39>