diff options
author | Frank Scheiner <frank.scheiner@web.de> | 2024-10-08 19:48:09 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-10-09 14:05:49 +0100 |
commit | c0bc9a153ae6ab649e2fcc3af53ebcd37df0a871 (patch) | |
tree | 9180698ad96226d47ce233529e67f6b3c4ccc5d5 | |
parent | fee3adbac055c3ff2649fed866c66d44ebfcbe90 (diff) | |
download | gcc-c0bc9a153ae6ab649e2fcc3af53ebcd37df0a871.zip gcc-c0bc9a153ae6ab649e2fcc3af53ebcd37df0a871.tar.gz gcc-c0bc9a153ae6ab649e2fcc3af53ebcd37df0a871.tar.bz2 |
libstdc++: Workaround glibc headers on ia64-linux
We see:
```
FAIL: 17_intro/names.cc -std=gnu++17 (test for excess errors)
FAIL: 17_intro/names_pstl.cc -std=gnu++17 (test for excess errors)
FAIL: experimental/names.cc -std=gnu++17 (test for excess errors)
```
...on ia64-linux.
This is due to:
* /usr/include/bits/sigcontext.h:32-38:
```
32 struct __ia64_fpreg
33 {
34 union
35 {
36 unsigned long bits[2];
37 } u;
38 } __attribute__ ((__aligned__ (16)));
```
* /usr/include/sys/ucontext.h:39-45:
```
39 struct __ia64_fpreg_mcontext
40 {
41 union
42 {
43 unsigned long __ctx(bits)[2];
44 } __ctx(u);
45 } __attribute__ ((__aligned__ (16)));
```
...from glibc 2.39 (w/ia64 support re-added). See the discussion
starting on [1].
[1]: https://gcc.gnu.org/pipermail/gcc-patches/2024-June/654487.html
Signed-off-by: Frank Scheiner <frank.scheiner@web.de>
libstdc++-v3/ChangeLog:
* testsuite/17_intro/names.cc [__linux__ && __ia64__]: Undefine
'u' as used in glibc headers.
-rw-r--r-- | libstdc++-v3/testsuite/17_intro/names.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc index 6b9a363..bea2d19 100644 --- a/libstdc++-v3/testsuite/17_intro/names.cc +++ b/libstdc++-v3/testsuite/17_intro/names.cc @@ -282,6 +282,12 @@ #undef y #endif +#if defined (__linux__) && defined (__ia64__) +// <bits/sigcontext.h> defines __ia64_fpreg::u +// <sys/ucontext.h> defines __ia64_fpreg_mcontext::u +#undef u +#endif + #if defined (__linux__) || defined (__gnu_hurd__) #if __has_include(<features.h>) #include <features.h> |