This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] cross compiling, duplicate math symbols
- To: gcc-patches at gcc dot gnu dot org
- Subject: [v3] cross compiling, duplicate math symbols
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Mon, 10 Sep 2001 17:08:47 -0700
Match what's in newlib to what libstdc++ expects, so that there will
not be duplicate symbols.
Tested on h8300-elf, as powerpc-eabism appears broken.
Tested x86-linux
This will probably go into the branch when it's apparent that it
doesn't break things like cygwin that also use newlib.
-benjamin
2001-09-10 Benjamin Kosnik <bkoz@redhat.com>
* configure.in: Fix cross compiling math routines. Correct
comments for cross compiling and limits. Add floating point math
routines found in newlib.
* configure: Regenerate.
* acconfig.h: Add macros.
* config.h.in: Regenerate.
Index: acconfig.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/acconfig.h,v
retrieving revision 1.21
diff -c -p -r1.21 acconfig.h
*** acconfig.h 2001/08/10 06:50:25 1.21
--- acconfig.h 2001/09/10 23:51:29
***************
*** 52,57 ****
--- 52,69 ----
// Define if you have the modfl function.
#undef HAVE_MODFL
+ // Define if you have the expf function.
+ #undef HAVE_EXPF
+
+ // Define if you have the expl function.
+ #undef HAVE_EXPL
+
+ // Define if you have the hypotf function.
+ #undef HAVE_HYPOTF
+
+ // Define if you have the hypotl function.
+ #undef HAVE_HYPOTL
+
// Define if the compiler/host combination has __builtin_abs
#undef HAVE___BUILTIN_ABS
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.in,v
retrieving revision 1.75
diff -c -p -r1.75 configure.in
*** configure.in 2001/08/16 12:49:15 1.75
--- configure.in 2001/09/10 23:51:30
*************** GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
*** 52,62 ****
if test -n "$with_cross_host" || test x"$build" != x"$host"; then
# We are being configured with some form of cross compiler.
- # mknumeric_limits may not work correctly, either because the
- # compiler may not run on this machine, may not be able to link
- # executables, or may produce executables we can't run on this
- # machine. Thus, just use the pre-generated include/bits/limits_generic.h
GLIBCPP_IS_CROSS_COMPILING=1
# If Canadian cross, then don't pick up tools from the build
--- 52,71 ----
if test -n "$with_cross_host" || test x"$build" != x"$host"; then
+ # This lets us hard-code the functionality we know
+ # we'll have in the cross target environment. "Let" is a
+ # sugar-coated word placed on an especially dull and tedious hack, actually.
+ # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros
+ # that involve linking can't be used:
+ # "cannot open sim-crt0.o"
+ # "cannot open crt0.o"
+ # etc. All this is because there currently exists no unified,
+ # consistent way for top level CC information to be passed down
+ # to target directories: newlib includes, newlib linking info,
+ # libgloss versus newlib crt0.o, etc. When all of this is done, all
+ # of this hokey, excessive AC_DEFINE junk for crosses can be removed.
+
# We are being configured with some form of cross compiler.
GLIBCPP_IS_CROSS_COMPILING=1
# If Canadian cross, then don't pick up tools from the build
*************** if test -n "$with_cross_host" || test x"
*** 97,102 ****
--- 106,112 ----
AC_DEFINE(HAVE_FLOORF)
AC_DEFINE(HAVE_FMODF)
AC_DEFINE(HAVE_FREXPF)
+ AC_DEFINE(HAVE_HYPOTF)
AC_DEFINE(HAVE_ISINF)
AC_DEFINE(HAVE_ISINFF)
AC_DEFINE(HAVE_ISNAN)
*************** if test -n "$with_cross_host" || test x"
*** 132,137 ****
--- 142,148 ----
AC_DEFINE(HAVE_FLOORL)
AC_DEFINE(HAVE_FMODL)
AC_DEFINE(HAVE_FREXPL)
+ AC_DEFINE(HAVE_HYPOTL)
AC_DEFINE(HAVE_ISINFL)
AC_DEFINE(HAVE_ISNANL)
AC_DEFINE(HAVE_LDEXPL)
*************** if test -n "$with_cross_host" || test x"
*** 156,172 ****
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"
-
- # need to check for faster f versions of math functions, ie sinf?
;;
esac
else
--- 167,206 ----
AC_DEFINE(HAVE_MMAP)
;;
*)
! # We assume newlib.
! # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
! # GLIBCPP_CHECK_MATH_SUPPORT
AC_DEFINE(HAVE_FINITE)
+ AC_DEFINE(HAVE_HYPOT)
AC_DEFINE(HAVE_ISNAN)
AC_DEFINE(HAVE_ISINF)
+
+ AC_DEFINE(HAVE_ACOSF)
+ AC_DEFINE(HAVE_ASINF)
+ AC_DEFINE(HAVE_ATAN2F)
+ AC_DEFINE(HAVE_ATANF)
+ AC_DEFINE(HAVE_CEILF)
+ AC_DEFINE(HAVE_COSF)
+ AC_DEFINE(HAVE_COSHF)
+ AC_DEFINE(HAVE_EXPF)
+ AC_DEFINE(HAVE_FABSF)
+ AC_DEFINE(HAVE_FLOORF)
+ AC_DEFINE(HAVE_FMODF)
+ AC_DEFINE(HAVE_HYPOTF)
+ AC_DEFINE(HAVE_ISNANF)
AC_DEFINE(HAVE_ISINFF)
+ AC_DEFINE(HAVE_LDEXPF)
+ AC_DEFINE(HAVE_LOG10F)
+ AC_DEFINE(HAVE_LOGF)
+ AC_DEFINE(HAVE_MODFF)
+ AC_DEFINE(HAVE_POWF)
+ AC_DEFINE(HAVE_SINF)
+ AC_DEFINE(HAVE_SINHF)
+ AC_DEFINE(HAVE_SQRTF)
+ AC_DEFINE(HAVE_TANF)
+ AC_DEFINE(HAVE_TANHF)
os_include_dir="config/os/newlib"
;;
esac
else