Summary: | [3.4 regression] bootstrap failure - libstdc++ uses strtold when undeclared | ||
---|---|---|---|
Product: | gcc | Reporter: | Richard Earnshaw <rearnsha> |
Component: | libstdc++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | gcc-bugs, roger |
Priority: | P2 | Keywords: | build |
Version: | 4.0.0 | ||
Target Milestone: | 3.4.3 | ||
Host: | Target: | arm-unknown-elf | |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2004-10-07 16:06:11 | |
Attachments: | preprocessed source |
Description
Richard Earnshaw
2004-10-05 19:03:34 UTC
Created attachment 7288 [details]
preprocessed source
A 3.4 regression also if it was caused by that patch. As far as I can see, I think the problem is in configure.ac, where we automatically assume that newlib has strtold(). This is false AFAICT, newlib has _strtold, but it doesn't have strtold. R. Richard does the "obvious" one line fix to configure.ac restore bootstrap for you? It looks like my cygwin (a newlib target) doesn't even have _strtold. Index: configure.ac =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.ac,v retrieving revision 1.27 diff -c -3 -p -r1.27 configure.ac *** configure.ac 5 Oct 2004 05:02:58 -0000 1.27 --- configure.ac 5 Oct 2004 20:55:02 -0000 *************** else *** 194,200 **** # GLIBCXX_CHECK_STDLIB_SUPPORT AC_DEFINE(HAVE_STRTOF) - AC_DEFINE(HAVE_STRTOLD) # AC_FUNC_MMAP AC_DEFINE(HAVE_MMAP) --- 194,199 ---- Yes, I think that probably is the best solution. I looked at changing the entry to HAVE__STRTOLD and adding the other related glue to handle that, but that doesn't work (or I've missed something else) because there's no declartion of _strtold in any of the header files. Richard note the remappings in c++config.h: #if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD) # define _GLIBCXX_HAVE_STRTOLD 1 # define strtold _strtold #endif I thought _strtold was defined in the newlib binary. -benjamin ... of course, if newlib doesn't have strtold or any of the _strtold or __strtold or whatever, then the cross config bits for newlib shouldn't say that it does. -benjamin Subject: Re: [3.4/4.0 regression] bootstrap failure -
libstdc++ uses strtold when undeclared
On Thu, 2004-10-07 at 04:37, bkoz at gcc dot gnu dot org wrote:
> ------- Additional Comments From bkoz at gcc dot gnu dot org 2004-10-07 03:37 -------
>
> Richard note the remappings in c++config.h:
>
> #if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD)
> # define _GLIBCXX_HAVE_STRTOLD 1
> # define strtold _strtold
> #endif
>
> I thought _strtold was defined in the newlib binary.
But no declaration in the headers (at least, not in my copy), so we
can't use it in C++ unless there's some mechanism for making libstdc++
configury generate a declaration for us... :-(
Further, Roger says that even that isn't in his copy of Cygwin...
R.
There is no newlib definition for strtold. Thus, this patch should be applied: http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00603.html -benjamin Subject: Bug 17850 CVSROOT: /cvs/gcc Module name: gcc Changes by: sayle@gcc.gnu.org 2004-10-07 15:52:43 Modified files: libstdc++-v3 : ChangeLog configure.ac configure Log message: PR libstdc++/17850 * configure.ac: Newlib does not provide strtold. * configure: Regenerate. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2688&r2=1.2689 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.ac.diff?cvsroot=gcc&r1=1.27&r2=1.28 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.diff?cvsroot=gcc&r1=1.409&r2=1.410 Confirmed. Subject: Bug 17850 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: sayle@gcc.gnu.org 2004-10-07 21:04:14 Modified files: libstdc++-v3 : ChangeLog configure.ac configure Log message: PR libstdc++/17850 * configure.ac: Newlib does not provide strtold. * configure: Regenerate. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2224.2.186&r2=1.2224.2.187 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.ac.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.14.4.4&r2=1.14.4.5 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.373.4.19&r2=1.373.4.20 Fixed. |