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]

Re: Slowness when configuring libstdc++-v3


On Sat, May 19, 2001 at 09:58:54PM -0400, Richard Kenner wrote:
> It is still running extraordinarily slowly, on a on alphaev56.  Even though
> it's saying "cached", it's taking about 15 seconds per line.

As an aside, you really should say "Digital Unix" or "Tru64"
or something.  However, in this case it's obvious ...

There was a long discussion about this about two months ago.
It has to do with extreme lossage in /bin/sh wrt here documents
nested inside conditionals.

I've been using the following patch to speed things up for
native builds on various systems.



r~



Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.in,v
retrieving revision 1.54.2.3
diff -c -p -d -r1.54.2.3 configure.in
*** configure.in	2001/05/14 19:48:53	1.54.2.3
--- configure.in	2001/05/20 07:12:14
*************** GLIBCPP_ENABLE_THREADS
*** 71,200 ****
  GLIBCPP_ENABLE_CXX_FLAGS([none])
  GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
  
! if test -n "$with_cross_host"; then
! 
!   # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
!   # may not work correctly, because the compiler may not be able to
!   # link executables.
!   xcompiling=1
!   NATIVE=no
! 
!   # If Canadian cross, then don't pick up tools from the build
!   # directory.
!   if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
!     CANADIAN=yes
!     NULL_TARGET=yes
!   else
!     CANADIAN=no
!     NULL_TARGET=no
!   fi
! 
!   case "$target_alias" in
!     *-linux*)
! 	# Construct linux crosses by hand, eliminating bits that need ld...
!         # Check for available headers.
!         AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
! 	machine/endian.h machine/param.h sys/machine.h fp.h locale.h \
! 	float.h inttypes.h])
! 
! 	# GLIBCPP_CHECK_COMPILER_FEATURES
! 	SECTION_FLAGS='-ffunction-sections -fdata-sections'
! 	AC_SUBST(SECTION_FLAGS)
! 	GLIBCPP_CHECK_LINKER_FEATURES
! 	# GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
! 	# GLIBCPP_CHECK_MATH_SUPPORT
! 	AC_DEFINE(HAVE_ACOSF)
! 	AC_DEFINE(HAVE_ASINF)
! 	AC_DEFINE(HAVE_ATAN2F)
! 	AC_DEFINE(HAVE_ATANF)
! 	AC_DEFINE(HAVE_CEILF)
! 	AC_DEFINE(HAVE_COPYSIGN)
! 	AC_DEFINE(HAVE_COPYSIGNF)
! 	AC_DEFINE(HAVE_COSF)
! 	AC_DEFINE(HAVE_COSHF)
! 	AC_DEFINE(HAVE_EXPF)
! 	AC_DEFINE(HAVE_FABSF)
! 	AC_DEFINE(HAVE_FINITE)
! 	AC_DEFINE(HAVE_FINITEF)
! 	AC_DEFINE(HAVE_FLOORF)
! 	AC_DEFINE(HAVE_FMODF)
! 	AC_DEFINE(HAVE_FREXPF)
! 	AC_DEFINE(HAVE_ISINF)
! 	AC_DEFINE(HAVE_ISINFF)
! 	AC_DEFINE(HAVE_ISNAN)
! 	AC_DEFINE(HAVE_ISNANF)
! 	AC_DEFINE(HAVE_LDEXPF)
! 	AC_DEFINE(HAVE_LOG10F)
! 	AC_DEFINE(HAVE_LOGF)
! 	AC_DEFINE(HAVE_MODFF)
! 	AC_DEFINE(HAVE_POWF)
! 	AC_DEFINE(HAVE_SINCOS)
! 	AC_DEFINE(HAVE_SINCOSF)
! 	AC_DEFINE(HAVE_SINF)
! 	AC_DEFINE(HAVE_SINHF)
! 	AC_DEFINE(HAVE_SQRTF)
! 	AC_DEFINE(HAVE_TANF)
! 	AC_DEFINE(HAVE_TANHF)
! 
! 	# At some point, we should differentiate between architectures
! 	# like x86, which have long double versions, and alpha/powerpc/etc.,
! 	# which don't. For the time being, punt.
! 	if test x"long_double_math_on_this_cpu" = x"yes"; then
! 	  AC_DEFINE(HAVE_ACOSL)
! 	  AC_DEFINE(HAVE_ASINL)
! 	  AC_DEFINE(HAVE_ATAN2L)
! 	  AC_DEFINE(HAVE_ATANL)
! 	  AC_DEFINE(HAVE_CEILL)
! 	  AC_DEFINE(HAVE_COPYSIGNL)
! 	  AC_DEFINE(HAVE_COSL)
! 	  AC_DEFINE(HAVE_COSHL)
! 	  AC_DEFINE(HAVE_EXPL)
! 	  AC_DEFINE(HAVE_FABSL)
! 	  AC_DEFINE(HAVE_FINITEL)
! 	  AC_DEFINE(HAVE_FLOORL)
! 	  AC_DEFINE(HAVE_FMODL)
! 	  AC_DEFINE(HAVE_FREXPL)
! 	  AC_DEFINE(HAVE_ISINFL)
! 	  AC_DEFINE(HAVE_ISNANL)
! 	  AC_DEFINE(HAVE_LDEXPL)
! 	  AC_DEFINE(HAVE_LOG10L)
! 	  AC_DEFINE(HAVE_LOGL)
! 	  AC_DEFINE(HAVE_MODFL)
! 	  AC_DEFINE(HAVE_POWL)
! 	  AC_DEFINE(HAVE_SINCOSL)
! 	  AC_DEFINE(HAVE_SINL)
! 	  AC_DEFINE(HAVE_SINHL)
! 	  AC_DEFINE(HAVE_SQRTL)
! 	  AC_DEFINE(HAVE_TANL)
! 	  AC_DEFINE(HAVE_TANHL)
! 	fi
! 	GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
! 	GLIBCPP_CHECK_COMPLEX_MATH_COMPILER_SUPPORT
! 	GLIBCPP_CHECK_WCHAR_T_SUPPORT
! 	os_include_dir="config/os/gnu-linux"
! 	# GLIBCPP_CHECK_STDLIB_SUPPORT
! 	AC_DEFINE(HAVE_STRTOF)        
! 	AC_DEFINE(HAVE_STRTOLD)        
! 	# AC_FUNC_MMAP
! 	AC_DEFINE(HAVE_MMAP)
! 	;;
!     *)
! 	# We assume newlib.  This lets us hard-code the functions we know
! 	# we'll have.
! 	AC_DEFINE(HAVE_FINITE)
! 	AC_DEFINE(HAVE_ISNAN)
! 	AC_DEFINE(HAVE_ISNANF)
! 	AC_DEFINE(HAVE_ISINF)
! 	AC_DEFINE(HAVE_ISINFF)
! 
! 	os_include_dir="config/os/newlib"
! 
! 	AC_DEFINE(_GLIBCPP_BUGGY_FLOAT_COMPLEX)
! 	AC_DEFINE(_GLIBCPP_BUGGY_COMPLEX)
! 	# need to check for faster f versions of math functions, ie sinf?
! 	;;
!   esac
! else
  
    # We are being configured natively. We can do more elaborate tests
    # that include AC_TRY_COMPILE now, as the linker is assumed to be
