This is the mail archive of the gcc@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: bootstrap broken: nan() does not match prototype


 > From: Paolo Carlini <pcarlini@suse.de>
 > 
 > Kaveh R. Ghazi wrote:
 > 
 > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13814
 > > > Gruss
 > > > Andreas
 > >
 > >I just posted a followup in the PR, we can probably remove nan.c from
 > >libstdc++.
 > >
 > Yes, we can, I have been meaning to do that for some days... And, about 
 > Benjamin's message, for 3.4 (and mainline, of course) we don't have 
 > restrictions due to the ABI, since is different anyway.
 > 
 > Just let me know if you have some spare time for this, otherwise, will 
 > do today or tomorrow.
 > Paolo.


Sure.

I updated my nan-removal patch for autoconf-2.57.  I applied it to a
solaris2.7 build that had failed with the nan problem last night.  I
removed the multilib libstdc++ directories and reran bootstrap which
then completed successfully.

While this works around the bootstrap problem, I'm not sure whether
the builtin conflict issue described in the PR is something that still
needs to be addressed in the C frontend and we're just side stepping
it.  So I'll leave the PR open and let someone else decide whether we
can close it or not.

Ok for mainline and 3.4?

		Thanks,
		--Kaveh


2004-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	PR c/13814
	* config/linker-map.gnu (nan): Delete.
	* libmath/mathconf.h (NAN, nan): Delete.
	* linkage.m4 (nan): Don't check for it.
	* libmath/nan.c: Delete file.

	* config.h.in, configure: Regenerate.

diff -rup orig/egcc-CVS20040122/libstdc++-v3/config/linker-map.gnu egcc-CVS20040122/libstdc++-v3/config/linker-map.gnu
--- orig/egcc-CVS20040122/libstdc++-v3/config/linker-map.gnu	Wed Jan  7 20:02:56 2004
+++ egcc-CVS20040122/libstdc++-v3/config/linker-map.gnu	Fri Jan 23 09:01:14 2004
@@ -203,7 +203,6 @@ GLIBCXX_3.4 {
     sqrtf;
     sqrtl;
     copysignf;
-    nan;
     __signbit;
     __signbitf;
     __signbitl;
diff -rup orig/egcc-CVS20040122/libstdc++-v3/libmath/mathconf.h egcc-CVS20040122/libstdc++-v3/libmath/mathconf.h
--- orig/egcc-CVS20040122/libstdc++-v3/libmath/mathconf.h	Thu Aug 16 08:49:19 2001
+++ egcc-CVS20040122/libstdc++-v3/libmath/mathconf.h	Fri Jan 23 08:56:51 2004
@@ -79,11 +79,6 @@ typedef int Int64_t __attribute ((mode (
 # include <nan.h>
 #endif
 
-#ifndef NAN
-# define NAN (nan())
-double nan (void);
-#endif
-
 #ifdef HAVE_IEEEFP_H
 # include <ieeefp.h>
 #endif
diff -rup orig/egcc-CVS20040122/libstdc++-v3/linkage.m4 egcc-CVS20040122/libstdc++-v3/linkage.m4
--- orig/egcc-CVS20040122/libstdc++-v3/linkage.m4	Thu Dec  4 20:03:45 2003
+++ egcc-CVS20040122/libstdc++-v3/linkage.m4	Fri Jan 23 08:59:26 2004
@@ -510,7 +510,7 @@ AC_DEFUN(GLIBCXX_CHECK_COMPLEX_MATH_SUPP
   dnl always pass if libm is available, and fail if it isn't.  If it is
   dnl available, we assume we'll need it later, so add it to LIBS.
   AC_CHECK_LIB(m, main)
-  AC_REPLACE_MATHFUNCS(nan copysignf)
+  AC_REPLACE_MATHFUNCS(copysignf)
 
   dnl For __signbit to signbit conversions.
   AC_CHECK_FUNCS([__signbit], , [LIBMATHOBJS="$LIBMATHOBJS signbit.lo"])
diff -rup orig/egcc-CVS20040122/libstdc++-v3/libmath/nan.c egcc-CVS20040122/libstdc++-v3/libmath/nan.c
--- orig/egcc-CVS20040122/libstdc++-v3/libmath/nan.c	Wed Jan 16 14:57:33 2002
+++ egcc-CVS20040122/libstdc++-v3/libmath/nan.c	Fri Jan 23 09:05:31 2004
@@ -1,36 +0,0 @@
-/* Return quiet nan. */
-
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
-
-   This file is part of the GNU ISO C++ Library.  This library is free
-   software; you can redistribute it and/or modify it under the
-   terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License along
-   with this library; see the file COPYING.  If not, write to the Free
-   Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.
-
-   As a special exception, you may use this file as part of a free software
-   library without restriction.  Specifically, if other files instantiate
-   templates or use macros or inline functions from this file, or you compile
-   this file and link it with other files to produce an executable, this
-   file does not by itself cause the resulting executable to be covered by
-   the GNU General Public License.  This exception does not however
-   invalidate any other reasons why the executable file might be covered by
-   the GNU General Public License.  */
-
-
-#include <stdlib.h>
-#include <string.h>
-
-double
-nan ()
-{ return strtod ("nan", NULL); }


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