This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix MicroBlaze bits/setjmp.h for C++
- From: Michael Eager <eager at eagercon dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Cc: david at holsgrove dot tech
- Date: Wed, 4 Jan 2017 10:04:06 -0800
- Subject: Re: Fix MicroBlaze bits/setjmp.h for C++
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1701032137270.14638@digraph.polyomino.org.uk>
On 01/03/2017 01:37 PM, Joseph Myers wrote:
For MicroBlaze, setjmp/check-installed-headers-cxx fails with:
../setjmp/setjmp.h:34:8: error: '__jmp_buf_tag' has a field '__jmp_buf_tag::__jmpbuf' whose type depends on the type '<unnamed struct>' which has no linkage [-Werror=subobject-linkage]
This patch fixes this in the same way as for some other architectures:
the struct used for the internal __jmp_buf type is given the tag
__jmp_buf_internal_tag.
Tested (compilation tests) with build-many-glibcs.py.
2017-01-03 Joseph Myers <joseph@codesourcery.com>
* sysdeps/microblaze/bits/setjmp.h (__jmp_buf): Give struct tag
__jmp_buf_internal_tag.
diff --git a/sysdeps/microblaze/bits/setjmp.h b/sysdeps/microblaze/bits/setjmp.h
index d54db9c..fd175da 100644
--- a/sysdeps/microblaze/bits/setjmp.h
+++ b/sysdeps/microblaze/bits/setjmp.h
@@ -25,7 +25,7 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-typedef struct
+typedef struct __jmp_buf_internal_tag
{
/* There are 21 4-byte registers that should be saved:
r1, r2, r13-r31. Actually, there seems no need to save
OK.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077