Re: Remove old host cases from toplevel configure

2011-04-01 Thread Ralf Wildenhues
* Joseph S. Myers wrote on Fri, Apr 01, 2011 at 02:40:45PM CEST:
> OK to commit this patch to remove this code?

OK.

Thanks,
Ralf

> 2011-04-01  Joseph Myers  
> 
>   * configure.ac: Remove code setting CONFIG_SHELL, config_shell and
>   moveifchange.
>   * configure: Regenerate.
>   * Makefile.tpl: Use @SHELL@ not @config_shell@.
>   * Makefile.in: Regenerate.


Re: Remove old host cases from toplevel configure

2011-04-01 Thread Joseph S. Myers
On Fri, 25 Mar 2011, Paolo Bonzini wrote:

> On 03/24/2011 08:49 PM, Joseph S. Myers wrote:
> > Related to that point, I notice a piece of code starting "we might need to
> > use some other shell than /bin/sh for running subshells" that tries to
> > determine a shell on Windows hosts.  It's autoconf's job to find a
> > suitable shell, so if this code is still relevant I think there's
> > something missing in autoconf.
> 
> That code is dead because
> 
>   if test x${CONFIG_SHELL} = x ; then
> 
> will never be true.

OK to commit this patch to remove this code?

2011-04-01  Joseph Myers  

* configure.ac: Remove code setting CONFIG_SHELL, config_shell and
moveifchange.
* configure: Regenerate.
* Makefile.tpl: Use @SHELL@ not @config_shell@.
* Makefile.in: Regenerate.

Index: configure.ac
===
--- configure.ac(revision 171827)
+++ configure.ac(working copy)
@@ -89,42 +89,6 @@
 AC_PROG_SED
 AC_PROG_AWK
 
-### we might need to use some other shell than /bin/sh for running subshells
-### If we are on Windows, search for the shell.  This will permit people
-### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
-### without also having to set CONFIG_SHELL.  This code will work when
-### using bash, which sets OSTYPE.
-case "${OSTYPE}" in
-*win32*)
-  if test x${CONFIG_SHELL} = x ; then
-if test ! -f /bin/sh ; then
-  if test x${SHELL} != x && test -f ${SHELL} ; then
-   CONFIG_SHELL=${SHELL}
-   export CONFIG_SHELL
-  else
-   for prog in sh sh.exe bash bash.exe; do
- IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
-   test -z "$dir" && dir=.
-   if test -f $dir/$prog; then
- CONFIG_SHELL=$dir/$prog
- export CONFIG_SHELL
- break
-   fi
- done
- IFS="$save_ifs"
- test -n "${CONFIG_SHELL}" && break
-   done
-  fi
-fi
-  fi
-  ;;
-esac
-
-config_shell=${CONFIG_SHELL-/bin/sh}
-
-moveifchange=${srcdir}/move-if-change
-
 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
 
 # We pass INSTALL explicitly to sub-makes.  Make sure that it is not
@@ -3019,7 +2983,6 @@
 AC_SUBST(RANLIB_FOR_BUILD)
 AC_SUBST(WINDMC_FOR_BUILD)
 AC_SUBST(WINDRES_FOR_BUILD)
-AC_SUBST(config_shell)
 
 # Generate default definitions for YACC, M4, LEX and other programs that run
 # on the build machine.  These are used if the Makefile can't locate these
Index: Makefile.tpl
===
--- Makefile.tpl(revision 171827)
+++ Makefile.tpl(working copy)
@@ -323,7 +323,7 @@
 # Programs producing files for the BUILD machine
 # --
 
-SHELL = @config_shell@
+SHELL = @SHELL@
 
 # pwd command to use.  Allow user to override default by setting PWDCMD in
 # the environment to account for automounters.  The make variable must not

-- 
Joseph S. Myers
jos...@codesourcery.com


Re: Remove old host cases from toplevel configure

2011-03-25 Thread Paolo Bonzini

On 03/24/2011 08:49 PM, Joseph S. Myers wrote:

Related to that point, I notice a piece of code starting "we might need to
use some other shell than /bin/sh for running subshells" that tries to
determine a shell on Windows hosts.  It's autoconf's job to find a
suitable shell, so if this code is still relevant I think there's
something missing in autoconf.


That code is dead because

  if test x${CONFIG_SHELL} = x ; then

will never be true.

Paolo


Re: Remove old host cases from toplevel configure

2011-03-24 Thread Joseph S. Myers
On Thu, 24 Mar 2011, Joseph S. Myers wrote:

> Furthermore, the whole idea of the toplevel configure tentative_cc
> setting code is dubious since this is an autoconf-generated script and
> it's autoconf's job to deal with finding a working compiler, putting
> it in ANSI C mode, etc. - so if someone did wish to resupport one of

Related to that point, I notice a piece of code starting "we might need to 
use some other shell than /bin/sh for running subshells" that tries to 
determine a shell on Windows hosts.  It's autoconf's job to find a 
suitable shell, so if this code is still relevant I think there's 
something missing in autoconf.

-- 
Joseph S. Myers
jos...@codesourcery.com


Re: Remove old host cases from toplevel configure

2011-03-24 Thread Paolo Bonzini

On 03/24/2011 03:11 PM, Joseph S. Myers wrote:

Furthermore, the whole idea of the toplevel configure tentative_cc
setting code is dubious since this is an autoconf-generated script and
it's autoconf's job to deal with finding a working compiler, putting
it in ANSI C mode, etc. - so if someone did wish to resupport one of
these hosts (and in the unlikely event that building current tools
using the old system compiler is at all possible) it would be better
to put system-specific pieces in autoconf and make toolchain configure
code work using features not host triplet tests as far as possible.


