This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] toplevel configure.in cleanup host makefrag


This cleans up host makefile fragment collection in top level configure.in,
which has to be done for autoconfiscation, but generates a lot of diff lines
to do not very much.  This is pretty simple; $host_makefile_frag only ever
contains one file, so assign to it rather than appending.

Tested on i686-pc-linux-gnu.

2002-05-12  Nathanael C. Nerode  <neroden@doctormoo.dyndns.org>
	* configure.in: simplify makefile fragment collection.

Index: configure.in
===================================================================
RCS file: /cvsroot/gcc/gcc/configure.in,v
retrieving revision 1.144
diff -c -3 -p -r1.144 configure.in
*** configure.in	5 May 2002 18:57:50 -0000	1.144
--- configure.in	12 May 2002 20:29:57 -0000
*************** case "${host}" in
*** 125,135 ****
    m68k-hp-hpux*)
      # Avoid "too much defining" errors from HPUX compiler.
      tentative_cc="cc -Wp,-H256000"
!     host_makefile_frag="${host_makefile_frag} config/mh-hp300"
      ;;
    m68k-apollo-sysv*)
      tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
!     host_makefile_frag="${host_makefile_frag} config/mh-apollo68"
      ;;
    m68k-apollo-bsd*)
      #None of the Apollo compilers can compile gas or binutils.  The preprocessor
--- 125,135 ----
    m68k-hp-hpux*)
      # Avoid "too much defining" errors from HPUX compiler.
      tentative_cc="cc -Wp,-H256000"
!     host_makefile_frag="config/mh-hp300"
      ;;
    m68k-apollo-sysv*)
      tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
!     host_makefile_frag="config/mh-apollo68"
      ;;
    m68k-apollo-bsd*)
      #None of the Apollo compilers can compile gas or binutils.  The preprocessor
*************** case "${host}" in
*** 139,172 ****
      # 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
      tentative_cc=gcc
!     host_makefile_frag="${host_makefile_frag} config/mh-a68bsd"
      ;;
    m88k-dg-dgux*)
      tentative_cc="gcc -Wall -ansi -D__using_DGUX"
!     host_makefile_frag="${host_makefile_frag} config/mh-dgux"
      ;;
    m88k-harris-cxux*)
      # Under CX/UX, we want to tell the compiler to use ANSI mode.
      tentative_cc="cc -Xa"
!     host_makefile_frag="${host_makefile_frag} config/mh-cxux"
      ;;
    m88k-motorola-sysv*)
!     host_makefile_frag="${host_makefile_frag} config/mh-delta88"
      ;;
    mips*-dec-ultrix*)
      tentative_cc="cc -Wf,-XNg1000"
!     host_makefile_frag="${host_makefile_frag} config/mh-decstation"
      ;;
    mips*-nec-sysv4*)
      # The C compiler on NEC MIPS SVR4 needs bigger tables.
      tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
!     host_makefile_frag="${host_makefile_frag} config/mh-necv4"
      ;;
    mips*-sgi-irix6*)
!     host_makefile_frag="${host_makefile_frag} config/mh-irix6"
      ;;
    mips*-sgi-irix5*)
!     host_makefile_frag="${host_makefile_frag} config/mh-irix5"
      ;;
    mips*-sgi-irix4*)
      # Tell compiler to use K&R C.  We can't compile under the SGI Ansi
--- 139,172 ----
      # 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
      tentative_cc=gcc
!     host_makefile_frag="config/mh-a68bsd"
      ;;
    m88k-dg-dgux*)
      tentative_cc="gcc -Wall -ansi -D__using_DGUX"
!     host_makefile_frag="config/mh-dgux"
      ;;
    m88k-harris-cxux*)
      # Under CX/UX, we want to tell the compiler to use ANSI mode.
      tentative_cc="cc -Xa"
!     host_makefile_frag="config/mh-cxux"
      ;;
    m88k-motorola-sysv*)