--- 71,200 ----
  GLIBCPP_ENABLE_CXX_FLAGS([none])
  GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
  
! #if test -n "$with_cross_host"; then
! #
! #  # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
! #  # may not work correctly, because the compiler may not be able to
! #  # link executables.
! #  xcompiling=1
! #  NATIVE=no
! #
! #  # If Canadian cross, then don't pick up tools from the build
! #  # directory.
! #  if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
! #    CANADIAN=yes
! #    NULL_TARGET=yes
! #  else
! #    CANADIAN=no
! #    NULL_TARGET=no
! #  fi
! #
! #  case "$target_alias" in
! #    *-linux*)
! #	# Construct linux crosses by hand, eliminating bits that need ld...
! #        # Check for available headers.
! #        AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
! #	machine/endian.h machine/param.h sys/machine.h fp.h locale.h \
! #	float.h inttypes.h])
! #
! #	# GLIBCPP_CHECK_COMPILER_FEATURES
! #	SECTION_FLAGS='-ffunction-sections -fdata-sections'
! #	AC_SUBST(SECTION_FLAGS)
! #	GLIBCPP_CHECK_LINKER_FEATURES
! #	# GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
! #	# GLIBCPP_CHECK_MATH_SUPPORT
! #	AC_DEFINE(HAVE_ACOSF)
! #	AC_DEFINE(HAVE_ASINF)
! #	AC_DEFINE(HAVE_ATAN2F)
! #	AC_DEFINE(HAVE_ATANF)
! #	AC_DEFINE(HAVE_CEILF)
! #	AC_DEFINE(HAVE_COPYSIGN)
! #	AC_DEFINE(HAVE_COPYSIGNF)
! #	AC_DEFINE(HAVE_COSF)
! #	AC_DEFINE(HAVE_COSHF)
! #	AC_DEFINE(HAVE_EXPF)
! #	AC_DEFINE(HAVE_FABSF)
! #	AC_DEFINE(HAVE_FINITE)
! #	AC_DEFINE(HAVE_FINITEF)
! #	AC_DEFINE(HAVE_FLOORF)
! #	AC_DEFINE(HAVE_FMODF)
! #	AC_DEFINE(HAVE_FREXPF)
! #	AC_DEFINE(HAVE_ISINF)
! #	AC_DEFINE(HAVE_ISINFF)
! #	AC_DEFINE(HAVE_ISNAN)
! #	AC_DEFINE(HAVE_ISNANF)
! #	AC_DEFINE(HAVE_LDEXPF)
! #	AC_DEFINE(HAVE_LOG10F)
! #	AC_DEFINE(HAVE_LOGF)
! #	AC_DEFINE(HAVE_MODFF)
! #	AC_DEFINE(HAVE_POWF)
! #	AC_DEFINE(HAVE_SINCOS)
! #	AC_DEFINE(HAVE_SINCOSF)
! #	AC_DEFINE(HAVE_SINF)
! #	AC_DEFINE(HAVE_SINHF)
! #	AC_DEFINE(HAVE_SQRTF)
! #	AC_DEFINE(HAVE_TANF)
! #	AC_DEFINE(HAVE_TANHF)
! #
! #	# At some point, we should differentiate between architectures
! #	# like x86, which have long double versions, and alpha/powerpc/etc.,
! #	# which don't. For the time being, punt.
! #	if test x"long_double_math_on_this_cpu" = x"yes"; then
! #	  AC_DEFINE(HAVE_ACOSL)
! #	  AC_DEFINE(HAVE_ASINL)
! #	  AC_DEFINE(HAVE_ATAN2L)
! #	  AC_DEFINE(HAVE_ATANL)
! #	  AC_DEFINE(HAVE_CEILL)
! #	  AC_DEFINE(HAVE_COPYSIGNL)
! #	  AC_DEFINE(HAVE_COSL)
! #	  AC_DEFINE(HAVE_COSHL)
! #	  AC_DEFINE(HAVE_EXPL)
! #	  AC_DEFINE(HAVE_FABSL)
! #	  AC_DEFINE(HAVE_FINITEL)
! #	  AC_DEFINE(HAVE_FLOORL)
! #	  AC_DEFINE(HAVE_FMODL)
! #	  AC_DEFINE(HAVE_FREXPL)
! #	  AC_DEFINE(HAVE_ISINFL)
! #	  AC_DEFINE(HAVE_ISNANL)
! #	  AC_DEFINE(HAVE_LDEXPL)
! #	  AC_DEFINE(HAVE_LOG10L)
! #	  AC_DEFINE(HAVE_LOGL)
! #	  AC_DEFINE(HAVE_MODFL)
! #	  AC_DEFINE(HAVE_POWL)
! #	  AC_DEFINE(HAVE_SINCOSL)
! #	  AC_DEFINE(HAVE_SINL)
! #	  AC_DEFINE(HAVE_SINHL)
! #	  AC_DEFINE(HAVE_SQRTL)
! #	  AC_DEFINE(HAVE_TANL)
! #	  AC_DEFINE(HAVE_TANHL)
! #	fi
! #	GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
! #	GLIBCPP_CHECK_COMPLEX_MATH_COMPILER_SUPPORT
! #	GLIBCPP_CHECK_WCHAR_T_SUPPORT
! #	os_include_dir="config/os/gnu-linux"
! #	# GLIBCPP_CHECK_STDLIB_SUPPORT
! #	AC_DEFINE(HAVE_STRTOF)        
! #	AC_DEFINE(HAVE_STRTOLD)        
! #	# AC_FUNC_MMAP
! #	AC_DEFINE(HAVE_MMAP)
! #	;;
! #    *)
! #	# We assume newlib.  This lets us hard-code the functions we know
! #	# we'll have.
! #	AC_DEFINE(HAVE_FINITE)
! #	AC_DEFINE(HAVE_ISNAN)
! #	AC_DEFINE(HAVE_ISNANF)
! #	AC_DEFINE(HAVE_ISINF)
! #	AC_DEFINE(HAVE_ISINFF)
! #
! #	os_include_dir="config/os/newlib"
! #
! #	AC_DEFINE(_GLIBCPP_BUGGY_FLOAT_COMPLEX)
! #	AC_DEFINE(_GLIBCPP_BUGGY_COMPLEX)
! #	# need to check for faster f versions of math functions, ie sinf?
! #	;;
! #  esac
! #else
  
    # We are being configured natively. We can do more elaborate tests
    # that include AC_TRY_COMPILE now, as the linker is assumed to be
*************** else
*** 223,229 ****
  [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.  ])])
  
    AC_FUNC_MMAP
! fi
  
  # Now that ctype is determined for all possible targets, we can do this...
  AC_LINK_FILES($os_include_dir/bits/ctype_base.h, \
--- 223,229 ----
  [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.  ])])
  
    AC_FUNC_MMAP
! #fi
  
  # Now that ctype is determined for all possible targets, we can do this...
  AC_LINK_FILES($os_include_dir/bits/ctype_base.h, \


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