transaction_safe exceptions prevent libstdc++ building for some targets
Joe Seymour
joe.s@somniumtech.com
Thu Jan 19 12:05:00 GMT 2017
On 18/01/2017 19:24, DJ Delorie wrote:
> Joe Seymour <joe.s@somniumtech.com> writes:
>>> the msp430 -mlarge multilib failing to build with...
>>>> configure: error: Unknown underlying type for size_t
>>>> make[1]: *** [configure-target-libstdc++-v3] Error 1
>>
>> This is still reproducible.
>
> FYI the underlying type is uint20_t
>
> I think I've complained that libstdc++ has a hard-coded list, rather
> than using a configure-time check, in the past...
>
Thanks!
Here's the patch I'm proposing. I've tested it as follows:
- msp430-elf no longer encounters the error when configuring libstdc++-v3. Note
that libstdc++-v3 doesn't build due to an ICE though.
- Configuring libstdc++-v3 for x86_64-unknown-linux-gnu produces:
include/bits/c++config.h:#define _GLIBCXX_MANGLE_SIZE_T m
Both with and without this patch.
- Configuring libstdc++-v3 for i686-unknown-linux-gnu produces:
include/bits/c++config.h:#define _GLIBCXX_MANGLE_SIZE_T j
Both with and without this patch.
If it's acceptable I would appreciate it if someone would commit it on my
behalf.
Thanks,
2017-01-19 Joe Seymour <joe.s@somniumtech.com>
libstdc++-v3/
* acinclude.m4 (GLIBCXX_CHECK_SIZE_T_MANGLING): Support uint20_t.
* configure: Regenerate.
---
libstdc++-v3/acinclude.m4 | 8 ++++++--
libstdc++-v3/configure | 18 ++++++++++++++++++
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 4e04cce..d9859aa 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -4460,8 +4460,12 @@ AC_DEFUN([GLIBCXX_CHECK_SIZE_T_MANGLING], [
[glibcxx_cv_size_t_mangling=y], [
AC_TRY_COMPILE([],
[extern __SIZE_TYPE__ x; extern unsigned short x;],
- [glibcxx_cv_size_t_mangling=t],
- [glibcxx_cv_size_t_mangling=x])
+ [glibcxx_cv_size_t_mangling=t], [
+ AC_TRY_COMPILE([],
+ [extern __SIZE_TYPE__ x; extern __int20 unsigned x;],
+ [glibcxx_cv_size_t_mangling=u6uint20],
+ [glibcxx_cv_size_t_mangling=x])
+ ])
])
])
])
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 219a6a3..9bb9862 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -80707,6 +80707,21 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
glibcxx_cv_size_t_mangling=t
else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+extern __SIZE_TYPE__ x; extern __int20 unsigned x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ glibcxx_cv_size_t_mangling=u6uint20
+else
glibcxx_cv_size_t_mangling=x
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -80721,6 +80736,9 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_size_t_mangling" >&5
$as_echo "$glibcxx_cv_size_t_mangling" >&6; }
if test $glibcxx_cv_size_t_mangling = x; then
--
1.7.1
More information about the Libstdc++
mailing list