This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix libjava build on current git glibc (PR bootstrap/50888)


On Wed, Nov 23, 2011 at 02:24:34PM -0700, Tom Tromey wrote:
> >>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:
> 
> Jakub> As discussed in the PR, libjava fails to build against latest
> Jakub> glibc, because prims.cc is compiled with -fnon-call-exceptions,
> Jakub> uses ctype.h and libgcj isn't linked against -lsupc++ or -lstdc++.
> Jakub> isspace in latest glibc is a throw() inline that calls a throw()
> Jakub> function pointer.  Unfortunately, with -fnon-call-exceptions
> Jakub> the compiler doesn't have a guarantee that the function pointer
> Jakub> that is being called is always valid (it is in glibc) and thus adds
> Jakub> a __cxa_call_unexpected call if the call would throw and that symbol
> Jakub> isn't satisfied during linking of libgcj and apps against it.
> 
> BTW, it seems odd to me that this function is marked throw() instead of
> __attribute__((nothrow)).  The latter would avoid this problem entirely.

Well, appart from -fnon-call-exceptions it should make zero difference.
I guess glibc uses throw() because it is a C++ standard feature, not an
extension.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]