!     host_makefile_frag="config/mh-delta88"
      ;;
    mips*-dec-ultrix*)
      tentative_cc="cc -Wf,-XNg1000"
!     host_makefile_frag="config/mh-decstation"
      ;;
    mips*-nec-sysv4*)
      # The C compiler on NEC MIPS SVR4 needs bigger tables.
      tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
!     host_makefile_frag="config/mh-necv4"
      ;;
    mips*-sgi-irix6*)
!     host_makefile_frag="config/mh-irix6"
      ;;
    mips*-sgi-irix5*)
!     host_makefile_frag="config/mh-irix5"
      ;;
    mips*-sgi-irix4*)
      # Tell compiler to use K&R C.  We can't compile under the SGI Ansi
*************** case "${host}" in
*** 175,184 ****
      tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
      ;;
    mips*-sgi-irix3*)
!     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
      ;;
    mips*-*-sysv4*)
!     host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
      ;;
    mips*-*-sysv*)
      # This is for a MIPS running RISC/os 4.52C.
--- 175,184 ----
      tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
      ;;
    mips*-sgi-irix3*)
!     host_makefile_frag="config/mh-sysv"
      ;;
    mips*-*-sysv4*)
!     host_makefile_frag="config/mh-sysv4"
      ;;
    mips*-*-sysv*)
      # This is for a MIPS running RISC/os 4.52C.
*************** case "${host}" in
*** 194,217 ****
      # This is not part of CFLAGS because perhaps not all C compilers have this
      # option.
      tentative_cc="cc -systype sysv"
!     host_makefile_frag="${host_makefile_frag} config/mh-riscos"
      ;;
    i370-ibm-opened*)
      tentative_cc="c89"
!     host_makefile_frag="${host_makefile_frag} config/mh-openedition"
      ;;
    i[3456]86-*-sysv5*)
!     host_makefile_frag="${host_makefile_frag} config/mh-sysv5"
      ;;
    i[3456]86-*-dgux*)
      tentative_cc="gcc -Wall -ansi -D__using_DGUX"
!     host_makefile_frag="${host_makefile_frag} config/mh-dgux386"
      ;;
    i[3456]86-ncr-sysv4.3*)
      # The MetaWare compiler will generate a copyright message unless you
      # turn it off by adding the -Hnocopyr flag.
      tentative_cc="cc -Hnocopyr"
!     host_makefile_frag="${host_makefile_frag} config/mh-ncrsvr43"
      ;;
    i[3456]86-ncr-sysv4*)
      # for an NCR 3000 (i486/SVR4) system.
--- 194,217 ----
      # This is not part of CFLAGS because perhaps not all C compilers have this
      # option.
      tentative_cc="cc -systype sysv"
!     host_makefile_frag="config/mh-riscos"
      ;;
    i370-ibm-opened*)
      tentative_cc="c89"
!     host_makefile_frag="config/mh-openedition"
      ;;
    i[3456]86-*-sysv5*)
!     host_makefile_frag="config/mh-sysv5"
      ;;
    i[3456]86-*-dgux*)
      tentative_cc="gcc -Wall -ansi -D__using_DGUX"
!     host_makefile_frag="config/mh-dgux386"
      ;;
    i[3456]86-ncr-sysv4.3*)
      # The MetaWare compiler will generate a copyright message unless you
      # turn it off by adding the -Hnocopyr flag.
      tentative_cc="cc -Hnocopyr"
!     host_makefile_frag="config/mh-ncrsvr43"
      ;;
    i[3456]86-ncr-sysv4*)
      # for an NCR 3000 (i486/SVR4) system.
*************** case "${host}" in
*** 220,266 ****
      # you run it, but it chokes and dies on a whole bunch of GNU source
      # files.  Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
      tentative_cc="/usr/ccs/ATT/cc"
!     host_makefile_frag="${host_makefile_frag} config/mh-ncr3000"
      ;;
    i[3456]86-*-sco3.2v5*)
!     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
      ;;
    i[3456]86-*-sco*)
      # The native C compiler botches some simple uses of const.  Unfortunately,
      # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
      tentative_cc="cc -Dconst="
!     host_makefile_frag="${host_makefile_frag} config/mh-sco"
      ;;
    i[3456]86-*-udk*)
!     host_makefile_frag="${host_makefile_frag} config/mh-sysv5"
      ;;
    i[3456]86-*-isc*)
!     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
      ;;
    i[3456]86-*-solaris2*)
!     host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
      ;;
    i[3456]86-*-aix*)
!     host_makefile_frag="${host_makefile_frag} config/mh-aix386"
      ;;
    i[3456]86-*-msdosdjgpp*)
!     host_makefile_frag="${host_makefile_frag} config/mh-djgpp"
      ;;
    *-cygwin*)
!     host_makefile_frag="${host_makefile_frag} config/mh-cygwin"
      ;;
    *-mingw32*)
!     host_makefile_frag="${host_makefile_frag} config/mh-mingw32"
      ;;
    *-interix*)
!     host_makefile_frag="${host_makefile_frag} config/mh-interix"
      ;;
    vax-*-ultrix2*)
      # The old BSD pcc isn't up to compiling parts of gdb so use gcc
      tentative_cc=gcc
      ;;
    *-*-solaris2*)
!     host_makefile_frag="${host_makefile_frag} config/mh-solaris"
      ;;
    m68k-sun-sunos*)
      # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
--- 220,266 ----
      # you run it, but it chokes and dies on a whole bunch of GNU source
      # files.  Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
      tentative_cc="/usr/ccs/ATT/cc"
!     host_makefile_frag="config/mh-ncr3000"
      ;;
    i[3456]86-*-sco3.2v5*)
!     host_makefile_frag="config/mh-sysv"
      ;;
    i[3456]86-*-sco*)
      # The native C compiler botches some simple uses of const.  Unfortunately,
      # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
      tentative_cc="cc -Dconst="
!     host_makefile_frag="config/mh-sco"
      ;;
    i[3456]86-*-udk*)
!     host_makefile_frag="config/mh-sysv5"
      ;;
    i[3456]86-*-isc*)
!     host_makefile_frag="config/mh-sysv"
      ;;
    i[3456]86-*-solaris2*)
!     host_makefile_frag="config/mh-sysv4"
      ;;
    i[3456]86-*-aix*)
!     host_makefile_frag="config/mh-aix386"
      ;;
    i[3456]86-*-msdosdjgpp*)
!     host_makefile_frag="config/mh-djgpp"
      ;;
    *-cygwin*)
!     host_makefile_frag="config/mh-cygwin"
      ;;
    *-mingw32*)
!     host_makefile_frag="config/mh-mingw32"
      ;;
    *-interix*)
!     host_makefile_frag="config/mh-interix"
      ;;
    vax-*-ultrix2*)
      # The old BSD pcc isn't up to compiling parts of gdb so use gcc
      tentative_cc=gcc
      ;;
    *-*-solaris2*)
!     host_makefile_frag="config/mh-solaris"
      ;;
    m68k-sun-sunos*)
      # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
*************** case "${host}" in
*** 269,298 ****
      ;;
    *-hp-hpux[78]*)
      tentative_cc="cc -Wp,-H256000"
!     host_makefile_frag="${host_makefile_frag} config/mh-hpux8"
      ;;
    *-hp-hpux*)
      tentative_cc="cc -Wp,-H256000"
!     host_makefile_frag="${host_makefile_frag} config/mh-hpux"
      ;;
    *-*-hiux*)
      tentative_cc="cc -Wp,-H256000"
!     host_makefile_frag="${host_makefile_frag} config/mh-hpux"
      ;;
    rs6000-*-lynxos*)
      # /bin/cc is less than useful for our purposes.  Always use GCC
      tentative_cc="/usr/cygnus/progressive/bin/gcc"
!     host_makefile_frag="${host_makefile_frag} config/mh-lynxrs6k"
      ;;
    *-*-lynxos*)
      # /bin/cc is less than useful for our purposes.  Always use GCC
      tentative_cc="/bin/gcc"
      ;;
    *-*-sysv4*)
