Commit b731048b by Benjamin Kosnik Committed by Benjamin Kosnik

re PR libstdc++/3066 (configure.in generates bad arguments for cross compiling libraries)


2003-05-22  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/3066.
	* configure.in: Switch target to host, don't assume newlib.
	(target_alias): Remove.
	* configure: Regenerate.
	* acinclude.m4: Same.
	* aclocal.m4: Regenerate.
	* configure.target: Same. Rename to...
	* configure.host: This.

From-SVN: r67110
parent 14a9c399
2003-05-22 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/3066.
* configure.in: Switch target to host, don't assume newlib.
(target_alias): Remove.
* configure: Regenerate.
* acinclude.m4: Same.
* aclocal.m4: Regenerate.
* configure.target: Same. Rename to...
* configure.host: This.
2003-05-22 Paolo Carlini <pcarlini@unitus.it> 2003-05-22 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_fstream.h (_S_pback_size): Remove definition. * include/std/std_fstream.h (_S_pback_size): Remove definition.
......
...@@ -70,6 +70,9 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ ...@@ -70,6 +70,9 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
AC_ARG_WITH(cross-host, AC_ARG_WITH(cross-host,
[ --with-cross-host=HOST configuring with a cross compiler]) [ --with-cross-host=HOST configuring with a cross compiler])
AC_ARG_WITH(newlib,
[ --with-newlib Configuring with newlib])
glibcpp_basedir=$srcdir/$toprel/$1/libstdc++-v3 glibcpp_basedir=$srcdir/$toprel/$1/libstdc++-v3
AC_SUBST(glibcpp_basedir) AC_SUBST(glibcpp_basedir)
...@@ -201,7 +204,7 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ ...@@ -201,7 +204,7 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
# Find platform-specific directories containing configuration info. In # Find platform-specific directories containing configuration info. In
# addition to possibly modifying the same flags, it also sets up symlinks. # addition to possibly modifying the same flags, it also sets up symlinks.
GLIBCPP_CHECK_TARGET GLIBCPP_CHECK_HOST
]) ])
...@@ -874,9 +877,9 @@ dnl Check to see what architecture and operating system we are compiling ...@@ -874,9 +877,9 @@ dnl Check to see what architecture and operating system we are compiling
dnl for. Also, if architecture- or OS-specific flags are required for dnl for. Also, if architecture- or OS-specific flags are required for
dnl compilation, pick them up here. dnl compilation, pick them up here.
dnl dnl
dnl GLIBCPP_CHECK_TARGET dnl GLIBCPP_CHECK_HOST
AC_DEFUN(GLIBCPP_CHECK_TARGET, [ AC_DEFUN(GLIBCPP_CHECK_HOST, [
. [$]{glibcpp_basedir}/configure.target . [$]{glibcpp_basedir}/configure.host
AC_MSG_RESULT(CPU config directory is $cpu_include_dir) AC_MSG_RESULT(CPU config directory is $cpu_include_dir)
AC_MSG_RESULT(OS config directory is $os_include_dir) AC_MSG_RESULT(OS config directory is $os_include_dir)
]) ])
......
...@@ -82,6 +82,9 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ ...@@ -82,6 +82,9 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
AC_ARG_WITH(cross-host, AC_ARG_WITH(cross-host,
[ --with-cross-host=HOST configuring with a cross compiler]) [ --with-cross-host=HOST configuring with a cross compiler])
AC_ARG_WITH(newlib,
[ --with-newlib Configuring with newlib])
glibcpp_basedir=$srcdir/$toprel/$1/libstdc++-v3 glibcpp_basedir=$srcdir/$toprel/$1/libstdc++-v3
AC_SUBST(glibcpp_basedir) AC_SUBST(glibcpp_basedir)
...@@ -213,7 +216,7 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ ...@@ -213,7 +216,7 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
# Find platform-specific directories containing configuration info. In # Find platform-specific directories containing configuration info. In
# addition to possibly modifying the same flags, it also sets up symlinks. # addition to possibly modifying the same flags, it also sets up symlinks.
GLIBCPP_CHECK_TARGET GLIBCPP_CHECK_HOST
]) ])
...@@ -886,9 +889,9 @@ dnl Check to see what architecture and operating system we are compiling ...@@ -886,9 +889,9 @@ dnl Check to see what architecture and operating system we are compiling
dnl for. Also, if architecture- or OS-specific flags are required for dnl for. Also, if architecture- or OS-specific flags are required for
dnl compilation, pick them up here. dnl compilation, pick them up here.
dnl dnl
dnl GLIBCPP_CHECK_TARGET dnl GLIBCPP_CHECK_HOST
AC_DEFUN(GLIBCPP_CHECK_TARGET, [ AC_DEFUN(GLIBCPP_CHECK_HOST, [
. [$]{glibcpp_basedir}/configure.target . [$]{glibcpp_basedir}/configure.host
AC_MSG_RESULT(CPU config directory is $cpu_include_dir) AC_MSG_RESULT(CPU config directory is $cpu_include_dir)
AC_MSG_RESULT(OS config directory is $os_include_dir) AC_MSG_RESULT(OS config directory is $os_include_dir)
]) ])
......
This source diff could not be displayed because it is too large. You can view the blob instead.
# configure.target # configure.host
# #
# This shell script handles all target based configuration for libstdc++. # This shell script handles all host based configuration for libstdc++.
# It sets various shell variables based on the the target and the # It sets various shell variables based on the the host and the
# configuration options. You can modify this shell script without needing # configuration options. You can modify this shell script without needing
# to rerun autoconf/aclocal/etc. This file is "sourced" not executed. # to rerun autoconf/aclocal/etc. This file is "sourced" not executed.
# #
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
# #
# #
# It uses the following shell variables as set by config.guess: # It uses the following shell variables as set by config.guess:
# target The configuration target (full CPU-vendor-OS triplet) # host The configuration host (full CPU-vendor-OS triplet)
# target_cpu The configuration target CPU # host_cpu The configuration host CPU
# target_os The configuration target OS # host_os The configuration host OS
# #
# #
# It sets the following shell variables: # It sets the following shell variables:
# #
# cpu_include_dir CPU-specific directory, defaults to cpu/generic # cpu_include_dir CPU-specific directory, defaults to cpu/generic
# if cpu/target_cpu doesn't exist. This is # if cpu/host_cpu doesn't exist. This is
# used to set ATOMICITYH. # used to set ATOMICITYH.
# #
# os_include_dir OS-specific directory, defaults to os/generic. # os_include_dir OS-specific directory, defaults to os/generic.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
# defaults to no. # defaults to no.
# #
# abi_baseline_triplet directory name for ABI compat testing, # abi_baseline_triplet directory name for ABI compat testing,
# defaults to target (as per config.guess) # defaults to host (as per config.guess)
# #
# ATOMICITYH location of atomicity.h, # ATOMICITYH location of atomicity.h,
# defaults to cpu_include_dir # defaults to cpu_include_dir
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
# #
# If the defaults will not work for your platform, you need only change the # If the defaults will not work for your platform, you need only change the
# variables that won't work, i.e., you do not need to explicitly set a # variables that won't work, i.e., you do not need to explicitly set a
# working variable to its default. Most targets only need to change the two # working variable to its default. Most hosts only need to change the two
# *_include_dir variables. # *_include_dir variables.
...@@ -50,22 +50,22 @@ ...@@ -50,22 +50,22 @@
# Try to guess a default cpu_include_dir based on the name of the CPU. We # Try to guess a default cpu_include_dir based on the name of the CPU. We
# cannot do this for os_include_dir; there are too many portable operating # cannot do this for os_include_dir; there are too many portable operating
# systems out there. :-) # systems out there. :-)
abi_baseline_triplet=${target} abi_baseline_triplet=${host}
c_model=c_std c_model=c_std
c_compatibility=no c_compatibility=no
if test -d ${glibcpp_srcdir}/config/cpu/${target_cpu}; then if test -d ${glibcpp_srcdir}/config/cpu/${host_cpu}; then
cpu_include_dir="cpu/${target_cpu}" cpu_include_dir="cpu/${host_cpu}"
else else
cpu_include_dir="cpu/generic" cpu_include_dir="cpu/generic"
fi fi
# TARGET-SPECIFIC OVERRIDES # HOST-SPECIFIC OVERRIDES
# Set any CPU-dependent bits. # Set any CPU-dependent bits.
# Here we override defaults and catch more general cases due to naming # Here we override defaults and catch more general cases due to naming
# conventions (e.g., chip_name* to catch all variants). # conventions (e.g., chip_name* to catch all variants).
# THIS TABLE IS SORTED. KEEP IT THAT WAY. # THIS TABLE IS SORTED. KEEP IT THAT WAY.
case "${target_cpu}" in case "${host_cpu}" in
alpha*) alpha*)
cpu_include_dir="cpu/alpha" cpu_include_dir="cpu/alpha"
;; ;;
...@@ -114,7 +114,7 @@ unset _cpu_incdir_fullpath ...@@ -114,7 +114,7 @@ unset _cpu_incdir_fullpath
# If atomic ops and/or numeric limits are OS-specific rather than # If atomic ops and/or numeric limits are OS-specific rather than
# CPU-specifc, set those here too. # CPU-specifc, set those here too.
# THIS TABLE IS SORTED. KEEP IT THAT WAY. # THIS TABLE IS SORTED. KEEP IT THAT WAY.
case "${target_os}" in case "${host_os}" in
aix4.[3456789]* | aix[56789]*) aix4.[3456789]* | aix[56789]*)
# We set os_include_dir to os/aix only on AIX 4.3 and newer, but # We set os_include_dir to os/aix only on AIX 4.3 and newer, but
# os/aix/atomicity.h works on earlier versions of AIX 4.*, so we # os/aix/atomicity.h works on earlier versions of AIX 4.*, so we
...@@ -142,7 +142,7 @@ case "${target_os}" in ...@@ -142,7 +142,7 @@ case "${target_os}" in
freebsd*) freebsd*)
os_include_dir="os/bsd/freebsd" os_include_dir="os/bsd/freebsd"
# The FreeBSD ABI is expressed in the major version number only. # The FreeBSD ABI is expressed in the major version number only.
abi_baseline_triplet=`echo ${target} | sed 's,\(\.[0-9]*\)*$,,'` abi_baseline_triplet=`echo ${host} | sed 's,\(\.[0-9]*\)*$,,'`
;; ;;
gnu* | linux*) gnu* | linux*)
os_include_dir="os/gnu-linux" os_include_dir="os/gnu-linux"
...@@ -189,7 +189,7 @@ esac ...@@ -189,7 +189,7 @@ esac
# Set any OS-dependent and CPU-dependent bits. # Set any OS-dependent and CPU-dependent bits.
# THIS TABLE IS SORTED. KEEP IT THAT WAY. # THIS TABLE IS SORTED. KEEP IT THAT WAY.
case "${target}" in case "${host}" in
mips*-*-linux*) mips*-*-linux*)
ATOMICITYH="cpu/mips" ATOMICITYH="cpu/mips"
;; ;;
......
...@@ -30,14 +30,10 @@ GLIBCPP_TOPREL_CONFIGURE ...@@ -30,14 +30,10 @@ GLIBCPP_TOPREL_CONFIGURE
# Also, if v3 is being configured as part of a cross compiler, the top-level # Also, if v3 is being configured as part of a cross compiler, the top-level
# configure script will pass the "real" host as $with_cross_host. # configure script will pass the "real" host as $with_cross_host.
# #
# AC 2.5x sets target_alias iff the user specified --target, but we use it # In AC 2.13 AC_CANONICAL_TARGET was known as AC_CANONICAL_SYSTEM.
# everywhere, so we set it here just to be sure. In AC 2.13
# AC_CANONICAL_TARGET was known as AC_CANONICAL_SYSTEM.
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
target_alias=${target_alias-$target}
AC_SUBST(target_alias)
# Runs configure.target, finds CC, CXX and assorted other critical bits. # Runs configure.host, finds CC, CXX and assorted other critical bits.
# Must run this before the GLIBCPP_ENABLE_* macros below. # Must run this before the GLIBCPP_ENABLE_* macros below.
GLIBCPP_CONFIGURE(.) GLIBCPP_CONFIGURE(.)
...@@ -82,7 +78,7 @@ if test $ATOMICITYH = cpu/generic ; then ...@@ -82,7 +78,7 @@ if test $ATOMICITYH = cpu/generic ; then
fi fi
if test -n "$with_cross_host" || test x"$build" != x"$host"; then if test x"$build" != x"$host"; then
# We are being configured with some form of cross compiler. # We are being configured with some form of cross compiler.
GLIBCPP_IS_CROSS_COMPILING=1 GLIBCPP_IS_CROSS_COMPILING=1
...@@ -103,7 +99,8 @@ if test -n "$with_cross_host" || test x"$build" != x"$host"; then ...@@ -103,7 +99,8 @@ if test -n "$with_cross_host" || test x"$build" != x"$host"; then
# If Canadian cross, then don't pick up tools from the build directory. # If Canadian cross, then don't pick up tools from the build directory.
# Used in GLIBCPP_EXPORT_INCLUDES (and nowhere else?). # Used in GLIBCPP_EXPORT_INCLUDES (and nowhere else?).
if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host" \
&& test x"$build" != x"$target"; then
CANADIAN=yes CANADIAN=yes
else else
CANADIAN=no CANADIAN=no
...@@ -114,7 +111,7 @@ if test -n "$with_cross_host" || test x"$build" != x"$host"; then ...@@ -114,7 +111,7 @@ if test -n "$with_cross_host" || test x"$build" != x"$host"; then
# GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
# GLIBCPP_CHECK_MATH_SUPPORT # GLIBCPP_CHECK_MATH_SUPPORT
case "$target" in case "${host}" in
*-freebsd*) *-freebsd*)
os_include_dir="os/bsd/freebsd" os_include_dir="os/bsd/freebsd"
AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
...@@ -329,6 +326,7 @@ if test -n "$with_cross_host" || test x"$build" != x"$host"; then ...@@ -329,6 +326,7 @@ if test -n "$with_cross_host" || test x"$build" != x"$host"; then
AC_DEFINE(HAVE_TANHF) AC_DEFINE(HAVE_TANHF)
;; ;;
*) *)
if test "x${with_newlib}" = "xyes"; then
os_include_dir="os/newlib" os_include_dir="os/newlib"
AC_DEFINE(HAVE_HYPOT) AC_DEFINE(HAVE_HYPOT)
...@@ -362,6 +360,9 @@ if test -n "$with_cross_host" || test x"$build" != x"$host"; then ...@@ -362,6 +360,9 @@ if test -n "$with_cross_host" || test x"$build" != x"$host"; then
AC_DEFINE(HAVE_SQRTF) AC_DEFINE(HAVE_SQRTF)
AC_DEFINE(HAVE_TANF) AC_DEFINE(HAVE_TANF)
AC_DEFINE(HAVE_TANHF) AC_DEFINE(HAVE_TANHF)
else
AC_MSG_ERROR([No support for this host/target combination.])
fi
;; ;;
esac esac
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment