[v3] host-x-linux support
Benjamin Kosnik
bkoz@redhat.com
Wed Dec 13 01:06:00 GMT 2000
...adds support for doing things like x86-linux -x- powerpc-linux, or
sparc-solaris -x- powerpc-linux. This, plus a magic wand.....
tested on x86/linux.
tested w/ x86/linux -x- powerpc/linux
2000-12-12 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* acinclude.m4 (GLIBCPP_CHECK_CTYPE_SUPPORT): Don't link ctype
files here...
* configure.in: Rather, do it once for all targets here. Clean up
canadian cross and cross compile targets for linux-targeted
crosses.
* configure: Regenerate.
* aclocal.m4: Regnerate.
* acconfig.h: Add more defines.
* config.h.in: Regenerate.
2000-12-12 Angela Marie Thomas <angela@cygnus.com>
* configure.in: Fix case for host-x-linux
* configure: Regenerate.
Index: acconfig.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/acconfig.h,v
retrieving revision 1.13
diff -c -p -r1.13 acconfig.h
*** acconfig.h 2000/12/06 02:35:25 1.13
--- acconfig.h 2000/12/13 09:04:41
***************
*** 18,23 ****
--- 18,38 ----
// Define if lldiv_t exists in stdlib.h.
#undef HAVE_LLDIV_T
+ /* Define if you have the atan2f function. */
+ #define _GLIBCPP_HAVE_ATAN2F 1
+
+ /* Define if you have the atan2l function. */
+ #define _GLIBCPP_HAVE_ATAN2L 1
+
+ /* Define if you have the copysignf function. */
+ #define _GLIBCPP_HAVE_COPYSIGNF 1
+
+ /* Define if you have the modff function. */
+ #undef HAVE_MODFF
+
+ /* Define if you have the modfl function. */
+ #undef HAVE_MODFL
+
// Define if the compiler/host combination has __builtin_abs
#undef HAVE___BUILTIN_ABS
Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/acinclude.m4,v
retrieving revision 1.108
diff -c -p -r1.108 acinclude.m4
*** acinclude.m4 2000/12/08 22:26:48 1.108
--- acinclude.m4 2000/12/13 09:04:46
*************** AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
*** 614,619 ****
--- 614,620 ----
dnl Check to see if basic C math functions have float versions.
GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanf)
GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinff)
+ GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysignf)
GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(acosf)
GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(asinf)
GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(atanf)
*************** AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
*** 683,688 ****
--- 684,690 ----
dnl Check to see if basic C math functions have float versions.
GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_isnanf)
GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_isinff)
+ GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_copysignf)
GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_acosf)
GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_asinf)
GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_atanf)
*************** AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPP
*** 754,761 ****
dnl Check for complex versions of math functions of platform.
AC_CHECK_HEADERS([complex.h])
AC_CHECK_LIB(m, main)
! AC_REPLACE_MATHFUNCS(csqrt csqrtf nan hypot hypotf atan2f expf \
! copysignf)
dnl Compile the long double complex functions only if the function
dnl provides the non-complex long double functions that are needed.
--- 756,762 ----
dnl Check for complex versions of math functions of platform.
AC_CHECK_HEADERS([complex.h])
AC_CHECK_LIB(m, main)
! AC_REPLACE_MATHFUNCS(csqrt csqrtf nan hypot hypotf)
dnl Compile the long double complex functions only if the function
dnl provides the non-complex long double functions that are needed.
*************** AC_DEFUN(GLIBCPP_CHECK_CTYPE_SUPPORT, [
*** 963,975 ****
ctype_include_dir="config/os/generic"
AC_MSG_WARN("Using default ctype headers.")
fi
-
- AC_LINK_FILES($ctype_include_dir/bits/ctype_base.h,
- include/bits/ctype_base.h)
- AC_LINK_FILES($ctype_include_dir/bits/ctype_inline.h,
- include/bits/ctype_inline.h)
- AC_LINK_FILES($ctype_include_dir/bits/ctype_noninline.h, \
- include/bits/ctype_noninline.h)
])
])
--- 964,969 ----
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/configure.in,v
retrieving revision 1.38
diff -c -p -r1.38 configure.in
*** configure.in 2000/12/06 02:35:27 1.38
--- configure.in 2000/12/13 09:04:47
*************** GLIBCPP_ENABLE_THREADS
*** 42,59 ****
GLIBCPP_ENABLE_ATOMICITY
GLIBCPP_ENABLE_CXX_FLAGS([none])
-
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
--- 42,58 ----
GLIBCPP_ENABLE_ATOMICITY
GLIBCPP_ENABLE_CXX_FLAGS([none])
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
*************** if test -n "$with_cross_host"; then
*** 62,88 ****
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/os/wince"
! AC_LINK_FILES($ctype_include_dir/bits/ctype_base.h,
! include/bits/ctype_base.h)
! AC_LINK_FILES($ctype_include_dir/bits/ctype_inline.h, \
! include/bits/ctype_inline.h)
! AC_LINK_FILES($ctype_include_dir/bits/ctype_noninline.h, \
! include/bits/ctype_noninline.h)
!
! AC_DEFINE(_GLIBCPP_BUGGY_FLOAT_COMPLEX)
! AC_DEFINE(_GLIBCPP_BUGGY_COMPLEX)
;;
*)
# We assume newlib. This lets us hard-code the functions we know
--- 61,156 ----
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
! WFMT_FLAGS='-fdiagnostics-show-location=once'
! SECTION_FLAGS='-ffunction-sections -fdata-sections'
! AC_SUBST(WFMT_FLAGS)
! 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
! # GLIBCPP_CHECK_CTYPE_SUPPORT
! ctype_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
*************** if test -n "$with_cross_host"; then
*** 94,105 ****
AC_DEFINE(HAVE_ISINFF)
ctype_include_dir="config/os/newlib"
- AC_LINK_FILES($ctype_include_dir/bits/ctype_base.h,
- include/bits/ctype_base.h)
- AC_LINK_FILES($ctype_include_dir/bits/ctype_inline.h, \
- include/bits/ctype_inline.h)
- AC_LINK_FILES($ctype_include_dir/bits/ctype_noninline.h, \
- include/bits/ctype_noninline.h)
AC_DEFINE(_GLIBCPP_BUGGY_FLOAT_COMPLEX)
AC_DEFINE(_GLIBCPP_BUGGY_COMPLEX)
--- 162,167 ----
*************** else
*** 111,117 ****
# We are being configured natively. We can do more elaborate tests
# that include AC_TRY_COMPILE now, as the linker is assumed to be
# working.
-
xcompiling=0
NATIVE=yes
CANADIAN=no
--- 173,178 ----
*************** else
*** 133,138 ****
--- 194,207 ----
AC_FUNC_MMAP
fi
+
+ # Now that ctype is determined for all possible targets, we can do this...
+ AC_LINK_FILES($ctype_include_dir/bits/ctype_base.h, \
+ include/bits/ctype_base.h)
+ AC_LINK_FILES($ctype_include_dir/bits/ctype_inline.h, \
+ include/bits/ctype_inline.h)
+ AC_LINK_FILES($ctype_include_dir/bits/ctype_noninline.h, \
+ include/bits/ctype_noninline.h)
AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
AM_CONDITIONAL(NULL_TARGET, test "$NULL_TARGET" = yes)
More information about the Gcc-patches
mailing list