This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


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

Re: crosscompiling with glibc...


> the problem I've just hit was that it's using the newlib ctype.cc rather than
> the gnu-linux version. does anyone know why this might be happening, or how to
> override it?

Yes. I know what is happening.

for native targets, ctype is deduced in this bit of hackery:
acinclude.m4/GLIBCPP_CHECK_CTYPE

for cross targets, ctype is hard-coded in this bit of hackery:
config.in

say, right here:

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 "$build" != "$with_cross_host"; then
    CANADIAN=yes
    NULL_TARGET=yes
  else
    CANADIAN=no
    NULL_TARGET=no
  fi

  case "$target_alias" in
    *-wince-*)
	# Configure for Microsoft Windows CE, or whatever they are
	# currently calling it.
	AC_DEFINE(HAVE_FLOAT_H)

    	AC_DEFINE(HAVE__FINITE)
    	AC_DEFINE(HAVE__ISNAN)
    	AC_DEFINE(HAVE__COPYSIGN)
    	AC_DEFINE(HAVE__FPCLASS)
    	AC_DEFINE(HAVE_MODF)

    	ctype_include_dir="config/wince"
    	AC_SUBST(ctype_include_dir)

    	AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T)

    	AC_DEFINE(_GLIBCPP_BUGGY_FLOAT_COMPLEX)
    	AC_DEFINE(_GLIBCPP_BUGGY_COMPLEX)
	;;
    *)
	# 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)

    	ctype_include_dir="config/newlib" <--here
    	AC_SUBST(ctype_include_dir)


you could just add a *linux bit in this case statement.

-benjamin

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