100% agreed, I've meant to clean this up for a long time.


OK to commit?


Yes, thank you very much.

Paolo


Remove old host cases from toplevel configure

2011-03-24 Thread Joseph S. Myers
This patch removes cases for a range of old hosts from the toplevel
configure.ac, as I think those cases are no longer useful.  All the
removed code comes from Cygnus configure before the toplevel configure
was converted to be an autoconf-generated script.

In general those hosts, if ever supported as targets by GCC at all,
had their GCC target support obsoleted in GCC 4.3 or earlier.  It is
of course theoretically possible to build cross tools hosted on a
system not supported as a target by GCC, using a non-GCC compiler, but
it's much more of a niche than building native tools there and these
targets all became unsupported for native tools a long time ago for
lack of interest in maintaining support for them.  Thus I don't think
it's useful any more to maintain cases for these hosts in toplevel
configure.

Furthermore, the whole idea of the toplevel configure tentative_cc
setting code is dubious since this is an autoconf-generated script and
it's autoconf's job to deal with finding a working compiler, putting
it in ANSI C mode, etc. - so if someone did wish to resupport one of
these hosts (and in the unlikely event that building current tools
using the old system compiler is at all possible) it would be better
to put system-specific pieces in autoconf and make toolchain configure
code work using features not host triplet tests as far as possible.

OK to commit?

2011-03-24  Joseph Myers  

* configure.ac (i[[3456789]]86-*-vsta, i[[3456789]]86-*-go32*,
i[[3456789]]86-*-beos*, powerpc-*-beos*, m68k-hp-hpux*,
m68k-apollo-sysv*, m68k-apollo-bsd*, m88k-dg-dgux*,
m88k-harris-cxux*, m88k-motorola-sysv*, mips*-dec-ultrix*,
mips*-nec-sysv4*, mips*-sgi-irix4*, mips*-*-sysv4*, mips*-*-sysv*,
i370-ibm-opened*, i[[3456789]]86-*-sysv5*, i[[3456789]]86-*-dgux*,
i[[3456789]]86-ncr-sysv4.3*, i[[3456789]]86-ncr-sysv4*,
i[[3456789]]86-*-sco3.2v5*, i[[3456789]]86-*-sco*,
i[[3456789]]86-*-udk*, vax-*-ultrix2*, m68k-sun-sunos*,
hppa*-*-hiux*, *-*-hiux*, rs6000-*-lynxos*, *-*-sysv4*,
*-*-rhapsody*): Remove host cases.
* configure: Regenerate.

config:
2011-03-24  Joseph Myers  

* mh-cxux, mh-decstation, mh-dgux386, mh-lynxrs6k, mh-ncr3000,
mh-necv4, mh-sco, mh-sysv5: Remove.

Index: configure.ac
===
--- configure.ac(revision 171390)
+++ configure.ac(working copy)
@@ -429,10 +429,7 @@
   hppa*64*-*-*)
 noconfigdirs="$noconfigdirs byacc"
 ;;
-  i[[3456789]]86-*-vsta)
-noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch 
flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
-;;
-  i[[3456789]]86-*-go32* | i[[3456789]]86-*-msdosdjgpp*)
+  i[[3456789]]86-*-msdosdjgpp*)
 noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile 
itcl gnuserv libffi"
 ;;
   x86_64-*-mingw*)
@@ -442,18 +439,12 @@
 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc 
send-pr uudecode dejagnu diff guile perl itcl gnuserv"
 noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs 
guile perl texinfo libtool newlib"
 ;;
-  i[[3456789]]86-*-beos*)
-noconfigdirs="$noconfigdirs tk itcl libgui gdb"
-;;
   *-*-cygwin*)
 noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
 ;;
   *-*-netbsd*)
 noconfigdirs="$noconfigdirs rcs"
 ;;
-  powerpc-*-beos*)
-noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
-;;
 esac
 
 
@@ -966,8 +957,6 @@
 ;;
   sh-*-* | sh64-*-*)
 case "${host}" in
-  i[[3456789]]86-*-vsta) ;; # don't add gprof back in
-  i[[3456789]]86-*-go32*) ;; # don't add gprof back in
   i[[3456789]]86-*-msdosdjgpp*) ;; # don't add gprof back in
   *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
 esac
@@ -1049,104 +1038,6 @@
 host_makefile_frag=/dev/null
 if test -d ${srcdir}/config ; then
 case "${host}" in
-  m68k-hp-hpux*)
-# Avoid "too much defining" errors from HPUX compiler.
-tentative_cc="cc -Wp,-H256000"
-# If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
-# If it's HP/UX ar, this should be harmless.
-RANLIB="ar ts"
-;;
-  m68k-apollo-sysv*)
-tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
-;;
-  m68k-apollo-bsd*)
-#None of the Apollo compilers can compile gas or binutils.  The 
preprocessor
-# chokes on bfd, the compiler won't let you assign integers to enums, and
-# other problems.  Defining CC to gcc is a questionable way to say "don't 
use
-# the apollo compiler" (the preferred version of GCC could be called cc,
-# or whatever), but I'm not sure leaving CC as cc is any better...
-#CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
-# Used to have BISON=yacc.
-tentative_cc=gcc
-;;
-  m88k-dg-dgux*)
-