V3 PATCH: Remove unnecessary dependence on cabs.
Gabriel Dos Reis
gdr@codesourcery.com
Sun Nov 26 07:21:00 GMT 2000
This patch removes checks for cabs* and such.
Boostrapped and tested on an i686-pc-linux-gnu. No regression.
--
Gabriel Dos Reis gdr@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
http://www.codesourcery.com/gcc-compile.shtml
2000-11-26 Gabriel Dos Reis <gdr@codesourcery.com>
* libmath/Makefile.am (EXTRA_LONG_DOUBLE_yes): Remove cabsl.c
* libmath/Makefile.in: Regenerate.
* libmath/cabs.c: Remove.
* libmath/cabsf.c: Likewise.
* libmath/cabsl.c: Likewise.
* libmath/complex-stub.h: Remove declarations for cabs*.
* acinclude.m4: Remove check for cabs*.
* aclocal.m4: Regenerate.
* Makefile.in: Regenerate.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/Makefile.in,v
retrieving revision 1.46
diff -p -r1.46 Makefile.in
*** Makefile.in 2000/11/21 20:53:35 1.46
--- Makefile.in 2000/11/26 14:39:42
*************** MULTICLEAN = true
*** 135,149 ****
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
! AM_MAKEFLAGS = "AR_FLAGS=$(AR_FLAGS)" "CC_FOR_BUILD=$(CC_FOR_BUILD)" "CC_FOR_TARGET=$(CC_FOR_TARGET)" "CFLAGS=$(CFLAGS)" "CXXFLAGS=$(CXXFLAGS)" "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" "INSTALL=$(INSTALL)" "INSTALL_DATA=$(INSTALL_DATA)" "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" "LDFLAGS=$(LDFLAGS)" "LIBCFLAGS=$(LIBCFLAGS)" "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" "MAKE=$(MAKE)" "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" "PICFLAG=$(PICFLAG)" "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" "SHELL=$(SHELL)" "EXPECT=$(EXPECT)" "RUNTEST=$(RUNTEST)" "RUNTESTFLAGS=$(RUNTESTFLAGS)" "exec_prefix=$(exec_prefix)" "infodir=$(infodir)" "libdir=$(libdir)" "includedir=$(includedir)" "prefix=$(prefix)" "tooldir=$(tooldir)" "AR=$(AR)" "AS=$(AS)" "CC=$(CC)" "CXX=$(CXX)" "LD=$(LD)" "LIBCFLAGS=$(LIBCFLAGS)" "PICFLAG=$(PICFLAG)" "RANLIB=$(RANLIB)" "NM=$(NM)" "NM_FOR_BUILD=$(NM_FOR_BUILD)" !
"NM_FOR_TARGET=$(NM_FOR_TARGET)" "DESTDIR=$(DESTDIR)" "WERROR=$(WERROR)"
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
! CONFIG_CLEAN_FILES = mkcheck
DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
acconfig.h acinclude.m4 aclocal.m4 config.h.in configure configure.in \
! mkcheck.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
--- 135,190 ----
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
! AM_MAKEFLAGS = \
! "AR_FLAGS=$(AR_FLAGS)" \
! "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
! "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
! "CFLAGS=$(CFLAGS)" \
! "CXXFLAGS=$(CXXFLAGS)" \
! "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
! "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
! "INSTALL=$(INSTALL)" \
! "INSTALL_DATA=$(INSTALL_DATA)" \
! "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
! "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
! "LDFLAGS=$(LDFLAGS)" \
! "LIBCFLAGS=$(LIBCFLAGS)" \
! "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
! "MAKE=$(MAKE)" \
! "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
! "PICFLAG=$(PICFLAG)" \
! "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
! "SHELL=$(SHELL)" \
! "EXPECT=$(EXPECT)" \
! "RUNTEST=$(RUNTEST)" \
! "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
! "exec_prefix=$(exec_prefix)" \
! "infodir=$(infodir)" \
! "libdir=$(libdir)" \
! "includedir=$(includedir)" \
! "prefix=$(prefix)" \
! "tooldir=$(tooldir)" \
! "AR=$(AR)" \
! "AS=$(AS)" \
! "CC=$(CC)" \
! "CXX=$(CXX)" \
! "LD=$(LD)" \
! "LIBCFLAGS=$(LIBCFLAGS)" \
! "PICFLAG=$(PICFLAG)" \
! "RANLIB=$(RANLIB)" \
! "NM=$(NM)" \
! "NM_FOR_BUILD=$(NM_FOR_BUILD)" \
! "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
! "DESTDIR=$(DESTDIR)" \
! "WERROR=$(WERROR)"
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
! CONFIG_CLEAN_FILES = tests_flags mkcheck
DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
acconfig.h acinclude.m4 aclocal.m4 config.h.in configure configure.in \
! mkcheck.in tests_flags.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
*************** distclean-hdr:
*** 194,199 ****
--- 235,242 ----
-rm -f config.h
maintainer-clean-hdr:
+ tests_flags: $(top_builddir)/config.status tests_flags.in
+ cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
mkcheck: $(top_builddir)/config.status mkcheck.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/acinclude.m4,v
retrieving revision 1.97
diff -p -r1.97 acinclude.m4
*** acinclude.m4 2000/11/25 19:36:51 1.97
--- acinclude.m4 2000/11/26 14:39:42
*************** AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPP
*** 737,743 ****
dnl Check for complex versions of math functions of platform.
AC_CHECK_HEADERS([complex.h])
AC_CHECK_LIB(m, main)
! AC_REPLACE_MATHFUNCS(cabs cabsf ccos ccosf ccosh ccoshf cexp cexpf \
c_log c_logf clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt \
csqrtf ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf \
copysignf)
--- 737,743 ----
dnl Check for complex versions of math functions of platform.
AC_CHECK_HEADERS([complex.h])
AC_CHECK_LIB(m, main)
! AC_REPLACE_MATHFUNCS(ccos ccosf ccosh ccoshf cexp cexpf \
c_log c_logf clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt \
csqrtf ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf \
copysignf)
*************** AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPP
*** 750,756 ****
if test x$ac_cv_func_atan2l = x"yes" \
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
! AC_REPLACE_MATHFUNCS(cabsl ccoshl ccosl cexpl cpowl csinhl csinl \
csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l)
fi
--- 750,756 ----
if test x$ac_cv_func_atan2l = x"yes" \
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
! AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl cpowl csinhl csinl \
csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l)
fi
Index: aclocal.m4
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/aclocal.m4,v
retrieving revision 1.98
diff -p -r1.98 aclocal.m4
*** aclocal.m4 2000/11/25 19:36:52 1.98
--- aclocal.m4 2000/11/26 14:39:42
*************** AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPP
*** 749,755 ****
dnl Check for complex versions of math functions of platform.
AC_CHECK_HEADERS([complex.h])
AC_CHECK_LIB(m, main)
! AC_REPLACE_MATHFUNCS(cabs cabsf ccos ccosf ccosh ccoshf cexp cexpf \
c_log c_logf clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt \
csqrtf ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf \
copysignf)
--- 749,755 ----
dnl Check for complex versions of math functions of platform.
AC_CHECK_HEADERS([complex.h])
AC_CHECK_LIB(m, main)
! AC_REPLACE_MATHFUNCS(ccos ccosf ccosh ccoshf cexp cexpf \
c_log c_logf clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt \
csqrtf ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf \
copysignf)
*************** AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPP
*** 762,768 ****
if test x$ac_cv_func_atan2l = x"yes" \
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
! AC_REPLACE_MATHFUNCS(cabsl ccoshl ccosl cexpl cpowl csinhl csinl \
csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l)
fi
--- 762,768 ----
if test x$ac_cv_func_atan2l = x"yes" \
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
! AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl cpowl csinhl csinl \
csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l)
fi
Index: libmath/Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libmath/Makefile.am,v
retrieving revision 1.6
diff -p -r1.6 Makefile.am
*** Makefile.am 2000/10/30 21:30:29 1.6
--- Makefile.am 2000/11/26 14:39:43
*************** noinst_LTLIBRARIES = libmath.la
*** 28,34 ****
EXTRA_LONG_DOUBLE_yes = \
ccosl.c cexpl.c c_logl.c clog10l.c cpowl.c csinhl.c \
csqrtl.c ctanhl.c ctanl.c cargl.c hypotl.c \
! signbitl.c cabsl.c
EXTRA_DIST = \
ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c \
--- 28,34 ----
EXTRA_LONG_DOUBLE_yes = \
ccosl.c cexpl.c c_logl.c clog10l.c cpowl.c csinhl.c \
csqrtl.c ctanhl.c ctanl.c cargl.c hypotl.c \
! signbitl.c
EXTRA_DIST = \
ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c \
Index: libmath/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libmath/Makefile.in,v
retrieving revision 1.22
diff -p -r1.22 Makefile.in
*** Makefile.in 2000/11/21 20:53:36 1.22
--- Makefile.in 2000/11/26 14:39:43
*************** AUTOMAKE_OPTIONS = 1.3 cygnus
*** 113,130 ****
noinst_LTLIBRARIES = libmath.la
! EXTRA_LONG_DOUBLE_yes = ccosl.c cexpl.c c_logl.c clog10l.c cpowl.c csinhl.c csqrtl.c ctanhl.c ctanl.c cargl.c hypotl.c signbitl.c cabsl.c
- EXTRA_DIST = ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c cexp.c cexpf.c c_log.c c_logf.c clog10.c clog10f.c cpow.c cpowf.c csin.c csinf.c csinh.c csinhf.c csinl.c csqrt.c csqrtf.c ctan.c ctanf.c ctanh.c ctanhf.c carg.c cargf.c hypot.c hypotf.c atan2f.c expf.c $(EXTRA_LONG_DOUBLE_yes)
-
-
- libmath_la_LIBADD = @LIBMATHOBJS@ $(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE))
-
-
libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
! libmath_la_SOURCES = signbit.c signbitf.c
LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
--- 113,143 ----
noinst_LTLIBRARIES = libmath.la
! EXTRA_LONG_DOUBLE_yes = \
! ccosl.c cexpl.c c_logl.c clog10l.c cpowl.c csinhl.c \
! csqrtl.c ctanhl.c ctanl.c cargl.c hypotl.c \
! signbitl.c
!
!
! EXTRA_DIST = \
! ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c \
! cexp.c cexpf.c c_log.c c_logf.c clog10.c clog10f.c \
! cpow.c cpowf.c csin.c csinf.c csinh.c csinhf.c \
! csinl.c csqrt.c csqrtf.c ctan.c ctanf.c ctanh.c \
! ctanhf.c carg.c cargf.c hypot.c hypotf.c\
! atan2f.c expf.c \
! $(EXTRA_LONG_DOUBLE_yes)
!
!
! libmath_la_LIBADD = \
! @LIBMATHOBJS@ \
! $(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE))
libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
! libmath_la_SOURCES = \
! signbit.c signbitf.c
LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
*************** LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES
*** 138,144 ****
LIBIO_INCLUDES = @LIBIO_INCLUDES@
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
! INCLUDES = -I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include $(TOPLEVEL_INCLUDES)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h
--- 151,159 ----
LIBIO_INCLUDES = @LIBIO_INCLUDES@
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
! INCLUDES = \
! -I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include \
! $(TOPLEVEL_INCLUDES)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h
Index: libmath/cabs.c
===================================================================
RCS file: cabs.c
diff -N cabs.c
*** /sourceware/cvs-tmp/cvs2FL53l Sun Nov 26 06:39:45 2000
--- /dev/null Tue May 5 13:32:27 1998
***************
*** 1,38 ****
- /* Return the complex absolute value of double complex value. */
-
- /* Copyright (C) 1997-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 <math.h>
- #include "mathconf.h"
-
- double
- cabs (__complex__ double z)
- {
- return hypot (__real__ z, __imag__ z);
- }
--- 0 ----
Index: libmath/cabsf.c
===================================================================
RCS file: cabsf.c
diff -N cabsf.c
*** /sourceware/cvs-tmp/cvsuNODdD Sun Nov 26 06:39:45 2000
--- /dev/null Tue May 5 13:32:27 1998
***************
*** 1,38 ****
- /* Return the complex absolute value of double complex value. */
-
- /* Copyright (C) 1997-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 <math.h>
- #include "mathconf.h"
-
- float
- cabsf (__complex__ float z)
- {
- return hypotf (__real__ z, __imag__ z);
- }
--- 0 ----
Index: libmath/cabsl.c
===================================================================
RCS file: cabsl.c
diff -N cabsl.c
*** /sourceware/cvs-tmp/cvse2yaZT Sun Nov 26 06:39:45 2000
--- /dev/null Tue May 5 13:32:27 1998
***************
*** 1,42 ****
- /* Return the complex absolute value of double complex value. */
-
- /* Copyright (C) 1997-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 <math.h>
- #include "mathconf.h"
-
- /* Thanks to SGI we have to trick here. At least Irix 6.2 provides hypotl,
- but it has a wrong prototype. Grrr. */
- extern long double local_hypotl (long double, long double) asm ("hypotl");
-
-
- long double
- __mycabsl (__complex__ long double z)
- {
- return local_hypotl (__real__ z, __imag__ z);
- }
--- 0 ----
Index: libmath/complex-stub.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libmath/complex-stub.h,v
retrieving revision 1.2
diff -p -r1.2 complex-stub.h
*** complex-stub.h 2000/10/30 21:30:29 1.2
--- complex-stub.h 2000/11/26 14:39:43
*************** double carg (__complex__ double x);
*** 78,94 ****
float cargf (__complex__ float x);
long double cargl (__complex__ long double x);
- /* Some systems (like IRIX 6.5) already define these functions in
- <math.h>. */
- #ifndef _GLIBCPP_HAVE_CABS
- double cabs (__complex__ double x);
- #endif /* defined(_GLIBCPP_HAVE_CABS) */
- #ifndef _GLIBCPP_HAVE_CABSF
- float cabsf (__complex__ float x);
- #endif /* defined(_GLIBCPP_HAVE_CABSF) */
- #ifndef _GLIBCPP_HAVE_CABSL
- long double cabsl (__complex__ long double x);
- #endif /* defined(_GLIBCPP_HAVE_CABSL) */
-
#endif
--- 78,82 ----
More information about the Gcc-patches
mailing list