This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[RFA:] (PR fortran/21184) config-lang.in: target_libs spawn


As mentioned in previous messages and on IRC.  This obsoletes previous
patches except the one for target-gperf in cp/config-lang.in which is a
separate issue; that's just a bug, but that fix should be committed
together with this bunch to avoid breaking cygwin.

To wit, the point is to stop building language front-ends where the target
library isn't supported, like target-libfortran for non-posix targets like
newlib or the java front end for any target that adds $libgcj to
noconfigdirs.  Some (...) even proceed to *test* without the target
libraries.

Note that the target_optional_libs variable isn't currently used: because
all subdirs are configured and built by default, there's no need to mark
some as special, optional.  That could now easily change, for example
building target-libffi only if building objc/++ or java and if it's not in
noconfigdirs or if requested by a --enable- option.

Configured for cris-axis-elf, cris-axis-aout, cris-axis-linux-gnu,
mmix-knuth-mmixware, i686-pc-cygwin, (native) i686-pc-linux-gnu and
observing the matching informational output from the configure script.
Also built cris-axis-elf and make dvi to test the doc change.

Ok to commit?

toplevel:
	PR fortran/21184
	* configure.in <lang_frag loop>: Disable langugages that have one
	or more of $target_libs $target_required_libs in $noconfigdirs.
	* configure: Regenerate.

gcc:
	* doc/sourcebuild.texi (Front End Config): Document partial
	split-up of target_libs introducing target_required_libs and
	target_optional_libs.

gcc/java:
	* config-lang.in (target_libs): Just set to target-libjava.
	(target_optional_libs, target_required_libs): New variables.

Index: sourcebuild.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/sourcebuild.texi,v
retrieving revision 1.72
diff -p -c -r1.72 sourcebuild.texi
*** sourcebuild.texi	15 Apr 2005 10:24:12 -0000	1.72
--- sourcebuild.texi	6 Jun 2005 03:39:46 -0000
*************** Java front end depends on the C++ front 
*** 682,689 ****
  @samp{lang_requires=c++}.
  @item target_libs
  If defined, this variable lists (space-separated) targets in the top
! level @file{Makefile} to build the runtime libraries for this
! language, such as @code{target-libobjc}.
  @item lang_dirs
  If defined, this variable lists (space-separated) top level
  directories (parallel to @file{gcc}), apart from the runtime libraries,
--- 682,702 ----
  @samp{lang_requires=c++}.
  @item target_libs
  If defined, this variable lists (space-separated) targets in the top
! level @file{Makefile} to build required parts of runtime libraries for
! this language, such as @code{target-libobjc}.  This includes both
! libraries that are unusable on their own, and libraries that can't be
! built without this language.
! @item target_required_libs
! If defined, this variable lists (space-separated) targets in the top
! level @file{Makefile} to build required parts of the runtime libraries
! for this language.  This includes targets that are also usable on their
! own, without this language.
! @item target_optional_libs
! If defined, this variable lists (space-separated) targets in the top
! level @file{Makefile} to build optional parts of the runtime libraries
! for this language, such as @code{target-boehm-gc} for the Java language.
! Targets in this list may be unsupported for some configurations and
! required for others.
  @item lang_dirs
  If defined, this variable lists (space-separated) top level
  directories (parallel to @file{gcc}), apart from the runtime libraries,

Index: config-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/config-lang.in,v
retrieving revision 1.17
diff -p -c -r1.17 config-lang.in
*** config-lang.in	4 May 2005 01:46:40 -0000	1.17
--- config-lang.in	6 Jun 2005 04:14:19 -0000
*************** stagestuff="jc1\$(exeext) gcj\$(exeext) 
*** 38,44 ****
  
  gtfiles="\$(srcdir)/java/java-tree.h \$(srcdir)/java/jcf.h \$(srcdir)/java/lex.h \$(srcdir)/java/parse.h \$(srcdir)/java/builtins.c \$(srcdir)/java/class.c \$(srcdir)/java/constants.c \$(srcdir)/java/decl.c \$(srcdir)/java/expr.c \$(srcdir)/java/jcf-parse.c \$(srcdir)/java/jcf-write.c \$(srcdir)/java/lang.c \$(srcdir)/java/mangle.c \$(srcdir)/java/parse.y \$(srcdir)/java/resource.c"
  
! target_libs=${libgcj_saved}
  lang_dirs="zlib fastjar"
  #build_by_default=no
  lang_requires=c++
--- 38,46 ----
  
  gtfiles="\$(srcdir)/java/java-tree.h \$(srcdir)/java/jcf.h \$(srcdir)/java/lex.h \$(srcdir)/java/parse.h \$(srcdir)/java/builtins.c \$(srcdir)/java/class.c \$(srcdir)/java/constants.c \$(srcdir)/java/decl.c \$(srcdir)/java/expr.c \$(srcdir)/java/jcf-parse.c \$(srcdir)/java/jcf-write.c \$(srcdir)/java/lang.c \$(srcdir)/java/mangle.c \$(srcdir)/java/parse.y \$(srcdir)/java/resource.c"
  
! target_libs="target-libjava"
! target_optional_libs="target-boehm-gc target-qthreads target-libffi"
! target_required_libs="target-zlib"
  lang_dirs="zlib fastjar"
  #build_by_default=no
  lang_requires=c++
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.352
diff -p -c -r1.352 configure.in
*** configure.in	4 Jun 2005 22:30:56 -0000	1.352
--- configure.in	6 Jun 2005 03:49:51 -0000
*************** host_libs="intl mmalloc libiberty opcode
*** 132,138 ****
  # "make check" in that particular order.
  host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
  
! # libgcj represents the runtime libraries only used by gcj.
  libgcj="target-libffi \
  	target-boehm-gc \
  	target-zlib \
--- 132,138 ----
  # "make check" in that particular order.
  host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
  
! # libgcj represents the runtime libraries used mostly (for some, only) by gcj.
  libgcj="target-libffi \
  	target-boehm-gc \
  	target-zlib \
*************** if test -d ${srcdir}/gcc; then
*** 1165,1170 ****
--- 1165,1172 ----
          # $lang_dirs, $boot_language, and $build_by_default
          language=
          target_libs=
+         target_required_libs=
+         target_optional_libs=
          lang_dirs=
          boot_language=
          build_by_default=
*************** if test -d ${srcdir}/gcc; then
*** 1210,1216 ****
              add_this_lang=no
              ;;
          esac
!         
  	case $add_this_lang in
  	  no)
              # Remove language-dependent dirs.
--- 1212,1231 ----
              add_this_lang=no
              ;;
          esac
! 
! 	# Disable languages that have one or more necessary target libraries
! 	# in $noconfigdirs.  We iterate on $noconfigdirs to avoid
! 	# testing for whitespace other than space (like TAB) in
! 	# $noconfigdirs: in contrast, target_required_libs and
! 	# target_libs are documented as actually "space-separated".
! 	for target_nonlib in $noconfigdirs .. ; do
! 	  case " $target_libs $target_required_libs " in
! 	    *" $target_nonlib "*)
! 	      add_this_lang=no
! 	      ;;
! 	  esac
! 	done
! 
  	case $add_this_lang in
  	  no)
              # Remove language-dependent dirs.

brgds, H-P


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