[libstdc++] Do configury choies on target, not target_alias

Phil Edwards phil@jaj.com
Thu Oct 3 16:52:00 GMT 2002


On Thu, Oct 03, 2002 at 08:34:08AM -0400, Phil Edwards wrote:
> On Thu, Oct 03, 2002 at 11:22:22AM +0530, Ranjit Mathew wrote:
> > OK, got it. I put in a few "echo's" in the configure script and
> > this is what I get (I explicitly specify "--target=mingw32"):
> 
> I'm vaguely surprised that works.  My impression was that --target should
> be specified as a full triplet, or at least a double.
> 
> 
> > target_alias=mingw32    (Both before and after the assigment above)
> > target=i386-pc-mingw32  (Orig. "mingw32", changed by config.sub to this)
> 
> Right.  'target' is always changed to the official form; 'target_alias'
> is whatever the user typed.
> 
> 
> > IMO then the "case switches" later should either be based on "target"
> 
> Probably, yes.  I could have sworn we changed this already...

Nope, I only thought about changing it, then decided that target_alias
was safe.  Guess I missed a few spots.

This only changes the switch stmts in configure.in to use the canonical form.
We continue to use target_alias in the staging include dir as the name of
the target-specific directory (because that /is/ safe), and for building
installation pathnames (because that's what GCC/toplevel currently does,
and we should match).

Also I updated the porting comments/docs.

The switch stmts only affect cross compilers.  I tried building one using
the target in question ("--target=mingw32"), but configure died somewhere
in the binutils.  So I'm not committing this until somebody else can
sanity-check it first, while I go hunt down binutils braindamage.


Phil


Index: configure.in
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/libstdc++-v3/configure.in,v
retrieving revision 1.105
diff -u -3 -r1.105 configure.in
--- configure.in	26 Sep 2002 05:25:05 -0000	1.105
+++ configure.in	3 Oct 2002 23:23:19 -0000
@@ -102,7 +102,7 @@
   # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
   # GLIBCPP_CHECK_MATH_SUPPORT
 
-  case "$target_alias" in
+  case "$target" in
     *-linux*)
       os_include_dir="os/gnu-linux"
       AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
@@ -147,7 +147,7 @@
       AC_DEFINE(HAVE_COPYSIGNF)
       AC_DEFINE(HAVE_FREXPF)
       AC_DEFINE(HAVE_HYPOT)
-      case "$target_alias" in
+      case "$target" in
         *-hpux10*)
           AC_DEFINE(HAVE_FINITE)
           AC_DEFINE(HAVE_FINITEF)
@@ -224,7 +224,7 @@
       ;;
   esac
 
-  case "$target_alias" in
+  case "$target" in
     *-mingw32*)
       ;;
     *-windiss*)



More information about the Libstdc++ mailing list