!     host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
      ;;
    *-*-sysv*)
!     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
      ;;
  esac
  fi
--- 269,298 ----
      ;;
    *-hp-hpux[78]*)
      tentative_cc="cc -Wp,-H256000"
!     host_makefile_frag="config/mh-hpux8"
      ;;
    *-hp-hpux*)
      tentative_cc="cc -Wp,-H256000"
!     host_makefile_frag="config/mh-hpux"
      ;;
    *-*-hiux*)
      tentative_cc="cc -Wp,-H256000"
!     host_makefile_frag="config/mh-hpux"
      ;;
    rs6000-*-lynxos*)
      # /bin/cc is less than useful for our purposes.  Always use GCC
      tentative_cc="/usr/cygnus/progressive/bin/gcc"
!     host_makefile_frag="config/mh-lynxrs6k"
      ;;
    *-*-lynxos*)
      # /bin/cc is less than useful for our purposes.  Always use GCC
      tentative_cc="/bin/gcc"
      ;;
    *-*-sysv4*)
!     host_makefile_frag="config/mh-sysv4"
      ;;
    *-*-sysv*)
!     host_makefile_frag="config/mh-sysv"
      ;;
  esac
  fi
*************** if test -n "${target_makefile_frag}" ; t
*** 1319,1324 ****
--- 1319,1336 ----
    target_makefile_frag=mt-frag
  fi
  
+ case "$host" in
+   *msdosdjgpp*)
+     enable_gdbtk=no ;;
+ esac
+ # Determine whether gdb needs tk/tcl or not.
+ case "$enable_gdbtk" in
+   no)
+     GDB_TK="" ;;
+   *)
+     GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui" ;;
+ esac
+ 
  # post-target:
  
  # Make sure that the compiler is able to generate an executable.  If it
*************** if test "${shared}" = "yes" ; then
*** 1389,1400 ****
    esac
  fi
  
! # Record target_configdirs and the configure arguments for target and
! # build configuration in Makefile.
! target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
! targargs=`echo "${arguments}" | \
  	sed -e 's/--no[^ 	]*//' \
  	    -e 's/--cache[a-z-]*=[^ 	]*//' \
  	    -e 's/--ho[a-z-]*=[^ 	]*//' \
  	    -e 's/--bu[a-z-]*=[^ 	]*//' \
  	    -e 's/--ta[a-z-]*=[^ 	]*//'`
--- 1401,1412 ----
    esac
  fi
  
! # Base args.  Strip norecursion, cache-file, srcdir, host, build, target.
! # These are the ones we might not want to pass down to subconfigures.
! baseargs=`echo "${arguments}" | \
  	sed -e 's/--no[^ 	]*//' \
  	    -e 's/--cache[a-z-]*=[^ 	]*//' \
+ 	    -e 's/--sr[a-z-]*=[^ 	]*//' \
  	    -e 's/--ho[a-z-]*=[^ 	]*//' \
  	    -e 's/--bu[a-z-]*=[^ 	]*//' \
  	    -e 's/--ta[a-z-]*=[^ 	]*//'`
*************** targargs=`echo "${arguments}" | \
*** 1402,1408 ****
  # For the build-side libraries, we just need to pretend we're native,
  # and not use the same cache file.  Multilibs are neither needed nor
  # desired.
! buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${targargs}"
  
  # Passing a --with-cross-host argument lets the target libraries know
  # whether they are being built with a cross-compiler or being built
--- 1414,1425 ----
  # For the build-side libraries, we just need to pretend we're native,
  # and not use the same cache file.  Multilibs are neither needed nor
  # desired.
! buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
! 
! # Record target_configdirs and the configure arguments for target and
! # build configuration in Makefile.
! target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
! targargs=${baseargs}
  
  # Passing a --with-cross-host argument lets the target libraries know
  # whether they are being built with a cross-compiler or being built


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]