aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZiemowit Laski <zlaski@apple.com>2004-08-10 22:58:12 +0000
committerZiemowit Laski <zlaski@apple.com>2004-08-10 22:58:12 +0000
commita7f635ffffd4f61cb8619c66822eccd817715ae7 (patch)
tree99047c12f5f3f08e9a161636721ac0a182813f66
parentc15dabd0bbab061ef8770a019f34614f97a1da67 (diff)
[ChangeLog.objc-improvements]
2004-08-10 Ziemowit Laski <zlaski@apple.com> Sync up with HEAD.2004-08-08T23:33:48+0000. [gcc/objc/ChangeLog.objc-improvements] 2004-08-10 Ziemowit Laski <zlaski@apple.com> * objc-act.c (string_descriptor): New type. (string_htab): New hash table, for constant strings. (string_hash, string_eq): New functions. (hash_init): Initialize string_htab hash table. (objc_build_string_object): Unique string objects using the string_htab hash table. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/objc-improvements-branch@85772 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog17
-rw-r--r--ChangeLog.objc-improvements4
-rw-r--r--MAINTAINERS1
-rw-r--r--Makefile.def235
-rw-r--r--Makefile.in596
-rw-r--r--Makefile.tpl241
-rwxr-xr-xconfigure160
-rw-r--r--configure.in3
-rw-r--r--gcc/ChangeLog395
-rw-r--r--gcc/Makefile.in83
-rw-r--r--gcc/basic-block.h9
-rw-r--r--gcc/c-common.c43
-rw-r--r--gcc/c-common.h2
-rw-r--r--gcc/c-cppbuiltin.c30
-rw-r--r--gcc/c-decl.c148
-rw-r--r--gcc/c-lex.c58
-rw-r--r--gcc/c-opts.c6
-rw-r--r--gcc/c-semantics.c39
-rw-r--r--gcc/c-typeck.c2
-rw-r--r--gcc/c.opt4
-rw-r--r--gcc/cfg.c98
-rw-r--r--gcc/cfgbuild.c2
-rw-r--r--gcc/cfgcleanup.c8
-rw-r--r--gcc/cfgexpand.c2
-rw-r--r--gcc/cfglayout.c67
-rw-r--r--gcc/common.opt4
-rw-r--r--gcc/config.gcc29
-rw-r--r--gcc/dbxout.c119
-rw-r--r--gcc/defaults.h14
-rw-r--r--gcc/errors.c8
-rw-r--r--gcc/expr.c19
-rw-r--r--gcc/final.c1
-rw-r--r--gcc/fold-const.c276
-rw-r--r--gcc/function.c46
-rw-r--r--gcc/gengtype.c2
-rw-r--r--gcc/genpreds.c3
-rw-r--r--gcc/ggc-none.c4
-rw-r--r--gcc/gimplify.c9
-rw-r--r--gcc/loop-iv.c48
-rw-r--r--gcc/modulo-sched.c193
-rw-r--r--gcc/params.def6
-rw-r--r--gcc/passes.c36
-rw-r--r--gcc/predict.c4
-rw-r--r--gcc/print-rtl.c1
-rw-r--r--gcc/profile.c1
-rw-r--r--gcc/rtl.h46
-rw-r--r--gcc/sched-rgn.c37
-rw-r--r--gcc/target-def.h7
-rw-r--r--gcc/target.h2
-rw-r--r--gcc/toplev.c2
-rw-r--r--gcc/toplev.h2
-rw-r--r--gcc/tree-cfg.c29
-rw-r--r--gcc/tree-flow.h4
-rw-r--r--gcc/tree-inline.c35
-rw-r--r--gcc/tree-into-ssa.c18
-rw-r--r--gcc/tree-pretty-print.c6
-rw-r--r--gcc/tree-profile.c3
-rw-r--r--gcc/tree-ssa-loop-ch.c63
-rw-r--r--gcc/tree-ssa-loop-im.c7
-rw-r--r--gcc/tree-ssa-loop.c9
-rw-r--r--gcc/tree-ssanames.c69
-rw-r--r--gcc/tree-tailcall.c12
-rw-r--r--gcc/tree.c82
-rw-r--r--gcc/tree.def4
-rw-r--r--gcc/tree.h20
-rw-r--r--gcc/varasm.c38
-rw-r--r--gcc/version.c2
-rw-r--r--libgfortran/ChangeLog21
-rw-r--r--libgfortran/Makefile.am1
-rw-r--r--libgfortran/Makefile.in12
-rw-r--r--libgfortran/libgfortran.h7
-rw-r--r--libjava/ChangeLog40
-rw-r--r--libjava/Makefile.am55
-rw-r--r--libjava/Makefile.in46
-rw-r--r--libjava/acconfig.h2
-rw-r--r--libjava/acinclude.m42
-rw-r--r--libjava/aclocal.m42
-rwxr-xr-xlibjava/configure273
-rw-r--r--libjava/configure.in253
-rw-r--r--libstdc++-v3/ChangeLog21
80 files changed, 2916 insertions, 1392 deletions
diff --git a/ChangeLog b/ChangeLog
index c740d19aeef..26c0b8c8a45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2004-08-06 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (bfd, opcodes, gcc, zlib): Mark as bootstrap module.
+ (bison, byacc, flex, texinfo): Do not mark as bootstrap module.
+ (Dependencies): New section.
+ * Makefile.tpl (Dependencies): Generate from Makefile.def.
+ (configure-target-[+module+]): Depend on maybe-all-gcc
+ (all-prebootstrap): New name of all-bootstrap. Changed throughout.
+ (toplevel profiledbootstrap): Fix dependencies.
+ * Makefile.in: Regenerate.
+
+2004-08-03 Mark Mitchell <mark@codesourcery.com>
+
+ * configure.in (arm*-*-symbianelf*): Add ${libgcj} and
+ target-libiberty to noconfigdirs.
+ * configure: Regenerate.
+
2004-08-03 Paul Brook <paul@codesourcery.com>
* configure.in: Check for MPFR as well as GMP.
diff --git a/ChangeLog.objc-improvements b/ChangeLog.objc-improvements
index 8cf0250ea1b..09a1bfaae7e 100644
--- a/ChangeLog.objc-improvements
+++ b/ChangeLog.objc-improvements
@@ -1,3 +1,7 @@
+2004-08-10 Ziemowit Laski <zlaski@apple.com>
+
+ Sync up with HEAD.2004-08-08T23:33:48+0000.
+
2004-08-06 Ziemowit Laski <zlaski@apple.com>
Sync up with HEAD.2004-08-04T02:29:10+0000.
diff --git a/MAINTAINERS b/MAINTAINERS
index 468631b4c51..7b955319189 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -86,6 +86,7 @@ xtensa port Bob Wilson bob.wilson@acm.org
OS Port Maintainers (OS alphabetical order)
darwin port Stan Shebs shebs@apple.com
+darwin port Dale Johannesen dalej@apple.com
DJGPP DJ Delorie dj@delorie.com
freebsd Loren J. Rittle ljrittle@acm.org
netbsd Jason Thorpe thorpej@wasabisystems.com
diff --git a/Makefile.def b/Makefile.def
index b7aa7984cee..f19b2698521 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -36,11 +36,11 @@ host_modules= { module= ash; };
host_modules= { module= autoconf; };
host_modules= { module= automake; };
host_modules= { module= bash; };
-host_modules= { module= bfd; };
-host_modules= { module= opcodes; };
+host_modules= { module= bfd; bootstrap=true; };
+host_modules= { module= opcodes; bootstrap=true; };
host_modules= { module= binutils; bootstrap=true; };
-host_modules= { module= bison; no_check_cross= true; bootstrap=true; };
-host_modules= { module= byacc; no_check_cross= true; bootstrap=true; };
+host_modules= { module= bison; no_check_cross= true; };
+host_modules= { module= byacc; no_check_cross= true; };
host_modules= { module= bzip2; };
host_modules= { module= dejagnu; };
host_modules= { module= diff; };
@@ -50,9 +50,10 @@ host_modules= { module= fastjar; no_check_cross= true; };
host_modules= { module= fileutils; };
host_modules= { module= findutils; };
host_modules= { module= find; };
-host_modules= { module= flex; no_check_cross= true; bootstrap=true; };
+host_modules= { module= flex; no_check_cross= true; };
host_modules= { module= gas; bootstrap=true; };
-host_modules= { module= gcc; extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
+host_modules= { module= gcc; bootstrap=true;
+ extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
host_modules= { module= gawk; };
host_modules= { module= gettext; };
host_modules= { module= gnuserv; };
@@ -86,7 +87,7 @@ host_modules= { module= shellutils; };
host_modules= { module= sid; };
host_modules= { module= sim; };
host_modules= { module= tar; };
-host_modules= { module= texinfo; no_install= true; bootstrap=true; };
+host_modules= { module= texinfo; no_install= true; };
host_modules= { module= textutils; };
host_modules= { module= time; };
host_modules= { module= uudecode; };
@@ -221,6 +222,226 @@ flags_to_pass = { flag= NM_FOR_TARGET ; };
flags_to_pass = { flag= RANLIB_FOR_TARGET ; };
flags_to_pass = { flag= WINDRES_FOR_TARGET ; };
+// Inter-module dependencies
+
+// Build modules
+dependencies = { module=all-build-bison; on=all-build-texinfo; };
+dependencies = { module=all-build-byacc; on=all-build-texinfo; };
+dependencies = { module=all-build-flex; on=all-build-texinfo; };
+dependencies = { module=all-build-flex; on=all-build-bison; };
+dependencies = { module=all-build-flex; on=all-build-byacc; };
+dependencies = { module=all-build-flex; on=all-build-m4; };
+dependencies = { module=all-build-libiberty; on=all-build-texinfo; };
+dependencies = { module=all-build-m4; on=all-build-texinfo; };
+
+// Host modules specific to gcc.
+dependencies = { module=configure-gcc; on=configure-intl; };
+dependencies = { module=configure-gcc; on=configure-binutils; };
+dependencies = { module=configure-gcc; on=configure-gas; };
+dependencies = { module=configure-gcc; on=configure-ld; };
+dependencies = { module=configure-gcc; on=configure-bison; };
+dependencies = { module=configure-gcc; on=configure-flex; };
+dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
+dependencies = { module=all-gcc; on=all-intl; };
+dependencies = { module=all-gcc; on=all-texinfo; };
+dependencies = { module=all-gcc; on=all-bison; };
+dependencies = { module=all-gcc; on=all-byacc; };
+dependencies = { module=all-gcc; on=all-flex; };
+dependencies = { module=all-gcc; on=all-binutils; };
+dependencies = { module=all-gcc; on=all-gas; };
+dependencies = { module=all-gcc; on=all-ld; };
+dependencies = { module=all-gcc; on=all-zlib; };
+dependencies = { module=all-gcc; on=all-libbanshee; };
+dependencies = { module=all-gcc; on=all-libcpp; hard=true; };
+dependencies = { module=all-gcc; on=all-build-libiberty; };
+
+dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
+dependencies = { module=configure-libcpp; on=configure-intl; };
+dependencies = { module=all-libcpp; on=all-libiberty; hard=true; };
+dependencies = { module=all-libcpp; on=all-intl; };
+
+// Host modules specific to gdb.
+dependencies = { module=configure-gdb; on=configure-itcl; };
+dependencies = { module=configure-gdb; on=configure-tcl; };
+dependencies = { module=configure-gdb; on=configure-tk; };
+dependencies = { module=configure-gdb; on=configure-sim; };
+dependencies = { module=all-gdb; on=all-libiberty; };
+dependencies = { module=all-gdb; on=all-opcodes; };
+dependencies = { module=all-gdb; on=all-bfd; };
+dependencies = { module=all-gdb; on=all-mmalloc; };
+dependencies = { module=all-gdb; on=all-readline; };
+dependencies = { module=all-gdb; on=all-bison; };
+dependencies = { module=all-gdb; on=all-byacc; };
+dependencies = { module=all-gdb; on=all-sim; };
+dependencies = { module=install-gdb; on=install-tcl; };
+dependencies = { module=install-gdb; on=install-tk; };
+dependencies = { module=install-gdb; on=install-itcl; };
+dependencies = { module=install-gdb; on=install-tix; };
+dependencies = { module=install-gdb; on=install-libgui; };
+
+dependencies = { module=configure-libgui; on=configure-tcl; };
+dependencies = { module=configure-libgui; on=configure-tk; };
+dependencies = { module=all-libgui; on=all-tcl; };
+dependencies = { module=all-libgui; on=all-tk; };
+dependencies = { module=all-libgui; on=all-itcl; };
+
+// Host modules specific to binutils.
+dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; };
+dependencies = { module=all-bfd; on=all-libiberty; };
+dependencies = { module=all-bfd; on=all-intl; };
+
+dependencies = { module=all-binutils; on=all-libiberty; };
+dependencies = { module=all-binutils; on=all-opcodes; };
+dependencies = { module=all-binutils; on=all-bfd; };
+dependencies = { module=all-binutils; on=all-flex; };
+dependencies = { module=all-binutils; on=all-bison; };
+dependencies = { module=all-binutils; on=all-byacc; };
+dependencies = { module=all-binutils; on=all-intl; };
+
+// We put install-opcodes before install-binutils because the installed
+// binutils might be on PATH, and they might need the shared opcodes
+// library.
+dependencies = { module=install-binutils; on=install-opcodes; };
+
+// libopcodes depends on libbfd
+dependencies = { module=install-opcodes; on=install-bfd; };
+
+dependencies = { module=all-gas; on=all-libiberty; };
+dependencies = { module=all-gas; on=all-opcodes; };
+dependencies = { module=all-gas; on=all-bfd; };
+dependencies = { module=all-gas; on=all-intl; };
+dependencies = { module=all-gprof; on=all-libiberty; };
+dependencies = { module=all-gprof; on=all-bfd; };
+dependencies = { module=all-gprof; on=all-opcodes; };
+dependencies = { module=all-gprof; on=all-intl; };
+dependencies = { module=all-ld; on=all-libiberty; };
+dependencies = { module=all-ld; on=all-bfd; };
+dependencies = { module=all-ld; on=all-opcodes; };
+dependencies = { module=all-ld; on=all-bison; };
+dependencies = { module=all-ld; on=all-byacc; };
+dependencies = { module=all-ld; on=all-flex; };
+dependencies = { module=all-ld; on=all-intl; };
+
+dependencies = { module=all-opcodes; on=all-bfd; };
+dependencies = { module=all-opcodes; on=all-libiberty; };
+
+// Other host modules in the 'src' repository.
+dependencies = { module=all-dejagnu; on=all-tcl; };
+dependencies = { module=all-dejagnu; on=all-expect; };
+dependencies = { module=all-dejagnu; on=all-tk; };
+dependencies = { module=configure-expect; on=configure-tcl; };
+dependencies = { module=configure-expect; on=configure-tk; };
+dependencies = { module=all-expect; on=all-tcl; };
+dependencies = { module=all-expect; on=all-tk; };
+
+// We put install-tcl before install-itcl because itcl wants to run a
+// program on installation which uses the Tcl libraries.
+dependencies = { module=configure-itcl; on=configure-tcl; };
+dependencies = { module=configure-itcl; on=configure-tk; };
+dependencies = { module=all-itcl; on=all-tcl; };
+dependencies = { module=all-itcl; on=all-tk; };
+dependencies = { module=install-itcl; on=install-tcl; };
+
+dependencies = { module=configure-tk; on=configure-tcl; };
+dependencies = { module=all-tk; on=all-tcl; };
+dependencies = { module=configure-tix; on=configure-tcl; };
+dependencies = { module=configure-tix; on=configure-tk; };
+dependencies = { module=all-tix; on=all-tcl; };
+dependencies = { module=all-tix; on=all-tk; };
+
+dependencies = { module=all-sid; on=all-libiberty; };
+dependencies = { module=all-sid; on=all-bfd; };
+dependencies = { module=all-sid; on=all-opcodes; };
+dependencies = { module=all-sid; on=all-tcl; };
+dependencies = { module=all-sid; on=all-tk; };
+dependencies = { module=install-sid; on=install-tcl; };
+dependencies = { module=install-sid; on=install-tk; };
+
+dependencies = { module=all-sim; on=all-libiberty; };
+dependencies = { module=all-sim; on=all-bfd; };
+dependencies = { module=all-sim; on=all-opcodes; };
+dependencies = { module=all-sim; on=all-readline; };
+dependencies = { module=all-sim; on=configure-gdb; };
+
+// Other host modules.
+dependencies = { module=all-fastjar; on=all-zlib; };
+dependencies = { module=all-fastjar; on=all-texinfo; };
+dependencies = { module=all-fastjar; on=all-libiberty; };
+
+// Warning, these are not well tested.
+dependencies = { module=all-autoconf; on=all-m4; };
+dependencies = { module=all-autoconf; on=all-texinfo; };
+dependencies = { module=all-automake; on=all-m4; };
+dependencies = { module=all-automake; on=all-texinfo; };
+dependencies = { module=all-automake; on=all-autoconf; };
+dependencies = { module=all-bison; on=all-intl; };
+dependencies = { module=all-bison; on=all-texinfo; };
+dependencies = { module=all-diff; on=all-intl; };
+dependencies = { module=all-diff; on=all-texinfo; };
+dependencies = { module=all-fileutils; on=all-intl; };
+dependencies = { module=all-fileutils; on=all-texinfo; };
+dependencies = { module=all-flex; on=all-bison; };
+dependencies = { module=all-flex; on=all-byacc; };
+dependencies = { module=all-flex; on=all-intl; };
+dependencies = { module=all-flex; on=all-m4; };
+dependencies = { module=all-flex; on=all-texinfo; };
+dependencies = { module=all-gzip; on=all-intl; };
+dependencies = { module=all-gzip; on=all-zlib; };
+dependencies = { module=all-gzip; on=all-texinfo; };
+dependencies = { module=all-hello; on=all-intl; };
+dependencies = { module=all-hello; on=all-texinfo; };
+dependencies = { module=all-m4; on=all-intl; };
+dependencies = { module=all-m4; on=all-texinfo; };
+dependencies = { module=all-make; on=all-intl; };
+dependencies = { module=all-make; on=all-texinfo; };
+dependencies = { module=all-patch; on=all-texinfo; };
+dependencies = { module=all-make; on=all-texinfo; };
+dependencies = { module=all-prms; on=all-libiberty; };
+dependencies = { module=all-recode; on=all-texinfo; };
+dependencies = { module=all-sed; on=all-texinfo; };
+dependencies = { module=all-send-pr; on=all-prms; };
+dependencies = { module=all-tar; on=all-texinfo; };
+dependencies = { module=all-uudecode; on=all-texinfo; };
+
+// Target modules. These can also have dependencies on the language
+// environment (e.g. on libstdc++).
+lang_env_dependencies = { module=boehm-gc; };
+lang_env_dependencies = { module=gperf; cxx=true; };
+lang_env_dependencies = { module=libada; };
+lang_env_dependencies = { module=libgfortran; };
+lang_env_dependencies = { module=libffi; };
+lang_env_dependencies = { module=libjava; cxx=true; };
+lang_env_dependencies = { module=libobjc; };
+lang_env_dependencies = { module=libstdc++-v3; };
+lang_env_dependencies = { module=zlib; };
+
+dependencies = { module=configure-target-boehm-gc; on=configure-target-qthreads; };
+dependencies = { module=configure-target-fastjar; on=configure-target-zlib; };
+dependencies = { module=all-target-fastjar; on=all-target-zlib; };
+dependencies = { module=all-target-fastjar; on=all-target-libiberty; };
+dependencies = { module=configure-target-libjava; on=configure-target-zlib; };
+dependencies = { module=configure-target-libjava; on=configure-target-boehm-gc; };
+dependencies = { module=configure-target-libjava; on=configure-target-qthreads; };
+dependencies = { module=configure-target-libjava; on=configure-target-libffi; };
+dependencies = { module=all-target-libjava; on=all-fastjar; };
+dependencies = { module=all-target-libjava; on=all-target-zlib; };
+dependencies = { module=all-target-libjava; on=all-target-boehm-gc; };
+dependencies = { module=all-target-libjava; on=all-target-qthreads; };
+dependencies = { module=all-target-libjava; on=all-target-libffi; };
+dependencies = { module=all-target-libobjc; on=all-target-libiberty; };
+dependencies = { module=all-target-libstdc++-v3; on=all-target-libiberty; };
+
+// Target modules in the 'src' repository.
+lang_env_dependencies = { module=examples; };
+lang_env_dependencies = { module=libtermcap; };
+lang_env_dependencies = { module=rda; };
+lang_env_dependencies = { module=winsup; };
+lang_env_dependencies = { module=qthreads; };
+
+dependencies = { module=all-target-libgloss; on=configure-target-newlib; };
+dependencies = { module=all-target-winsup; on=all-target-libiberty; };
+dependencies = { module=all-target-winsup; on=all-target-libtermcap; };
+
// Toplevel bootstrap
bootstrap_stage = {
id=1 ;
diff --git a/Makefile.in b/Makefile.in
index 1b19b21ea4b..ddeb28a7e3b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1889,7 +1889,6 @@ install-host-nogcc: \
maybe-install-find \
maybe-install-flex \
maybe-install-gas \
- maybe-install-gcc \
maybe-install-gawk \
maybe-install-gettext \
maybe-install-gnuserv \
@@ -28305,7 +28304,7 @@ maintainer-clean-target-libada:
GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
.PHONY: $(GCC_STRAP_TARGETS)
-$(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
+$(GCC_STRAP_TARGETS): all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
@@ -28338,7 +28337,7 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
echo "Building runtime libraries"; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all
-profiledbootstrap: all-bootstrap configure-gcc
+profiledbootstrap: all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
@@ -28472,7 +28471,7 @@ objext = .o
# Real targets act phony if they depend on phony targets; this hack
# prevents gratuitous rebuilding of stage 1.
prebootstrap:
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-bootstrap
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-prebootstrap
$(STAMP) prebootstrap
# Flags to pass to stage2 and later makes.
@@ -29176,7 +29175,7 @@ stagefeedback-start::
{ find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../gcc/&",' | $(SHELL); } && \
{ find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../gcc/&",' | $(SHELL); }
-profiledbootstrap: all-bootstrap configure-gcc
+profiledbootstrap: all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
@@ -29201,127 +29200,518 @@ profiledbootstrap: all-bootstrap configure-gcc
# Dependencies between different modules
# --------------------------------------
+# Generic dependencies for target modules on host stuff, especially gcc
+
+configure-target-libstdc++-v3: maybe-all-gcc
+
+configure-target-libmudflap: maybe-all-gcc
+
+configure-target-newlib: maybe-all-gcc
+
+configure-target-libgfortran: maybe-all-gcc
+
+configure-target-libobjc: maybe-all-gcc
+
+configure-target-libtermcap: maybe-all-gcc
+
+configure-target-winsup: maybe-all-gcc
+
+configure-target-libgloss: maybe-all-gcc
+
+configure-target-libiberty: maybe-all-gcc
+
+configure-target-gperf: maybe-all-gcc
+
+configure-target-examples: maybe-all-gcc
+
+configure-target-libffi: maybe-all-gcc
+
+configure-target-libjava: maybe-all-gcc
+
+configure-target-zlib: maybe-all-gcc
+
+configure-target-boehm-gc: maybe-all-gcc
+
+configure-target-qthreads: maybe-all-gcc
+
+configure-target-rda: maybe-all-gcc
+
+configure-target-libada: maybe-all-gcc
+
+
+
+configure-target-boehm-gc: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-gperf: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-gperf: maybe-all-target-libstdc++-v3
+
+configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libgfortran: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libffi: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libjava: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-libjava: maybe-all-target-libstdc++-v3
+
+configure-target-libobjc: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libstdc++-v3: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-zlib: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-examples: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libtermcap: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-rda: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-winsup: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-qthreads: maybe-all-target-newlib maybe-all-target-libgloss
+
+
# There are two types of dependencies here: 'hard' dependencies, where one
# module simply won't build without the other; and 'soft' dependencies, where
# if the depended-on module is missing, the depending module will do without
# or find a substitute somewhere (perhaps installed). Soft dependencies
-# are specified by depending on a 'maybe-' target. If you're not sure,
+# are made here to depend on a 'maybe-' target. If you're not sure,
# it's safer to use a soft dependency.
-# Build modules
+
+
+
+
+# With all the machinery above in place, it is pretty easy to generate
+# dependencies. Host dependencies are a bit more complex because we have
+# to check for bootstrap/prebootstrap dependencies. To resolve
+# prebootstrap dependencies, prebootstrap modules are gathered in
+# a hash table.
all-build-bison: maybe-all-build-texinfo
+all-build-byacc: maybe-all-build-texinfo
all-build-flex: maybe-all-build-texinfo
+all-build-flex: maybe-all-build-bison
+all-build-flex: maybe-all-build-byacc
+all-build-flex: maybe-all-build-m4
all-build-libiberty: maybe-all-build-texinfo
-all-build-m4: maybe-all-build-libiberty maybe-all-build-texinfo
-
-# Host modules specific to gcc.
-# GCC needs to identify certain tools.
-# GCC also needs the information exported by the intl configure script.
-configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
-all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib maybe-all-libbanshee maybe-all-libcpp
-configure-libcpp: maybe-configure-libiberty maybe-configure-intl
-all-libcpp: maybe-all-libiberty maybe-all-intl
-# This is a slightly kludgy method of getting dependencies on
-# all-build-libiberty correct; it would be better to build it every time.
+all-build-m4: maybe-all-build-texinfo
+configure-gcc: maybe-configure-intl
+
+configure-stage1-gcc: maybe-configure-stage1-intl
+configure-stage2-gcc: maybe-configure-stage2-intl
+configure-stage3-gcc: maybe-configure-stage3-intl
+configure-stage4-gcc: maybe-configure-stage4-intl
+configure-stageprofile-gcc: maybe-configure-stageprofile-intl
+configure-stagefeedback-gcc: maybe-configure-stagefeedback-intl
+configure-gcc: maybe-configure-binutils
+
+configure-stage1-gcc: maybe-configure-stage1-binutils
+configure-stage2-gcc: maybe-configure-stage2-binutils
+configure-stage3-gcc: maybe-configure-stage3-binutils
+configure-stage4-gcc: maybe-configure-stage4-binutils
+configure-stageprofile-gcc: maybe-configure-stageprofile-binutils
+configure-stagefeedback-gcc: maybe-configure-stagefeedback-binutils
+configure-gcc: maybe-configure-gas
+
+configure-stage1-gcc: maybe-configure-stage1-gas
+configure-stage2-gcc: maybe-configure-stage2-gas
+configure-stage3-gcc: maybe-configure-stage3-gas
+configure-stage4-gcc: maybe-configure-stage4-gas
+configure-stageprofile-gcc: maybe-configure-stageprofile-gas
+configure-stagefeedback-gcc: maybe-configure-stagefeedback-gas
+configure-gcc: maybe-configure-ld
+
+configure-stage1-gcc: maybe-configure-stage1-ld
+configure-stage2-gcc: maybe-configure-stage2-ld
+configure-stage3-gcc: maybe-configure-stage3-ld
+configure-stage4-gcc: maybe-configure-stage4-ld
+configure-stageprofile-gcc: maybe-configure-stageprofile-ld
+configure-stagefeedback-gcc: maybe-configure-stagefeedback-ld
+configure-gcc: maybe-configure-bison
+configure-gcc: maybe-configure-flex
+all-gcc: all-libiberty
+
+all-stage1-gcc: all-stage1-libiberty
+all-stage2-gcc: all-stage2-libiberty
+all-stage3-gcc: all-stage3-libiberty
+all-stage4-gcc: all-stage4-libiberty
+all-stageprofile-gcc: all-stageprofile-libiberty
+all-stagefeedback-gcc: all-stagefeedback-libiberty
+all-gcc: maybe-all-intl
+
+all-stage1-gcc: maybe-all-stage1-intl
+all-stage2-gcc: maybe-all-stage2-intl
+all-stage3-gcc: maybe-all-stage3-intl
+all-stage4-gcc: maybe-all-stage4-intl
+all-stageprofile-gcc: maybe-all-stageprofile-intl
+all-stagefeedback-gcc: maybe-all-stagefeedback-intl
+all-gcc: maybe-all-texinfo
+all-gcc: maybe-all-bison
+all-gcc: maybe-all-byacc
+all-gcc: maybe-all-flex
+all-gcc: maybe-all-binutils
+
+all-stage1-gcc: maybe-all-stage1-binutils
+all-stage2-gcc: maybe-all-stage2-binutils
+all-stage3-gcc: maybe-all-stage3-binutils
+all-stage4-gcc: maybe-all-stage4-binutils
+all-stageprofile-gcc: maybe-all-stageprofile-binutils
+all-stagefeedback-gcc: maybe-all-stagefeedback-binutils
+all-gcc: maybe-all-gas
+
+all-stage1-gcc: maybe-all-stage1-gas
+all-stage2-gcc: maybe-all-stage2-gas
+all-stage3-gcc: maybe-all-stage3-gas
+all-stage4-gcc: maybe-all-stage4-gas
+all-stageprofile-gcc: maybe-all-stageprofile-gas
+all-stagefeedback-gcc: maybe-all-stagefeedback-gas
+all-gcc: maybe-all-ld
+
+all-stage1-gcc: maybe-all-stage1-ld
+all-stage2-gcc: maybe-all-stage2-ld
+all-stage3-gcc: maybe-all-stage3-ld
+all-stage4-gcc: maybe-all-stage4-ld
+all-stageprofile-gcc: maybe-all-stageprofile-ld
+all-stagefeedback-gcc: maybe-all-stagefeedback-ld
+all-gcc: maybe-all-zlib
+
+all-stage1-gcc: maybe-all-stage1-zlib
+all-stage2-gcc: maybe-all-stage2-zlib
+all-stage3-gcc: maybe-all-stage3-zlib
+all-stage4-gcc: maybe-all-stage4-zlib
+all-stageprofile-gcc: maybe-all-stageprofile-zlib
+all-stagefeedback-gcc: maybe-all-stagefeedback-zlib
+all-gcc: maybe-all-libbanshee
+
+all-stage1-gcc: maybe-all-stage1-libbanshee
+all-stage2-gcc: maybe-all-stage2-libbanshee
+all-stage3-gcc: maybe-all-stage3-libbanshee
+all-stage4-gcc: maybe-all-stage4-libbanshee
+all-stageprofile-gcc: maybe-all-stageprofile-libbanshee
+all-stagefeedback-gcc: maybe-all-stagefeedback-libbanshee
+all-gcc: all-libcpp
+
+all-stage1-gcc: all-stage1-libcpp
+all-stage2-gcc: all-stage2-libcpp
+all-stage3-gcc: all-stage3-libcpp
+all-stage4-gcc: all-stage4-libcpp
+all-stageprofile-gcc: all-stageprofile-libcpp
+all-stagefeedback-gcc: all-stagefeedback-libcpp
all-gcc: maybe-all-build-libiberty
-all-bootstrap: maybe-all-binutils maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-gas maybe-all-intl maybe-all-ld maybe-all-libcpp maybe-all-libbanshee maybe-all-libiberty maybe-all-texinfo maybe-all-zlib
-
-# Host modules specific to gdb.
-# GDB needs to know that the simulator is being built.
-configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim
-GDB_TK = @GDB_TK@
-all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK)
-install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
-configure-libgui: maybe-configure-tcl maybe-configure-tk
-all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
-
-# Host modules specific to binutils.
+configure-libcpp: configure-libiberty
+
+configure-stage1-libcpp: configure-stage1-libiberty
+configure-stage2-libcpp: configure-stage2-libiberty
+configure-stage3-libcpp: configure-stage3-libiberty
+configure-stage4-libcpp: configure-stage4-libiberty
+configure-stageprofile-libcpp: configure-stageprofile-libiberty
+configure-stagefeedback-libcpp: configure-stagefeedback-libiberty
+configure-libcpp: maybe-configure-intl
+
+configure-stage1-libcpp: maybe-configure-stage1-intl
+configure-stage2-libcpp: maybe-configure-stage2-intl
+configure-stage3-libcpp: maybe-configure-stage3-intl
+configure-stage4-libcpp: maybe-configure-stage4-intl
+configure-stageprofile-libcpp: maybe-configure-stageprofile-intl
+configure-stagefeedback-libcpp: maybe-configure-stagefeedback-intl
+all-libcpp: all-libiberty
+
+all-stage1-libcpp: all-stage1-libiberty
+all-stage2-libcpp: all-stage2-libiberty
+all-stage3-libcpp: all-stage3-libiberty
+all-stage4-libcpp: all-stage4-libiberty
+all-stageprofile-libcpp: all-stageprofile-libiberty
+all-stagefeedback-libcpp: all-stagefeedback-libiberty
+all-libcpp: maybe-all-intl
+
+all-stage1-libcpp: maybe-all-stage1-intl
+all-stage2-libcpp: maybe-all-stage2-intl
+all-stage3-libcpp: maybe-all-stage3-intl
+all-stage4-libcpp: maybe-all-stage4-intl
+all-stageprofile-libcpp: maybe-all-stageprofile-intl
+all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
+configure-gdb: maybe-configure-itcl
+configure-gdb: maybe-configure-tcl
+configure-gdb: maybe-configure-tk
+configure-gdb: maybe-configure-sim
+all-gdb: maybe-all-libiberty
+all-gdb: maybe-all-opcodes
+all-gdb: maybe-all-bfd
+all-gdb: maybe-all-mmalloc
+all-gdb: maybe-all-readline
+all-gdb: maybe-all-bison
+all-gdb: maybe-all-byacc
+all-gdb: maybe-all-sim
+install-gdb: maybe-install-tcl
+install-gdb: maybe-install-tk
+install-gdb: maybe-install-itcl
+install-gdb: maybe-install-tix
+install-gdb: maybe-install-libgui
+configure-libgui: maybe-configure-tcl
+configure-libgui: maybe-configure-tk
+all-libgui: maybe-all-tcl
+all-libgui: maybe-all-tk
+all-libgui: maybe-all-itcl
configure-bfd: configure-libiberty
-all-bfd: maybe-all-libiberty maybe-all-intl
-all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl
-# We put install-opcodes before install-binutils because the installed
-# binutils might be on PATH, and they might need the shared opcodes
-# library.
+
+configure-stage1-bfd: configure-stage1-libiberty
+configure-stage2-bfd: configure-stage2-libiberty
+configure-stage3-bfd: configure-stage3-libiberty
+configure-stage4-bfd: configure-stage4-libiberty
+configure-stageprofile-bfd: configure-stageprofile-libiberty
+configure-stagefeedback-bfd: configure-stagefeedback-libiberty
+all-bfd: maybe-all-libiberty
+
+all-stage1-bfd: maybe-all-stage1-libiberty
+all-stage2-bfd: maybe-all-stage2-libiberty
+all-stage3-bfd: maybe-all-stage3-libiberty
+all-stage4-bfd: maybe-all-stage4-libiberty
+all-stageprofile-bfd: maybe-all-stageprofile-libiberty
+all-stagefeedback-bfd: maybe-all-stagefeedback-libiberty
+all-bfd: maybe-all-intl
+
+all-stage1-bfd: maybe-all-stage1-intl
+all-stage2-bfd: maybe-all-stage2-intl
+all-stage3-bfd: maybe-all-stage3-intl
+all-stage4-bfd: maybe-all-stage4-intl
+all-stageprofile-bfd: maybe-all-stageprofile-intl
+all-stagefeedback-bfd: maybe-all-stagefeedback-intl
+all-binutils: maybe-all-libiberty
+
+all-stage1-binutils: maybe-all-stage1-libiberty
+all-stage2-binutils: maybe-all-stage2-libiberty
+all-stage3-binutils: maybe-all-stage3-libiberty
+all-stage4-binutils: maybe-all-stage4-libiberty
+all-stageprofile-binutils: maybe-all-stageprofile-libiberty
+all-stagefeedback-binutils: maybe-all-stagefeedback-libiberty
+all-binutils: maybe-all-opcodes
+
+all-stage1-binutils: maybe-all-stage1-opcodes
+all-stage2-binutils: maybe-all-stage2-opcodes
+all-stage3-binutils: maybe-all-stage3-opcodes
+all-stage4-binutils: maybe-all-stage4-opcodes
+all-stageprofile-binutils: maybe-all-stageprofile-opcodes
+all-stagefeedback-binutils: maybe-all-stagefeedback-opcodes
+all-binutils: maybe-all-bfd
+
+all-stage1-binutils: maybe-all-stage1-bfd
+all-stage2-binutils: maybe-all-stage2-bfd
+all-stage3-binutils: maybe-all-stage3-bfd
+all-stage4-binutils: maybe-all-stage4-bfd
+all-stageprofile-binutils: maybe-all-stageprofile-bfd
+all-stagefeedback-binutils: maybe-all-stagefeedback-bfd
+all-binutils: maybe-all-flex
+all-binutils: maybe-all-bison
+all-binutils: maybe-all-byacc
+all-binutils: maybe-all-intl
+
+all-stage1-binutils: maybe-all-stage1-intl
+all-stage2-binutils: maybe-all-stage2-intl
+all-stage3-binutils: maybe-all-stage3-intl
+all-stage4-binutils: maybe-all-stage4-intl
+all-stageprofile-binutils: maybe-all-stageprofile-intl
+all-stagefeedback-binutils: maybe-all-stagefeedback-intl
install-binutils: maybe-install-opcodes
-# libopcodes depends on libbfd
install-opcodes: maybe-install-bfd
-all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl
-all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl
-all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl
-all-opcodes: maybe-all-bfd maybe-all-libiberty
-
-# Other host modules in the 'src' repository.
-all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk
-configure-expect: maybe-configure-tcl maybe-configure-tk
-all-expect: maybe-all-tcl maybe-all-tk
-configure-itcl: maybe-configure-tcl maybe-configure-tk
-all-itcl: maybe-all-tcl maybe-all-tk
-# We put install-tcl before install-itcl because itcl wants to run a
-# program on installation which uses the Tcl libraries.
+all-gas: maybe-all-libiberty
+
+all-stage1-gas: maybe-all-stage1-libiberty
+all-stage2-gas: maybe-all-stage2-libiberty
+all-stage3-gas: maybe-all-stage3-libiberty
+all-stage4-gas: maybe-all-stage4-libiberty
+all-stageprofile-gas: maybe-all-stageprofile-libiberty
+all-stagefeedback-gas: maybe-all-stagefeedback-libiberty
+all-gas: maybe-all-opcodes
+
+all-stage1-gas: maybe-all-stage1-opcodes
+all-stage2-gas: maybe-all-stage2-opcodes
+all-stage3-gas: maybe-all-stage3-opcodes
+all-stage4-gas: maybe-all-stage4-opcodes
+all-stageprofile-gas: maybe-all-stageprofile-opcodes
+all-stagefeedback-gas: maybe-all-stagefeedback-opcodes
+all-gas: maybe-all-bfd
+
+all-stage1-gas: maybe-all-stage1-bfd
+all-stage2-gas: maybe-all-stage2-bfd
+all-stage3-gas: maybe-all-stage3-bfd
+all-stage4-gas: maybe-all-stage4-bfd
+all-stageprofile-gas: maybe-all-stageprofile-bfd
+all-stagefeedback-gas: maybe-all-stagefeedback-bfd
+all-gas: maybe-all-intl
+
+all-stage1-gas: maybe-all-stage1-intl
+all-stage2-gas: maybe-all-stage2-intl
+all-stage3-gas: maybe-all-stage3-intl
+all-stage4-gas: maybe-all-stage4-intl
+all-stageprofile-gas: maybe-all-stageprofile-intl
+all-stagefeedback-gas: maybe-all-stagefeedback-intl
+all-gprof: maybe-all-libiberty
+all-gprof: maybe-all-bfd
+all-gprof: maybe-all-opcodes
+all-gprof: maybe-all-intl
+all-ld: maybe-all-libiberty
+
+all-stage1-ld: maybe-all-stage1-libiberty
+all-stage2-ld: maybe-all-stage2-libiberty
+all-stage3-ld: maybe-all-stage3-libiberty
+all-stage4-ld: maybe-all-stage4-libiberty
+all-stageprofile-ld: maybe-all-stageprofile-libiberty
+all-stagefeedback-ld: maybe-all-stagefeedback-libiberty
+all-ld: maybe-all-bfd
+
+all-stage1-ld: maybe-all-stage1-bfd
+all-stage2-ld: maybe-all-stage2-bfd
+all-stage3-ld: maybe-all-stage3-bfd
+all-stage4-ld: maybe-all-stage4-bfd
+all-stageprofile-ld: maybe-all-stageprofile-bfd
+all-stagefeedback-ld: maybe-all-stagefeedback-bfd
+all-ld: maybe-all-opcodes
+
+all-stage1-ld: maybe-all-stage1-opcodes
+all-stage2-ld: maybe-all-stage2-opcodes
+all-stage3-ld: maybe-all-stage3-opcodes
+all-stage4-ld: maybe-all-stage4-opcodes
+all-stageprofile-ld: maybe-all-stageprofile-opcodes
+all-stagefeedback-ld: maybe-all-stagefeedback-opcodes
+all-ld: maybe-all-bison
+all-ld: maybe-all-byacc
+all-ld: maybe-all-flex
+all-ld: maybe-all-intl
+
+all-stage1-ld: maybe-all-stage1-intl
+all-stage2-ld: maybe-all-stage2-intl
+all-stage3-ld: maybe-all-stage3-intl
+all-stage4-ld: maybe-all-stage4-intl
+all-stageprofile-ld: maybe-all-stageprofile-intl
+all-stagefeedback-ld: maybe-all-stagefeedback-intl
+all-opcodes: maybe-all-bfd
+
+all-stage1-opcodes: maybe-all-stage1-bfd
+all-stage2-opcodes: maybe-all-stage2-bfd
+all-stage3-opcodes: maybe-all-stage3-bfd
+all-stage4-opcodes: maybe-all-stage4-bfd
+all-stageprofile-opcodes: maybe-all-stageprofile-bfd
+all-stagefeedback-opcodes: maybe-all-stagefeedback-bfd
+all-opcodes: maybe-all-libiberty
+
+all-stage1-opcodes: maybe-all-stage1-libiberty
+all-stage2-opcodes: maybe-all-stage2-libiberty
+all-stage3-opcodes: maybe-all-stage3-libiberty
+all-stage4-opcodes: maybe-all-stage4-libiberty
+all-stageprofile-opcodes: maybe-all-stageprofile-libiberty
+all-stagefeedback-opcodes: maybe-all-stagefeedback-libiberty
+all-dejagnu: maybe-all-tcl
+all-dejagnu: maybe-all-expect
+all-dejagnu: maybe-all-tk
+configure-expect: maybe-configure-tcl
+configure-expect: maybe-configure-tk
+all-expect: maybe-all-tcl
+all-expect: maybe-all-tk
+configure-itcl: maybe-configure-tcl
+configure-itcl: maybe-configure-tk
+all-itcl: maybe-all-tcl
+all-itcl: maybe-all-tk
install-itcl: maybe-install-tcl
-all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk
-install-sid: maybe-install-tcl maybe-install-tk
-all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb
configure-tk: maybe-configure-tcl
all-tk: maybe-all-tcl
-configure-tix: maybe-configure-tcl maybe-configure-tk
-all-tix: maybe-all-tcl maybe-all-tk
-all-texinfo: maybe-all-libiberty
-
-# Other host modules. Warning, these are not well tested.
-all-autoconf: maybe-all-m4 maybe-all-texinfo
-all-automake: maybe-all-m4 maybe-all-texinfo
+configure-tix: maybe-configure-tcl
+configure-tix: maybe-configure-tk
+all-tix: maybe-all-tcl
+all-tix: maybe-all-tk
+all-sid: maybe-all-libiberty
+all-sid: maybe-all-bfd
+all-sid: maybe-all-opcodes
+all-sid: maybe-all-tcl
+all-sid: maybe-all-tk
+install-sid: maybe-install-tcl
+install-sid: maybe-install-tk
+all-sim: maybe-all-libiberty
+all-sim: maybe-all-bfd
+all-sim: maybe-all-opcodes
+all-sim: maybe-all-readline
+all-sim: maybe-configure-gdb
+all-fastjar: maybe-all-zlib
+all-fastjar: maybe-all-texinfo
+all-fastjar: maybe-all-libiberty
+all-autoconf: maybe-all-m4
+all-autoconf: maybe-all-texinfo
+all-automake: maybe-all-m4
+all-automake: maybe-all-texinfo
+all-automake: maybe-all-autoconf
+all-bison: maybe-all-intl
all-bison: maybe-all-texinfo
-all-diff: maybe-all-libiberty
-all-fastjar: maybe-all-zlib maybe-all-libiberty
-all-fileutils: maybe-all-libiberty
-all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
-all-gzip: maybe-all-libiberty
-all-hello: maybe-all-libiberty
-all-m4: maybe-all-libiberty maybe-all-texinfo
-all-make: maybe-all-libiberty maybe-all-intl
-all-patch: maybe-all-libiberty
+all-diff: maybe-all-intl
+all-diff: maybe-all-texinfo
+all-fileutils: maybe-all-intl
+all-fileutils: maybe-all-texinfo
+all-flex: maybe-all-bison
+all-flex: maybe-all-byacc
+all-flex: maybe-all-intl
+all-flex: maybe-all-m4
+all-flex: maybe-all-texinfo
+all-gzip: maybe-all-intl
+all-gzip: maybe-all-zlib
+all-gzip: maybe-all-texinfo
+all-hello: maybe-all-intl
+all-hello: maybe-all-texinfo
+all-m4: maybe-all-intl
+all-m4: maybe-all-texinfo
+all-make: maybe-all-intl
+all-make: maybe-all-texinfo
+all-patch: maybe-all-texinfo
+all-make: maybe-all-texinfo
all-prms: maybe-all-libiberty
-all-recode: maybe-all-libiberty
-all-sed: maybe-all-libiberty
+all-recode: maybe-all-texinfo
+all-sed: maybe-all-texinfo
all-send-pr: maybe-all-prms
-all-tar: maybe-all-libiberty
-all-uudecode: maybe-all-libiberty
-
-ALL_GCC = maybe-all-gcc
-ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss
-ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3
-
-# Target modules specific to gcc.
-configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads
+all-tar: maybe-all-texinfo
+all-uudecode: maybe-all-texinfo
+configure-target-boehm-gc: maybe-configure-target-qthreads
configure-target-fastjar: maybe-configure-target-zlib
-all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
-configure-target-libada: $(ALL_GCC_C)
-configure-target-libgfortran: $(ALL_GCC_C)
-configure-target-libffi: $(ALL_GCC_C)
-configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
-all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
-configure-target-libobjc: $(ALL_GCC_C)
+all-target-fastjar: maybe-all-target-zlib
+all-target-fastjar: maybe-all-target-libiberty
+configure-target-libjava: maybe-configure-target-zlib
+configure-target-libjava: maybe-configure-target-boehm-gc
+configure-target-libjava: maybe-configure-target-qthreads
+configure-target-libjava: maybe-configure-target-libffi
+all-target-libjava: maybe-all-fastjar
+all-target-libjava: maybe-all-target-zlib
+all-target-libjava: maybe-all-target-boehm-gc
+all-target-libjava: maybe-all-target-qthreads
+all-target-libjava: maybe-all-target-libffi
all-target-libobjc: maybe-all-target-libiberty
-configure-target-libstdc++-v3: $(ALL_GCC_C)
all-target-libstdc++-v3: maybe-all-target-libiberty
-configure-target-zlib: $(ALL_GCC_C)
-
-# Target modules in the 'src' repository.
-configure-target-examples: $(ALL_GCC_C)
-configure-target-libgloss: $(ALL_GCC)
all-target-libgloss: maybe-configure-target-newlib
-configure-target-libiberty: $(ALL_GCC)
-configure-target-libtermcap: $(ALL_GCC_C)
-configure-target-newlib: $(ALL_GCC)
-configure-target-rda: $(ALL_GCC_C)
-configure-target-winsup: $(ALL_GCC_C)
-all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap
-
-# Other target modules. Warning, these are not well tested.
-configure-target-gperf: $(ALL_GCC_CXX)
-all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
-configure-target-qthreads: $(ALL_GCC_C)
+all-target-winsup: maybe-all-target-libiberty
+all-target-winsup: maybe-all-target-libtermcap
+
+
+# Now build the prebootstrap dependencies.
+
+all-prebootstrap: maybe-all-bison
+all-prebootstrap: maybe-all-byacc
+all-prebootstrap: maybe-all-flex
+all-prebootstrap: maybe-all-texinfo
+
+# Unless toplevel bootstrap is going, bootstrapped packages are actually
+# prebootstrapped, with the exception of gcc. Another wart that will go
+# away with toplevel bootstrap.
+@if gcc-no-bootstrap
+
+all-prebootstrap: maybe-all-bfd
+all-prebootstrap: maybe-all-opcodes
+all-prebootstrap: maybe-all-binutils
+all-prebootstrap: maybe-all-gas
+all-prebootstrap: maybe-all-intl
+all-prebootstrap: maybe-all-ld
+all-prebootstrap: maybe-all-libcpp
+all-prebootstrap: maybe-all-libbanshee
+all-prebootstrap: maybe-all-libiberty
+all-prebootstrap: maybe-all-zlib
+@endif gcc-no-bootstrap
+
+GDB_TK = @GDB_TK@
+all-gdb: $(gdbnlmrequirements) $(GDB_TK)
# Serialization dependencies. Host configures don't work well in parallel to
# each other, due to contention over config.cache. Target configures and
diff --git a/Makefile.tpl b/Makefile.tpl
index f9c58c119ab..dee4cee887e 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -738,8 +738,8 @@ install: installdirs install-host install-target
.PHONY: install-host-nogcc
install-host-nogcc: [+
- FOR host_modules +] \
- maybe-install-[+module+][+
+ FOR host_modules +][+ IF (not (= (get "module") "gcc")) +] \
+ maybe-install-[+module+][+ ENDIF +][+
ENDFOR host_modules +]
.PHONY: install-host
@@ -1196,7 +1196,7 @@ ENDIF raw_cxx +]
GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
.PHONY: $(GCC_STRAP_TARGETS)
-$(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
+$(GCC_STRAP_TARGETS): all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
@@ -1229,7 +1229,7 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
echo "Building runtime libraries"; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all
-profiledbootstrap: all-bootstrap configure-gcc
+profiledbootstrap: all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
@@ -1363,7 +1363,7 @@ objext = .o
# Real targets act phony if they depend on phony targets; this hack
# prevents gratuitous rebuilding of stage 1.
prebootstrap:
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-bootstrap
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-prebootstrap
$(STAMP) prebootstrap
# Flags to pass to stage2 and later makes.
@@ -1534,7 +1534,7 @@ stagefeedback-start::
{ find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../gcc/&",' | $(SHELL); } && \
{ find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../gcc/&",' | $(SHELL); }
-profiledbootstrap: all-bootstrap configure-gcc
+profiledbootstrap: all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
@@ -1559,127 +1559,128 @@ profiledbootstrap: all-bootstrap configure-gcc
# Dependencies between different modules
# --------------------------------------
+# Generic dependencies for target modules on host stuff, especially gcc
+[+ FOR target_modules +]
+configure-target-[+module+]: maybe-all-gcc
+[+ ENDFOR target_modules +]
+
+[+ FOR lang_env_dependencies +]
+configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss
+[+ IF cxx +]configure-target-[+module+]: maybe-all-target-libstdc++-v3
+[+ ENDIF cxx +][+ ENDFOR lang_env_dependencies +]
+
# There are two types of dependencies here: 'hard' dependencies, where one
# module simply won't build without the other; and 'soft' dependencies, where
# if the depended-on module is missing, the depending module will do without
# or find a substitute somewhere (perhaps installed). Soft dependencies
-# are specified by depending on a 'maybe-' target. If you're not sure,
+# are made here to depend on a 'maybe-' target. If you're not sure,
# it's safer to use a soft dependency.
-# Build modules
-all-build-bison: maybe-all-build-texinfo
-all-build-flex: maybe-all-build-texinfo
-all-build-libiberty: maybe-all-build-texinfo
-all-build-m4: maybe-all-build-libiberty maybe-all-build-texinfo
-
-# Host modules specific to gcc.
-# GCC needs to identify certain tools.
-# GCC also needs the information exported by the intl configure script.
-configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
-all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib maybe-all-libbanshee maybe-all-libcpp
-configure-libcpp: maybe-configure-libiberty maybe-configure-intl
-all-libcpp: maybe-all-libiberty maybe-all-intl
-# This is a slightly kludgy method of getting dependencies on
-# all-build-libiberty correct; it would be better to build it every time.
-all-gcc: maybe-all-build-libiberty
-all-bootstrap: [+ FOR host_modules +][+ IF bootstrap +]maybe-all-[+module+] [+ ENDIF bootstrap +][+ ENDFOR host_modules +]
-
-# Host modules specific to gdb.
-# GDB needs to know that the simulator is being built.
-configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim
+[+ ;; These Scheme functions build the bulk of the dependencies.
+ ;; dep-target builds a string like "maybe-all-MODULE_KIND-gcc",
+ ;; where "maybe-" is only included if HARD is true, and all-gcc
+ ;; is taken from VAR-NAME.
+ (define dep-target (lambda (module-kind var-name hard)
+ (string-append
+ (if hard "" "maybe-")
+ (dep-subtarget var-name)
+ module-kind
+ (dep-module var-name)
+ )))
+
+ ;; make-dep builds a dependency from the MODULE and ON AutoGen vars.
+ (define make-dep (lambda (module-kind)
+ (string-append
+ (dep-target module-kind "module" #t) ": "
+ (dep-target module-kind "on" (exist? "hard")))))
+
+ ;; dep-subtarget extracts everything up to the first dash in the given
+ ;; AutoGen variable, for example it extracts "all-" out of "all-gcc".
+ (define dep-subtarget (lambda (var-name)
+ (substring (get var-name) 0 (+ 1 (string-index (get var-name) #\-)))))
+
+ ;; dep-module extracts everything up to the first dash in the given
+ ;; AutoGen variable, for example it extracts "gcc" out of "all-gcc".
+ (define dep-module (lambda (var-name)
+ (substring (get var-name) (+ 1 (string-index (get var-name) #\-)))))
+
+ ;; dep-stage builds a string for the prefix of a bootstrap stage.
+ (define dep-stage (lambda ()
+ (string-append
+ "stage"
+ (get "id")
+ "-")))
+
+ ;; dep-maybe is the same as the AutoGen expression "- hard 'maybe-'"
+ ;; but is written in Scheme.
+ (define dep-maybe (lambda ()
+ (if (exist? "hard") "" "maybe-")))
+
+ ;; dep-kind returns "normal" is the dependency is on an "install" target,
+ ;; or if the LHS module is not bootstrapped. It returns "bootstrap" for
+ ;; configure or build dependencies between bootstrapped modules; it returns
+ ;; "prebootstrap" for configure or build dependencies of bootstrapped
+ ;; modules on a non-bootstrapped modules (e.g. gcc on bison). All this
+ ;; is only necessary for host modules.
+ (define dep-kind (lambda ()
+ (if (or (= (dep-subtarget "on") "install-")
+ (=* (dep-module "on") "build-")
+ (=* (dep-module "on") "target-"))
+ "normal"
+
+ (if (hash-ref boot-modules (dep-module "module"))
+ (if (hash-ref boot-modules (dep-module "on"))
+ "bootstrap"
+ "prebootstrap")
+ "normal"))))
+
+ ;; We now build the hash table that is used by dep-kind.
+ (define boot-modules (make-hash-table 113))
+ (define preboot-modules (make-hash-table 37))
++]
+
+[+ FOR host_modules +][+
+ (if (exist? "bootstrap")
+ (hash-create-handle! boot-modules (get "module") #t))
+ "" +][+ ENDFOR host_modules +]
+
+# With all the machinery above in place, it is pretty easy to generate
+# dependencies. Host dependencies are a bit more complex because we have
+# to check for bootstrap/prebootstrap dependencies. To resolve
+# prebootstrap dependencies, prebootstrap modules are gathered in
+# a hash table.
+[+ FOR dependencies +][+ (make-dep "") +]
+[+ CASE (dep-kind) +][+
+ == "prebootstrap"
+ +][+ (hash-create-handle! preboot-modules (dep-module "on") #t) "" +][+
+ == "bootstrap"
+ +][+ FOR bootstrap_stage +]
+[+ (make-dep (dep-stage)) +][+
+ ENDFOR bootstrap_stage +]
+[+ ESAC +][+
+ENDFOR dependencies +]
+
+# Now build the prebootstrap dependencies.
+[+ FOR host_modules +][+
+ IF (hash-ref preboot-modules (get "module")) +]
+all-prebootstrap: maybe-all-[+module+][+
+ ENDIF +][+
+ENDFOR host_modules +]
+
+# Unless toplevel bootstrap is going, bootstrapped packages are actually
+# prebootstrapped, with the exception of gcc. Another wart that will go
+# away with toplevel bootstrap.
+@if gcc-no-bootstrap
+[+ FOR host_modules +][+
+ IF (and (not (= (get "module") "gcc"))
+ (hash-ref boot-modules (get "module"))) +]
+all-prebootstrap: maybe-all-[+module+][+
+ ENDIF +][+
+ENDFOR host_modules +]
+@endif gcc-no-bootstrap
+
GDB_TK = @GDB_TK@
-all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK)
-install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
-configure-libgui: maybe-configure-tcl maybe-configure-tk
-all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
-
-# Host modules specific to binutils.
-configure-bfd: configure-libiberty
-all-bfd: maybe-all-libiberty maybe-all-intl
-all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl
-# We put install-opcodes before install-binutils because the installed
-# binutils might be on PATH, and they might need the shared opcodes
-# library.
-install-binutils: maybe-install-opcodes
-# libopcodes depends on libbfd
-install-opcodes: maybe-install-bfd
-all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl
-all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl
-all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl
-all-opcodes: maybe-all-bfd maybe-all-libiberty
-
-# Other host modules in the 'src' repository.
-all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk
-configure-expect: maybe-configure-tcl maybe-configure-tk
-all-expect: maybe-all-tcl maybe-all-tk
-configure-itcl: maybe-configure-tcl maybe-configure-tk
-all-itcl: maybe-all-tcl maybe-all-tk
-# We put install-tcl before install-itcl because itcl wants to run a
-# program on installation which uses the Tcl libraries.
-install-itcl: maybe-install-tcl
-all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk
-install-sid: maybe-install-tcl maybe-install-tk
-all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb
-configure-tk: maybe-configure-tcl
-all-tk: maybe-all-tcl
-configure-tix: maybe-configure-tcl maybe-configure-tk
-all-tix: maybe-all-tcl maybe-all-tk
-all-texinfo: maybe-all-libiberty
-
-# Other host modules. Warning, these are not well tested.
-all-autoconf: maybe-all-m4 maybe-all-texinfo
-all-automake: maybe-all-m4 maybe-all-texinfo
-all-bison: maybe-all-texinfo
-all-diff: maybe-all-libiberty
-all-fastjar: maybe-all-zlib maybe-all-libiberty
-all-fileutils: maybe-all-libiberty
-all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
-all-gzip: maybe-all-libiberty
-all-hello: maybe-all-libiberty
-all-m4: maybe-all-libiberty maybe-all-texinfo
-all-make: maybe-all-libiberty maybe-all-intl
-all-patch: maybe-all-libiberty
-all-prms: maybe-all-libiberty
-all-recode: maybe-all-libiberty
-all-sed: maybe-all-libiberty
-all-send-pr: maybe-all-prms
-all-tar: maybe-all-libiberty
-all-uudecode: maybe-all-libiberty
-
-ALL_GCC = maybe-all-gcc
-ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss
-ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3
-
-# Target modules specific to gcc.
-configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads
-configure-target-fastjar: maybe-configure-target-zlib
-all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
-configure-target-libada: $(ALL_GCC_C)
-configure-target-libgfortran: $(ALL_GCC_C)
-configure-target-libffi: $(ALL_GCC_C)
-configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
-all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
-configure-target-libobjc: $(ALL_GCC_C)
-all-target-libobjc: maybe-all-target-libiberty
-configure-target-libstdc++-v3: $(ALL_GCC_C)
-all-target-libstdc++-v3: maybe-all-target-libiberty
-configure-target-zlib: $(ALL_GCC_C)
-
-# Target modules in the 'src' repository.
-configure-target-examples: $(ALL_GCC_C)
-configure-target-libgloss: $(ALL_GCC)
-all-target-libgloss: maybe-configure-target-newlib
-configure-target-libiberty: $(ALL_GCC)
-configure-target-libtermcap: $(ALL_GCC_C)
-configure-target-newlib: $(ALL_GCC)
-configure-target-rda: $(ALL_GCC_C)
-configure-target-winsup: $(ALL_GCC_C)
-all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap
-
-# Other target modules. Warning, these are not well tested.
-configure-target-gperf: $(ALL_GCC_CXX)
-all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
-configure-target-qthreads: $(ALL_GCC_C)
+all-gdb: $(gdbnlmrequirements) $(GDB_TK)
# Serialization dependencies. Host configures don't work well in parallel to
# each other, due to contention over config.cache. Target configures and
diff --git a/configure b/configure
index 54424bf9ed2..42faaf5e8eb 100755
--- a/configure
+++ b/configure
@@ -1266,6 +1266,9 @@ case "${target}" in
arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
;;
+ arm*-*-symbianelf*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
+ ;;
arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
@@ -1788,7 +1791,7 @@ else
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1792: checking for $ac_word" >&5
+echo "configure:1795: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1818,7 +1821,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1822: checking for $ac_word" >&5
+echo "configure:1825: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1869,7 +1872,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1873: checking for $ac_word" >&5
+echo "configure:1876: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1901,7 +1904,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1905: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1908: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1912,12 +1915,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1916 "configure"
+#line 1919 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1943,12 +1946,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1947: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1950: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1952: checking whether we are using GNU C" >&5
+echo "configure:1955: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1957,7 +1960,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1976,7 +1979,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1980: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1983: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2043,7 +2046,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2047: checking for $ac_word" >&5
+echo "configure:2050: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2075,7 +2078,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2079: checking for $ac_word" >&5
+echo "configure:2082: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2108,7 +2111,7 @@ fi
fi
echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
-echo "configure:2112: checking whether compiler driver understands Ada" >&5
+echo "configure:2115: checking whether compiler driver understands Ada" >&5
if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2141,7 +2144,7 @@ else
fi
echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
-echo "configure:2145: checking how to compare bootstrapped objects" >&5
+echo "configure:2148: checking how to compare bootstrapped objects" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2239,9 +2242,9 @@ saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $gmpinc"
# Check GMP actually works
echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
-echo "configure:2243: checking for correct version of gmp.h" >&5
+echo "configure:2246: checking for correct version of gmp.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2245 "configure"
+#line 2248 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {
@@ -2252,7 +2255,7 @@ choke me
; return 0; }
EOF
-if { (eval echo configure:2256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -2265,12 +2268,12 @@ rm -f conftest*
if test x"$have_gmp" = xyes; then
echo $ac_n "checking for MPFR""... $ac_c" 1>&6
-echo "configure:2269: checking for MPFR" >&5
+echo "configure:2272: checking for MPFR" >&5
saved_LIBS="$LIBS"
LIBS="$LIBS $gmplibs"
cat > conftest.$ac_ext <<EOF
-#line 2274 "configure"
+#line 2277 "configure"
#include "confdefs.h"
#include <gmp.h>
#include <mpfr.h>
@@ -2278,7 +2281,7 @@ int main() {
mpfr_t n; mpfr_init(n);
; return 0; }
EOF
-if { (eval echo configure:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -2752,7 +2755,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2756: checking for $ac_word" >&5
+echo "configure:2759: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_BISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2787,7 +2790,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2791: checking for $ac_word" >&5
+echo "configure:2794: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2822,7 +2825,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2826: checking for $ac_word" >&5
+echo "configure:2829: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_M4'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2857,7 +2860,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2861: checking for $ac_word" >&5
+echo "configure:2864: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2892,7 +2895,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2896: checking for $ac_word" >&5
+echo "configure:2899: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2927,7 +2930,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2931: checking for $ac_word" >&5
+echo "configure:2934: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3528,7 +3531,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
# Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3532: checking for $ac_word" >&5
+echo "configure:3535: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3561,7 +3564,7 @@ if test -z "$ac_cv_prog_AR" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3565: checking for $ac_word" >&5
+echo "configure:3568: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3600,7 +3603,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3604: checking for $ac_word" >&5
+echo "configure:3607: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3633,7 +3636,7 @@ if test -z "$ac_cv_prog_AS" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3637: checking for $ac_word" >&5
+echo "configure:3640: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3672,7 +3675,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3676: checking for $ac_word" >&5
+echo "configure:3679: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3705,7 +3708,7 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3709: checking for $ac_word" >&5
+echo "configure:3712: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3744,7 +3747,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3748: checking for $ac_word" >&5
+echo "configure:3751: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3777,7 +3780,7 @@ if test -z "$ac_cv_prog_LD" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3781: checking for $ac_word" >&5
+echo "configure:3784: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3816,7 +3819,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3820: checking for $ac_word" >&5
+echo "configure:3823: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3849,7 +3852,7 @@ if test -z "$ac_cv_prog_NM" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3853: checking for $ac_word" >&5
+echo "configure:3856: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3888,7 +3891,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3892: checking for $ac_word" >&5
+echo "configure:3895: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3921,7 +3924,7 @@ if test -z "$ac_cv_prog_RANLIB" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3925: checking for $ac_word" >&5
+echo "configure:3928: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3960,7 +3963,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3964: checking for $ac_word" >&5
+echo "configure:3967: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3993,7 +3996,7 @@ if test -z "$ac_cv_prog_WINDRES" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3997: checking for $ac_word" >&5
+echo "configure:4000: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4032,7 +4035,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4036: checking for $ac_word" >&5
+echo "configure:4039: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4065,7 +4068,7 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then
# Extract the first word of "objcopy", so it can be a program name with args.
set dummy objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4069: checking for $ac_word" >&5
+echo "configure:4072: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4104,7 +4107,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4108: checking for $ac_word" >&5
+echo "configure:4111: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4137,7 +4140,7 @@ if test -z "$ac_cv_prog_OBJDUMP" ; then
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4141: checking for $ac_word" >&5
+echo "configure:4144: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4183,7 +4186,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4187: checking for $ac_word" >&5
+echo "configure:4190: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4216,7 +4219,7 @@ if test -z "$ac_cv_prog_CONFIGURED_AR_FOR_TARGET" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4220: checking for $ac_word" >&5
+echo "configure:4223: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4255,7 +4258,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4259: checking for $ac_word" >&5
+echo "configure:4262: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4288,7 +4291,7 @@ if test -z "$ac_cv_prog_CONFIGURED_AS_FOR_TARGET" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4292: checking for $ac_word" >&5
+echo "configure:4295: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4327,7 +4330,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4331: checking for $ac_word" >&5
+echo "configure:4334: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4360,7 +4363,7 @@ if test -z "$ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4364: checking for $ac_word" >&5
+echo "configure:4367: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4399,7 +4402,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4403: checking for $ac_word" >&5
+echo "configure:4406: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4432,7 +4435,7 @@ if test -z "$ac_cv_prog_CONFIGURED_LD_FOR_TARGET" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4436: checking for $ac_word" >&5
+echo "configure:4439: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4471,7 +4474,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4475: checking for $ac_word" >&5
+echo "configure:4478: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4504,7 +4507,7 @@ if test -z "$ac_cv_prog_CONFIGURED_NM_FOR_TARGET" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4508: checking for $ac_word" >&5
+echo "configure:4511: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4543,7 +4546,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4547: checking for $ac_word" >&5
+echo "configure:4550: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4576,7 +4579,7 @@ if test -z "$ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4580: checking for $ac_word" >&5
+echo "configure:4583: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4615,7 +4618,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4619: checking for $ac_word" >&5
+echo "configure:4622: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4648,7 +4651,7 @@ if test -z "$ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4652: checking for $ac_word" >&5
+echo "configure:4655: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4733,7 +4736,7 @@ RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4737: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4740: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -4780,7 +4783,7 @@ esac
# gcc for stageN-gcc and stage-prev for stage(N-1). In case this is not
# possible, however, we can resort to mv.
echo $ac_n "checking if symbolic links between directories work""... $ac_c" 1>&6
-echo "configure:4784: checking if symbolic links between directories work" >&5
+echo "configure:4787: checking if symbolic links between directories work" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_ln_s_dir'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4894,15 +4897,34 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
# Without the "./", some shells look in PATH for config.status.
diff --git a/configure.in b/configure.in
index 83371123082..e0be0344127 100644
--- a/configure.in
+++ b/configure.in
@@ -482,6 +482,9 @@ case "${target}" in
arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
;;
+ arm*-*-symbianelf*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
+ ;;
arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ddfba852518..d5efb3426e7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,398 @@
+2004-08-08 Mostafa Hagog <mustafa@il.ibm.com>
+ Ayal Zaks <zaks@il.ibm.com>
+
+ * common.opt (freschedule-modulo-scheduled-loops): New flag.
+ * final.c (final_scan_insn): Handle NOTE_DISABLE_SCHED_OF_BLOCK.
+ * modulo-sched.c (sms_schedule): Emit a note to disable scheduling
+ when -freschedule-modulo-scheduled-loops flag is not specified.
+ (sms_schedule_by_order, ps_insn_advance_column, add_node_to_ps,
+ add_node_to_ps, ps_has_conflicts, ps_add_node_check_conflicts):
+ More accurate placing of insn in row of partial schedule.
+ (ps_insn_find_column): New function.
+ * rtl.h (NOTE_DISABLE_SCHED_OF_BLOCK): New note.
+ * sched-rgn.c (sched_is_disabled_for_current_region_p): New.
+ (schedule_region): Use sched_is_disabled_for_current_region_p.
+ * docs/invoke.texi: Document -freschedule-modulo-scheduled-loops.
+
+2004-08-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (ix86_expand_clrmem): Revert the last
+ change.
+
+2004-08-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (ix86_expand_clrmem): Properly call
+ gen_strset for 64bit target.
+
+2004-08-07 Olivier Hainque <hainque@act-europe.fr>
+
+ * config/vxworks.h (HANDLE_SYSV_PRAGMA): Remove definition.
+
+2004-08-07 Jason Merrill <jason@redhat.com>
+
+ Make return in memory explicit.
+ * function.c (aggregate_value_p): Check DECL_BY_REFERENCE.
+ (assign_parm_find_data_types): Remove code for old front end
+ invisible reference handling.
+ (assign_parms): Handle DECL_BY_REFERENCE on the RESULT_DECL.
+ (expand_function_end): Likewise.
+ * gimplify.c (gimplify_return_expr): Handle a dereferenced
+ RESULT_DECL.
+ * tree-inline.c (copy_body_r): Don't bother looking for &* anymore.
+ (declare_return_variable): Handle DECL_BY_REFERENCE.
+ * cp/cp-gimplify.c (is_invisiref_parm): Also handle RESULT_DECL.
+ (cp_genericize_r): Use convert_from_reference.
+ Don't dereference a RESULT_DECL directly inside a RETURN_EXPR.
+ (cp_genericize): Handle the RESULT_DECL. Unset TREE_ADDRESSABLE.
+
+ * c-common.c (c_warn_unused_result): Check TREE_USED before
+ warning about a CALL_EXPR with an unused value.
+
+2004-08-06 Mark Mitchell <mark@codesourcery.com>
+
+ * config/arm/symbian.h (CC1_SPEC): Avoid passing duplicate options
+ to the compiler. Use -fshort-wchar by default.
+
+2004-08-06 Pat Haugen <pthaugen@us.ibm.com>
+
+ * params.def (PARAM_MIN_CROSSJUMP_INSNS): New.
+ * cfgcleanup.c (try_crossjump_to_edge): Add minimum insn match
+ threshhold.
+ * doc/invoke.texi (param): Document min-crossjump-insns.
+
+2004-08-06 Richard Sandiford <rsandifo@redhat.com>
+
+ PR c/13282
+ * c.opt (Wmissing-field-initializers): New option.
+ * c-opts.c (c_common_post_options): Make -Wextra turn it on by default.
+ * c-typeck.c (pop_init_level): Guard the missing field warning with
+ warn_missing_field_initializers rather than extra_warnings.
+ * doc/invoke.texi (-Wmissing-field-initializers): Document, moving
+ some of the explanation from...
+ (-Wextra): ...here. Say that the missing field warning can be
+ seperately controlled by -Wmissing-field-initializers.
+
+2004-08-06 Paolo Bonzini <bonzini@gnu.org>
+
+ * expr.c (expand_expr_real_1) <ENTRY_VALUE_EXPR>: Remove.
+ * tree-inline.c (estimate_num_insns_1) <ENTRY_VALUE_EXPR>: Remove.
+ * tree-pretty-print.c (dump_generic_node) <ENTRY_VALUE_EXPR>: Remove.
+ * tree.def (ENTRY_VALUE_EXPR): Remove.
+
+2004-08-06 Jakub Jelinek <jakub@redhat.com>
+
+ * config/i386/i386.c (ix86_expand_clrmem): Move gen_cld down to
+ the places where it is actually needed. Don't use repz; stosb
+ for -Os with sufficiently small constant sizes.
+ For sufficiently small repz; stos{l,q} repeat counts use a sequence
+ of stos{l,q} instructions instead.
+
+2004-08-06 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
+
+ PR tree-optimization/16807
+ * loop-iv.c (dump_iv_info): Dump invariants correctly.
+ (iv_subreg, iv_extend): Express value of invariant purely in
+ base field.
+
+2004-08-06 Mark Mitchell <mark@codesourcery.com>
+
+ * config/arm/symbian.h (CC1_SPEC): Add -fno-short-enums.
+ (CC1PLUS_SPEC): Define it to be the same as CC1_SPEC.
+
+2004-08-06 Roman Zippel <zippel@linux-m68k.org>
+
+ * config/m68k/m68k.c (post_inc_operand,pre_dec_operand): New.
+ * config/m68k/m68k.h (PREDICATE_CODES): add post_inc_operand,
+ pre_dec_operand.
+ * config/m68k/m68k.md (zero_extend*2): delay the splitting of the
+ pattern until reload is finished to allow better code generation
+ and split them completely into separate instrunctions.
+ (*andsi3_split): New pattern.
+
+2004-08-05 Mark Mitchell <mark@codesourcery.com>
+
+ * tree.c (handle_dll_attribute): Move here from i383/winnt.c.
+ Replace use of DECL_INLINE with DECL_DECLARED_INLINE_P. Set
+ DECL_VISIBLITY. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if.
+ * tree.h (handle_dll_attribute): Declare. Test
+ TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if.
+ * c-common.h (c_determine_visibility): Declare.
+ * c-common.c (c_determine_visibility): New function.
+ * c-decl.c (finish_decl): Use it.
+ (finish_function): Likewise.
+ * defaults.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define it to
+ zero, by default. Use #if, not #ifdef, to test it.
+ * config/arm/arm.c (arm_attribute_table): Use
+ handle_dll_attribute. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with
+ #if.
+ * config/arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define to 1.
+ * config/i386/cygming.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define
+ to 1.
+ * config/i386/i386-protos.h (ix86_handle_dll_attribute): Remove.
+ * config/i386/i386.c (ix86_attribute_table): Use
+ handle_dll_attribute for dllimport/dllexport. Test
+ TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if.
+ * config/i386/winnt.c (ix86_handle_dll_attribute): Remove.
+ * config/mcore/mcore.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define
+ it to 1.
+ * config/mcore/mcore.c (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Test it
+ with #if.
+ * config/sh/symbian-pre.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define
+ it to 1.
+ * doc/extend.texi (dllexport): Clarify and correct documentation.
+ (dllimport): Likewise.
+ * doc/tm.texi (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Mention
+ handle_dll_attribute.
+
+2004-08-05 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
+
+ * tree-ssa-loop-manip.c: New file.
+ * Makefile.in (tree-ssa-loop-manip.o): Add.
+ * tree-flow.h (rewrite_into_loop_closed_ssa, verify_loop_closed_ssa):
+ Declare.
+ * tree-ssa-loop.c (tree_loop_optimizer_init): Create loop closed ssa
+ form.
+ (tree_ssa_loop_done): Verify loop closed ssa form.
+ * tree-ssa-loop-im.c (move_computations): Update loop closed ssa form.
+
+2004-08-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * pa.c (pa_asm_output_aligned_bss, pa_asm_output_aligned_common,
+ pa_asm_output_aligned_local): New functions.
+ * pa-protos.h: Add prototypes for pa_asm_output_aligned_bss,
+ pa_asm_output_aligned_common and pa_asm_output_aligned_local.
+ * pa-pro-end.h (ASM_OUTPUT_ALIGNED_COMMON): Use
+ pa_asm_output_aligned_common.
+ (ASM_OUTPUT_ALIGNED_LOCAL): Use pa_asm_output_aligned_local.
+ * pa.h (ASM_OUTPUT_ALIGNED_BSS): New macro.
+ (ASM_OUTPUT_ALIGNED_COMMON): Use pa_asm_output_aligned_common.
+ (ASM_OUTPUT_ALIGNED_LOCAL): Use pa_asm_output_aligned_local.
+ * pa64-hpux.h (MAX_OFILE_ALIGNMENT): New macro.
+ (ASM_OUTPUT_ALIGNED_COMMON): Use pa_asm_output_aligned_common.
+ (ASM_OUTPUT_ALIGNED_LOCAL): Use pa_asm_output_aligned_local.
+ * som.h (MAX_OFILE_ALIGNMENT): Provide maximum alignment of global
+ common data.
+
+2004-08-05 Andrew Pinski <apinski@apple.com>
+
+ * objc/objc-act.c (build_objc_string_object): Mark the address
+ expression as constant.
+
+2004-08-05 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/rs6000.c (rs6000_rtx_costs): Fix mask_operand
+ and mask64_operand thinkos. Handle ZERO_EXTRACT. Handle
+ SIGN_EXTEND / ZERO_EXTEND of MEM. Handle rlwinm patterns.
+
+2004-08-05 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * config/linux.h, config/i386/linux.h, config/sparc/linux.h:
+ Remove definitions conditioned on USE_GNULIBC_1 or conditioned
+ out, and associated obsolete comments.
+
+2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
+
+ * tree.h (force_fit_type): Return a tree, take three flags.
+ * fold-const.c (force_fit_type): Set TREE_OVERFLOW and
+ TREE_CONSTANT_OVERFLOW here.
+ (int_const_binop, const_binop): Adjust.
+ (size_int_type): Do sign extension here.
+ (fold_convert_const, optimize_bit_field_compare,
+ decode_field_reference, all_ones_mask_p, fold_div_compare, fold,
+ fold_negate_const, fold_abs_const, fold_not_const): Adjust.
+ * tree.c (size_in_bytes, int_fits_type_p): Adjust.
+
+2004-08-05 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
+
+ PR tree-optimization/16864
+ * tree-tailcall.c (eliminate_tail_call): Do not create phi nodes
+ for ssa names without default_def.
+
+2004-08-05 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/i386/i386.c (ix86_expand_prologue): If the function uses a
+ frame pointer, restore eax with an ebp-relative address.
+
+2004-08-04 Geoffrey Keating <geoffk@apple.com>
+
+ PR 14516
+ * c-common.c (c_expand_decl): Don't special-case static VAR_DECLs.
+ * c-common.h (make_rtl_for_local_static): Delete.
+ * c-decl.c (shadow_tag_warned): Clean up comment.
+ (finish_decl): Clean up spacing. Use set_user_assembler_name when
+ appropriate. Don't pass asmspec to rest_of_decl_compilation.
+ * c-semantics.c (make_rtl_for_local_static): Delete.
+ * expr.c (init_block_move_fn): Use set_user_assembler_name.
+ (init_block_clear_fn): Likewise.
+ * passes.c (rest_of_decl_compilation): Remove asmspec parameter,
+ expect it to be in DECL_ASSEMBLER_NAME. Update callers in many files.
+ * toplev.h (rest_of_decl_compilation): Remove asmspec parameter.
+ * tree.h (make_decl_rtl): Remove second parameter.
+ (set_user_assembler_name): New.
+ * varasm.c (set_user_assembler_name): New.
+ (make_decl_rtl): Remove second parameter. Update callers in many
+ files.
+
+2004-08-05 Adam Nemet <anemet@lnxw.com>
+
+ * config.gcc (case i[34567]86-*-lynxos*): Update to LynxOS 4.0.
+ (case rs6000-*-lynxos*): Rename it to powerpc-*-lynxos*. Update
+ to LynxOS 4.0.
+ * gthr-lynx.h: New file.
+ * config/lynx-ng.h: Remove file.
+ * config/lynx.h: Update to LynxOS 4.0.
+ * config/t-lynx: New file.
+ * config/i386/lynx-ng.h: Remove file.
+ * config/i386/lynx.h: Update to LynxOS 4.0.
+ * config/rs6000/lynxbase.h: Remove file.
+ * config/rs6000/lynx.h: Update to LynxOS 4.0.
+ * config/rs6000/t-lynx: New file.
+ * doc/install.texi (Options specification): Remove reference to
+ LynxOS from systems where --with-gnu-as makes a difference.
+
+2004-08-05 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * c-common.c (c_stddef_cpp_builtins): Define __INTMAX_TYPE__ and
+ __UINTMAX_TYPE__.
+ * c-cppbuiltin.c (builtin_define_stdint_macros): New. Define
+ __INTMAX_MAX__.
+ (c_cpp_builtins): Call it.
+ * doc/cpp.texi: Update.
+
+2004-08-04 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/rs6000.c (rs6000_rtx_costs): LABEL_REFs are zero
+ cost.
+
+2004-08-04 Jan Hubicka <jh@suse.cz>
+
+ * basic-block.h (profile_staus): New global variable.
+ * cfg.c (profile_status): Declare.
+ (check_bb_profile): Break out from ....; use profile_status
+ (dump_flow_info): ... here.
+ * cfgbuild.c (find_basic_blocks): Set profile_status.
+ * cfgexpand.c (tree_expand_cfg): Likewise.
+ * predict.c (estimate_probability): Likewise.
+ * profile.c (branch_prob): Likewise.
+ * tree-cfg.c (build_tree_cfg): Likewise.
+ (dump_function_to_file): Use check_bb_profile.
+ * tree-pretty-print (dump_bb_header): Likewise.
+ * tree-profile.c (do_tree_profiling): Cleanup.
+
+2004-08-04 Zack Weinberg <zack@codesourcery.com>
+
+ * Makefile.in (RTL_BASE_H, RTL_H): Correct.
+ (BUILD_RTL): Remove $(BUILD_PREFIX) from ggc-none.o.
+ (genobjs): Add errors.o, ggc-none.o, and min-insn-modes.o.
+ (read-rtl.o, gensupport.o, genconfig.o, genflags.o, gencodes.o)
+ (genconstants.o, genemit.o, genopinit.o, genrecog.o, genextract.o)
+ (genpeep.o, genattr.o, genattrtab.o, genautomata.o, genoutput.o)
+ (genconditions.o): Depend on $(RTL_BASE_H) not $(RTL_H).
+ (ggc-none.o, errors.o): Move rule to generators section;
+ correct dependencies.
+ (min-insn-modes.o): Move rule to generators section; remove
+ unnecessary explicit command; correct dependencies.
+ (print-rtl.o, print-rtl1.o): Correct dependencies.
+ ($(BUILD_PREFIX_1)errors.o. $(BUILD_PREFIX_1)ggc-none.o): Delete rule.
+ (mostlyclean): Update.
+
+ * errors.c: Include bconfig.h not config.h. Correct comment.
+ * gengtype.c, genpreds.c: Don't define NO_GENRTL_H.
+ * ggc-none.c: Include bconfig.h; not config.h or tm.h.
+ * print-rtl.c: Don't include tm_p.h.
+
+ * rtl.h: Move forward-decl of struct function down where it's
+ needed. Include genrtl.h #ifndef GENERATOR_FILE, not
+ #ifndef NO_GENRTL_H. Remove unnecessary #ifdef BUFSIZ statements.
+
+2004-08-04 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
+ Jeff Law <law@redhat.com>
+
+ * tree-cfg.c (tree_duplicate_bb): Mark duplicated definitions.
+ * tree-flow.h (rewrite_ssa_into_ssa): Declaration changed.
+ * tree-into-ssa.c (rewrite_ssa_into_ssa): Use new interface to
+ manipulate the duplicated ssa names.
+ * tree-ssanames.c (ssa_names_to_rewrite): New variable.
+ (marked_for_rewrite_p, any_marked_for_rewrite_p, mark_for_rewrite,
+ unmark_all_for_rewrite, marked_ssa_names, release_ssa_name_force):
+ New functions.
+ (release_ssa_name): Do not release ssa names that may have multiple
+ definitions.
+ * tree.h (release_ssa_name_force, mark_for_rewrite,
+ unmark_all_for_rewrite, marked_for_rewrite_p, any_marked_for_rewrite_p,
+ marked_ssa_names): Declare.
+ * tree-ssa-loop-ch.c (mark_defs_for_rewrite): Remove.
+ (duplicate_blocks): Remove call to mark_defs_for_rewrite.
+ Update call to rewrite_ssa_into_ssa.
+
+2004-08-04 Mark Mitchell <mark@codesourcery.com>
+
+ * defaults.h (TARGET_DECLSPEC): New macro.
+ * c-cppbuiltin.c (c_cpp_builtins): Handle TARGET_DECLSPEC.
+ * config/arm/pe.h (SUBTARGET_CPP_SPEC): Remove __declspec support.
+ * config/arm/symbian.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
+ * config/i386/beof-elf.h (TARGET_OS_CPP_BUILTINS): Remove
+ __declspec support.
+ (TARGET_DECLSPEC): Define.
+ * config/i386/cygming.h (TARGET_OS_CPP_BUILTINS): Remove
+ __declspec support.
+ * config/i386/i386-interix.h (TARGET_OS_CPP_BUILTINS): Remove
+ __declspec support.
+ (TARGET_DECLSPEC): Define.
+ * config/mcore/mcore.h (TARGET_CPU_CPP_BUILTINS): Remove
+ __declspec support.
+ * config/sh/symbian-pre.h (SUBTARGET_CPP_SPEC): Remove __declspec
+ support.
+ * doc/tm.texi (TARGET_DECLSPEC): Document.
+
+ * doc/extend.texi: Fix typo in comment.
+
+2004-08-04 Paul Brook <paul@codesourcery.com>
+
+ * target-def.h (TARGET_CXX_CDTOR_RETURNS_THIS): Define.
+ (TARGET_CXX): Use it.
+ * target.h (struct gcc_target): Add cdtor_returns_this.
+ * config/arm/arm.c (arm_cxx_cdtor_returns_this): New function.
+ (TARGET_CXX_CDTOR_RETURNS_THIS): Define.
+ * doc/tm.texi: Document TARGET_CXX_CDTOR_RETURNS_THIS.
+
+2004-08-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ * c-lex.c (narrowest_unsigned_type, narrowest_signed_type): Take
+ low/high pair. Do range checking directly.
+ (interpret_integer): Adjust.
+
+2004-08-04 Nick Clifton <nickc@redhat.com>
+
+ * config/sh/sh.h (TARGET_SWITCHES): Add no-renesas to select the
+ GCC ABI.
+ * doc/invoke.texi: Document this new switch and also the -mrenesas
+ switch.
+
+2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
+
+ * cfglayout.c (insn_locators_initialize): Update the current
+ location before initializing a location.
+
+2004-08-03 Zack Weinberg <zack@codesourcery.com>
+
+ * dbxout.c (dbxout_function_decl): Always call dbxout_function_end.
+ (dbxout_function_end): Return after emitting the "Lscope" symbol
+ under the same conditions that this function formerly wasn't called.
+ Add explanatory comments.
+
+ PR 14860
+ * c-decl.c (record_builtin_type): Call debug_hooks->type_decl
+ on the new decl.
+
+ PR 13956
+ * dbxout.c (dbx_output_lbrac, dbx_output_rbrac): New
+ functions, broken out of dbxout_block.
+ (dbxout_block): The block at depth 0 should get LBRAC/RBRAC
+ stabs too, if it contains symbols. Use the begin_label and
+ the Lscope label (emitted by dbxout_function_end) for the
+ range of this block.
+
2004-08-03 Nathanael Nerode <neroden@gcc.gnu.org>
* doc/install.texi: Update autoconf version requirements.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 142d03d5d79..100994db9e8 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -682,8 +682,8 @@ HOOKS_H = hooks.h
LANGHOOKS_DEF_H = langhooks-def.h $(HOOKS_H)
TARGET_DEF_H = target-def.h $(HOOKS_H)
MACHMODE_H = machmode.h mode-classes.def insn-modes.h
-RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H)
-RTL_H = $(RTL_BASE_H) genrtl.h input.h statistics.h
+RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H) input.h statistics.h
+RTL_H = $(RTL_BASE_H) genrtl.h
PARAMS_H = params.h params.def
TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h builtins.def \
input.h statistics.h vec.h
@@ -775,7 +775,7 @@ LDEXP_LIB = @LDEXP_LIB@
BUILD_LIBS = $(BUILD_LIBIBERTY)
BUILD_RTL = $(BUILD_PREFIX)rtl.o read-rtl.o \
- $(BUILD_PREFIX)ggc-none.o min-insn-modes.o
+ ggc-none.o min-insn-modes.o
BUILD_SUPPORT = gensupport.o insn-conditions.o
BUILD_EARLY_SUPPORT = gensupport.o dummy-conditions.o
@@ -898,7 +898,7 @@ OBJS-common = \
tree-ssa-phiopt.o tree-ssa-forwprop.o tree-nested.o tree-ssa-dse.o \
tree-ssa-dom.o domwalk.o tree-tailcall.o gimple-low.o tree-iterator.o \
tree-phinodes.o tree-ssanames.o tree-sra.o tree-complex.o tree-ssa-loop.o \
- tree-ssa-loop-niter.o \
+ tree-ssa-loop-niter.o tree-ssa-loop-manip.o \
alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \
cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o \
cfgloopanal.o cfgloopmanip.o loop-init.o loop-unswitch.o loop-unroll.o \
@@ -1558,9 +1558,6 @@ ggc-zone.o: ggc-zone.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TR
stringpool.o: stringpool.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(GGC_H) gt-stringpool.h
-ggc-none.o: ggc-none.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) $(GGC_H)
- $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
-
prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) Makefile prefix.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DPREFIX=\"$(prefix)\" \
@@ -1693,6 +1690,10 @@ tree-ssa-loop-ch.o : tree-ssa-loop-ch.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) tree-inline.h \
output.h diagnostic.h $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
tree-pass.h flags.h
+tree-ssa-loop-manip.o : tree-ssa-loop-manip.c $(TREE_FLOW_H) $(CONFIG_H) \
+ $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) \
+ output.h diagnostic.h $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
+ tree-pass.h cfglayout.h
tree-ssa-loop-im.o : tree-ssa-loop-im.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) domwalk.h $(PARAMS_H)\
output.h diagnostic.h $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
@@ -1792,14 +1793,11 @@ rtl.o : rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) $(RTL_H) real.h \
$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
print-rtl.o : print-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) real.h $(TM_P_H)
+ $(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) real.h
rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h \
$(RTL_H) hard-reg-set.h $(TM_P_H) insn-config.h $(RECOG_H) real.h $(FLAGS_H) \
$(BASIC_BLOCK_H) $(REGS_H) output.h target.h function.h
-errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h
- $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
-
varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) \
$(FLAGS_H) function.h $(EXPR_H) hard-reg-set.h $(REGS_H) \
output.h $(C_PRAGMA_H) toplev.h xcoffout.h debug.h $(GGC_H) $(TM_P_H) \
@@ -2451,7 +2449,8 @@ genprogs=$(genprognames:%=%$(build_exeext))
genobjs=$(genprognames:%=%.o) read-rtl.o gensupport.o genattrtab.o \
genautomata.o gengenrtl.o genmodes.o genpreds.o gengtype.o \
genconstants.o gen-protos.o scan.o fix-header.o scan-decls.o \
- gencheck.o dummy-conditions.o genconditions.o
+ gencheck.o dummy-conditions.o genconditions.o errors.o ggc-none.o \
+ min-insn-modes.o
$(genprogs): %$(build_exeext): %.o $(BUILD_RTL) $(BUILD_SUPPORT) \
$(BUILD_PRINT) $(BUILD_ERRORS) \
@@ -2461,21 +2460,22 @@ $(genprogs): %$(build_exeext): %.o $(BUILD_RTL) $(BUILD_SUPPORT) \
$(BUILD_ERRORS) $(BUILD_LIBS)
$(genobjs): %.o : %.c
- $(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
+ $(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) \
+ $< $(OUTPUT_OPTION)
-read-rtl.o: read-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) $(RTL_H) \
+read-rtl.o: read-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) $(RTL_BASE_H) \
$(OBSTACK_H) $(HASHTAB_H)
-gensupport.o: gensupport.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) $(RTL_H) \
+gensupport.o: gensupport.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) $(RTL_BASE_H) \
$(OBSTACK_H) errors.h $(HASHTAB_H) gensupport.h
-genconfig.o : genconfig.c $(RTL_H) $(BCONFIG_H) \
+genconfig.o : genconfig.c $(RTL_BASE_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h gensupport.h
-genflags.o : genflags.c $(RTL_H) $(OBSTACK_H) $(BCONFIG_H) \
+genflags.o : genflags.c $(RTL_BASE_H) $(OBSTACK_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h gensupport.h
-gencodes.o : gencodes.c $(RTL_H) $(BCONFIG_H) \
+gencodes.o : gencodes.c $(RTL_BASE_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h gensupport.h
genconstants$(build_exeext) : genconstants.o $(BUILD_RTL) $(BUILD_EARLY_SUPPORT) \
@@ -2484,25 +2484,25 @@ genconstants$(build_exeext) : genconstants.o $(BUILD_RTL) $(BUILD_EARLY_SUPPORT)
genconstants.o $(BUILD_EARLY_SUPPORT) $(BUILD_RTL) \
$(BUILD_ERRORS) $(BUILD_LIBS)
-genconstants.o : genconstants.c $(RTL_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) \
+genconstants.o : genconstants.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) \
errors.h
-genemit.o : genemit.c $(RTL_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) \
+genemit.o : genemit.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) \
errors.h gensupport.h
-genopinit.o : genopinit.c $(RTL_H) $(BCONFIG_H) \
+genopinit.o : genopinit.c $(RTL_BASE_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h gensupport.h
-genrecog.o : genrecog.c $(RTL_H) $(BCONFIG_H) \
+genrecog.o : genrecog.c $(RTL_BASE_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h gensupport.h
-genextract.o : genextract.c $(RTL_H) $(BCONFIG_H) \
+genextract.o : genextract.c $(RTL_BASE_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) insn-config.h errors.h gensupport.h
-genpeep.o : genpeep.c $(RTL_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) \
+genpeep.o : genpeep.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) \
errors.h gensupport.h
-genattr.o : genattr.c $(RTL_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) errors.h \
+genattr.o : genattr.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) errors.h \
gensupport.h
genattrtab$(build_exeext) : genattrtab.o genautomata.o \
@@ -2513,13 +2513,13 @@ genattrtab$(build_exeext) : genattrtab.o genautomata.o \
$(BUILD_RTL) $(BUILD_SUPPORT) $(BUILD_PRINT) $(BUILD_ERRORS) \
$(BUILD_VARRAY) $(BUILD_LIBS) -lm
-genattrtab.o : genattrtab.c $(RTL_H) $(OBSTACK_H) $(BCONFIG_H) \
+genattrtab.o : genattrtab.c $(RTL_BASE_H) $(OBSTACK_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(GGC_H) gensupport.h genattrtab.h
-genautomata.o : genautomata.c $(RTL_H) $(OBSTACK_H) $(BCONFIG_H) \
+genautomata.o : genautomata.c $(RTL_BASE_H) $(OBSTACK_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h varray.h genattrtab.h $(HASHTAB_H)
-genoutput.o : genoutput.c $(RTL_H) $(BCONFIG_H) \
+genoutput.o : genoutput.c $(RTL_BASE_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h gensupport.h
gengenrtl$(build_exeext) : gengenrtl.o $(BUILD_LIBDEPS)
@@ -2571,8 +2571,11 @@ genconditions$(build_exeext) : genconditions.o $(BUILD_EARLY_SUPPORT) \
genconditions.o $(BUILD_EARLY_SUPPORT) $(BUILD_RTL) \
$(BUILD_ERRORS) $(BUILD_LIBS)
-genconditions.o : genconditions.c $(RTL_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
- $(GTM_H) errors.h
+genconditions.o : genconditions.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
+ coretypes.h $(GTM_H) errors.h
+errors.o : errors.c $(BCONFIG_H) $(SYSTEM_H) errors.h
+ggc-none.o : ggc-none.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GGC_H)
+min-insn-modes.o : min-insn-modes.c $(BCONFIG_H) system.h $(MACHMODE_H)
#
# Compile the libraries to be used by gen*.
@@ -2586,16 +2589,11 @@ $(BUILD_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYST
$(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)rtl.c $(OUTPUT_OPTION)
print-rtl1.o: $(srcdir)/print-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
- $(GTM_H) $(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H)
+ $(GTM_H) $(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H)
rm -f print-rtl1.c
sed -e 's/config[.]h/bconfig.h/' $(srcdir)/print-rtl.c > print-rtl1.c
$(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) print-rtl1.c $(OUTPUT_OPTION)
-$(BUILD_PREFIX_1)errors.o: errors.c $(BCONFIG_H) $(SYSTEM_H) errors.h
- rm -f $(BUILD_PREFIX)errors.c
- sed -e 's/config[.]h/bconfig.h/' $(srcdir)/errors.c > $(BUILD_PREFIX)errors.c
- $(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)errors.c $(OUTPUT_OPTION)
-
$(BUILD_PREFIX_1)varray.o: varray.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) varray.h \
$(RTL_H) $(GGC_H) $(TREE_H) bitmap.h errors.h
rm -f $(BUILD_PREFIX)varray.c
@@ -2604,15 +2602,6 @@ $(BUILD_PREFIX_1)varray.o: varray.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H
$(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) \
$(BUILD_PREFIX)varray.c $(OUTPUT_OPTION)
-$(BUILD_PREFIX_1)ggc-none.o: ggc-none.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) $(GGC_H)
- rm -f $(BUILD_PREFIX)ggc-none.c
- sed -e 's/config[.]h/bconfig.h/' $(srcdir)/ggc-none.c > $(BUILD_PREFIX)ggc-none.c
- $(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)ggc-none.c $(OUTPUT_OPTION)
-
-min-insn-modes.o: min-insn-modes.c $(BCONFIG_H) $(SYSTEM_H) $(MACHMODE_H)
- $(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) \
- min-insn-modes.c $(OUTPUT_OPTION)
-
#
# Remake internationalization support.
intl.o: intl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h Makefile
@@ -3018,9 +3007,7 @@ mostlyclean: lang.mostlyclean
-rm -f *$(coverageexts)
-rm -rf libgcc
# Delete the temporary source copies for cross compilation.
- -rm -f $(BUILD_PREFIX_1)rtl.c $(BUILD_PREFIX_1)print-rtl.c
- -rm -f $(BUILD_PREFIX_1)bitmap.c $(BUILD_PREFIX_1)errors.c
- -rm -f $(BUILD_PREFIX_1)ggc-none.c print-rtl1.c
+ -rm -f $(BUILD_PREFIX_1)rtl.c $(BUILD_PREFIX_1)varray.c print-rtl1.c
# Delete the temp files made in the course of building libgcc.a.
-rm -f xlimits.h
# Delete other built files.
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index c42a66d6f0a..76f13687a52 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -330,6 +330,14 @@ extern int last_basic_block;
extern int n_edges;
+/* Signalize the status of profile information in the CFG. */
+extern enum profile_status
+{
+ PROFILE_ABSENT,
+ PROFILE_GUESSED,
+ PROFILE_READ
+} profile_status;
+
/* Index by basic block number, get basic block struct info. */
extern GTY(()) varray_type basic_block_info;
@@ -723,6 +731,7 @@ extern basic_block first_dom_son (enum cdi_direction, basic_block);
extern basic_block next_dom_son (enum cdi_direction, basic_block);
extern edge try_redirect_by_replacing_jump (edge, basic_block, bool);
extern void break_superblocks (void);
+extern void check_bb_profile (basic_block, FILE *);
#include "cfghooks.h"
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 30d96e6223b..868088f0e1c 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -770,8 +770,6 @@ c_expand_decl (tree decl)
expand_anon_union_decl (decl, NULL_TREE,
DECL_ANON_UNION_ELEMS (decl));
}
- else if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl))
- make_rtl_for_local_static (decl);
else
return 0;
@@ -3883,6 +3881,8 @@ c_stddef_cpp_builtins(void)
builtin_define_with_value ("__PTRDIFF_TYPE__", PTRDIFF_TYPE, 0);
builtin_define_with_value ("__WCHAR_TYPE__", MODIFIED_WCHAR_TYPE, 0);
builtin_define_with_value ("__WINT_TYPE__", WINT_TYPE, 0);
+ builtin_define_with_value ("__INTMAX_TYPE__", INTMAX_TYPE, 0);
+ builtin_define_with_value ("__UINTMAX_TYPE__", UINTMAX_TYPE, 0);
}
static void
@@ -4600,6 +4600,42 @@ handle_visibility_attribute (tree *node, tree name, tree args,
return NULL_TREE;
}
+/* Determine the ELF symbol visibility for DECL, which is either a
+ variable or a function. It is an error to use this function if a
+ definition of DECL is not available in this translation unit.
+ Returns true if the final visibility has been determined by this
+ function; false if the caller is free to make additional
+ modifications. */
+
+bool
+c_determine_visibility (tree decl)
+{
+ my_friendly_assert (TREE_CODE (decl) == VAR_DECL
+ || TREE_CODE (decl) == FUNCTION_DECL,
+ 20040805);
+
+ /* If the user explicitly specified the visibility with an
+ attribute, honor that. DECL_VISIBILITY will have been set during
+ the processing of the attribute. We check for an explicit
+ attribute, rather than just checking DECL_VISIBILITY_SPECIFIED,
+ to distinguish the use of an attribute from the use of a "#pragma
+ GCC visibility push(...)"; in the latter case we still want other
+ considerations to be able to overrule the #pragma. */
+ if (lookup_attribute ("visibility", DECL_ATTRIBUTES (decl)))
+ return true;
+
+ /* Anything that is exported must have default visibility. */
+ if (TARGET_DLLIMPORT_DECL_ATTRIBUTES
+ && lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl)))
+ {
+ DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT;
+ DECL_VISIBILITY_SPECIFIED (decl) = 1;
+ return true;
+ }
+
+ return false;
+}
+
/* Handle an "tls_model" attribute; arguments as in
struct attribute_spec.handler. */
@@ -5342,6 +5378,9 @@ c_warn_unused_result (tree *top_p)
break;
case CALL_EXPR:
+ if (TREE_USED (t))
+ break;
+
/* This is a naked call, as opposed to a CALL_EXPR nested inside
a MODIFY_EXPR. All calls whose value is ignored should be
represented like this. Look for the attribute. */
diff --git a/gcc/c-common.h b/gcc/c-common.h
index b0e0800aa89..cd3a493e4b9 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -654,6 +654,7 @@ extern void constant_expression_warning (tree);
extern tree convert_and_check (tree, tree);
extern void overflow_warning (tree);
extern void unsigned_conversion_warning (tree, tree);
+extern bool c_determine_visibility (tree);
#define c_sizeof(T) c_sizeof_or_alignof_type (T, SIZEOF_EXPR, 1)
#define c_alignof(T) c_sizeof_or_alignof_type (T, ALIGNOF_EXPR, 1)
@@ -789,7 +790,6 @@ extern int anon_aggr_type_p (tree);
(DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) = 0)
extern void emit_local_var (tree);
-extern void make_rtl_for_local_static (tree);
extern tree do_case (tree, tree);
extern tree build_stmt (enum tree_code, ...);
extern tree build_case_label (tree, tree, tree);
diff --git a/gcc/c-cppbuiltin.c b/gcc/c-cppbuiltin.c
index 3f0f688861d..f6a1805f0b8 100644
--- a/gcc/c-cppbuiltin.c
+++ b/gcc/c-cppbuiltin.c
@@ -54,6 +54,7 @@ static void builtin_define_with_int_value (const char *, HOST_WIDE_INT);
static void builtin_define_with_hex_fp_value (const char *, tree,
int, const char *,
const char *);
+static void builtin_define_stdint_macros (void);
static void builtin_define_type_max (const char *, tree, int);
static void builtin_define_type_precision (const char *, tree);
static void builtin_define_float_constants (const char *, const char *,
@@ -293,6 +294,23 @@ define__GNUC__ (void)
abort ();
}
+/* Define macros used by <stdint.h>. Currently only defines limits
+ for intmax_t, used by the testsuite. */
+static void
+builtin_define_stdint_macros (void)
+{
+ int intmax_long;
+ if (intmax_type_node == long_long_integer_type_node)
+ intmax_long = 2;
+ else if (intmax_type_node == long_integer_type_node)
+ intmax_long = 1;
+ else if (intmax_type_node == integer_type_node)
+ intmax_long = 0;
+ else
+ abort ();
+ builtin_define_type_max ("__INTMAX_MAX__", intmax_type_node, intmax_long);
+}
+
/* Hook that registers front end and target-specific built-ins. */
void
c_cpp_builtins (cpp_reader *pfile)
@@ -354,6 +372,9 @@ c_cpp_builtins (cpp_reader *pfile)
builtin_define_type_precision ("__CHAR_BIT__", char_type_node);
+ /* stdint.h (eventually) and the testsuite need to know these. */
+ builtin_define_stdint_macros ();
+
/* float.h needs to know these. */
builtin_define_with_int_value ("__FLT_EVAL_METHOD__",
@@ -426,6 +447,15 @@ c_cpp_builtins (cpp_reader *pfile)
TARGET_CPU_CPP_BUILTINS ();
TARGET_OS_CPP_BUILTINS ();
TARGET_OBJFMT_CPP_BUILTINS ();
+
+ /* Support the __declspec keyword by turning them into attributes.
+ Note that the current way we do this may result in a collision
+ with predefined attributes later on. This can be solved by using
+ one attribute, say __declspec__, and passing args to it. The
+ problem with that approach is that args are not accumulated: each
+ new appearance would clobber any existing args. */
+ if (TARGET_DECLSPEC)
+ builtin_define ("__declspec(x)=__attribute__((x))");
}
/* Pass an object-like macro. If it doesn't lie in the user's
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 202fa326bb5..978d10ce5c9 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1714,7 +1714,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
&& (TREE_CODE (olddecl) == FUNCTION_DECL
|| (TREE_CODE (olddecl) == VAR_DECL
&& TREE_STATIC (olddecl))))
- make_decl_rtl (olddecl, NULL);
+ make_decl_rtl (olddecl);
}
/* Handle when a new declaration NEWDECL has the same name as an old
@@ -2117,7 +2117,7 @@ implicitly_declare (tree functionid)
decl = pushdecl (decl);
/* No need to call objc_check_decl here - it's a function type. */
- rest_of_decl_compilation (decl, NULL, 0, 0);
+ rest_of_decl_compilation (decl, 0, 0);
/* Write a record describing this implicit function declaration
to the prototypes file (if requested). */
@@ -2552,12 +2552,10 @@ shadow_tag (tree declspecs)
shadow_tag_warned (declspecs, 0);
}
+/* WARNED is 1 if we have done a pedwarn, 2 if we have done a warning,
+ but no pedwarn. */
void
shadow_tag_warned (tree declspecs, int warned)
-
-
- /* 1 => we have done a pedwarn. 2 => we have done a warning, but
- no pedwarn. */
{
int found_tag = 0;
tree link;
@@ -2883,8 +2881,8 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
store_init_value (decl, init);
if (c_dialect_objc () && (TREE_CODE (decl) == VAR_DECL
- || TREE_CODE (decl) == FUNCTION_DECL
- || TREE_CODE (decl) == FIELD_DECL))
+ || TREE_CODE (decl) == FUNCTION_DECL
+ || TREE_CODE (decl) == FIELD_DECL))
objc_check_decl (decl);
/* Deduce size of array from initialization, if not already known. */
@@ -2925,7 +2923,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
in the array, because we start counting at zero. Therefore,
warn only if the value is less than zero. */
else if (pedantic && TYPE_DOMAIN (type) != 0
- && tree_int_cst_sgn (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) < 0)
+ && tree_int_cst_sgn (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) < 0)
error ("%Jzero or negative size array '%D'", decl, decl);
layout_decl (decl, 0);
@@ -2941,22 +2939,20 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
/* Don't give an error if we already gave one earlier. */
&& TREE_TYPE (decl) != error_mark_node
&& (TREE_STATIC (decl)
- ?
- /* A static variable with an incomplete type
- is an error if it is initialized.
- Also if it is not file scope.
- Otherwise, let it through, but if it is not `extern'
- then it may cause an error message later. */
- (DECL_INITIAL (decl) != 0
+ /* A static variable with an incomplete type
+ is an error if it is initialized.
+ Also if it is not file scope.
+ Otherwise, let it through, but if it is not `extern'
+ then it may cause an error message later. */
+ ? (DECL_INITIAL (decl) != 0
|| !DECL_FILE_SCOPE_P (decl))
- :
- /* An automatic variable with an incomplete type
- is an error. */
- !DECL_EXTERNAL (decl)))
- {
- error ("%Jstorage size of '%D' isn't known", decl, decl);
- TREE_TYPE (decl) = error_mark_node;
- }
+ /* An automatic variable with an incomplete type
+ is an error. */
+ : !DECL_EXTERNAL (decl)))
+ {
+ error ("%Jstorage size of '%D' isn't known", decl, decl);
+ TREE_TYPE (decl) = error_mark_node;
+ }
if ((DECL_EXTERNAL (decl) || TREE_STATIC (decl))
&& DECL_SIZE (decl) != 0)
@@ -2976,30 +2972,28 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
was a normal built-in. */
if (TREE_CODE (decl) == FUNCTION_DECL && asmspec)
{
- /* ASMSPEC is given, and not the name of a register. Mark the
- name with a star so assemble_name won't munge it. */
- char *starred = (char *) alloca (strlen (asmspec) + 2);
- starred[0] = '*';
- strcpy (starred + 1, asmspec);
-
if (DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL)
{
tree builtin = built_in_decls [DECL_FUNCTION_CODE (decl)];
- SET_DECL_RTL (builtin, NULL_RTX);
- change_decl_assembler_name (builtin, get_identifier (starred));
- if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMCPY)
- init_block_move_fn (starred);
- else if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMSET)
- init_block_clear_fn (starred);
- }
- SET_DECL_RTL (decl, NULL_RTX);
- change_decl_assembler_name (decl, get_identifier (starred));
+ set_user_assembler_name (builtin, asmspec);
+ if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMCPY)
+ init_block_move_fn (asmspec);
+ else if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMSET)
+ init_block_clear_fn (asmspec);
+ }
+ set_user_assembler_name (decl, asmspec);
}
/* If #pragma weak was used, mark the decl weak now. */
if (current_scope == file_scope)
maybe_apply_pragma_weak (decl);
+ /* If this is a variable definition, determine its ELF visibility. */
+ if (TREE_CODE (decl) == VAR_DECL
+ && TREE_STATIC (decl)
+ && !DECL_EXTERNAL (decl))
+ c_determine_visibility (decl);
+
/* Output the assembler code and/or RTL code for variables and functions,
unless the type is an undefined structure or union.
If not, it will get done when the type is completed. */
@@ -3010,6 +3004,25 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
if (c_dialect_objc ())
objc_check_decl (decl);
+ if (asmspec)
+ {
+ /* If this is not a static variable, issue a warning.
+ It doesn't make any sense to give an ASMSPEC for an
+ ordinary, non-register local variable. Historically,
+ GCC has accepted -- but ignored -- the ASMSPEC in
+ this case. */
+ if (! DECL_FILE_SCOPE_P (decl)
+ && TREE_CODE (decl) == VAR_DECL
+ && !C_DECL_REGISTER (decl)
+ && !TREE_STATIC (decl))
+ warning ("%Jignoring asm-specifier for non-static local "
+ "variable '%D'", decl, decl);
+ else if (C_DECL_REGISTER (decl))
+ change_decl_assembler_name (decl, get_identifier (asmspec));
+ else
+ set_user_assembler_name (decl, asmspec);
+ }
+
if (DECL_FILE_SCOPE_P (decl))
{
if (DECL_INITIAL (decl) == NULL_TREE
@@ -3018,44 +3031,27 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
when a tentative file-scope definition is seen.
But at end of compilation, do output code for them. */
DECL_DEFER_OUTPUT (decl) = 1;
- rest_of_decl_compilation (decl, asmspec, true, 0);
+ rest_of_decl_compilation (decl, true, 0);
}
else
{
- /* This is a local variable. If there is an ASMSPEC, the
- user has requested that we handle it specially. */
- if (asmspec)
+ /* In conjunction with an ASMSPEC, the `register'
+ keyword indicates that we should place the variable
+ in a particular register. */
+ if (asmspec && C_DECL_REGISTER (decl))
{
- /* In conjunction with an ASMSPEC, the `register'
- keyword indicates that we should place the variable
- in a particular register. */
- if (C_DECL_REGISTER (decl))
- {
- DECL_HARD_REGISTER (decl) = 1;
- /* This cannot be done for a structure with volatile
- fields, on which DECL_REGISTER will have been
- reset. */
- if (!DECL_REGISTER (decl))
- error ("cannot put object with volatile field into register");
- }
-
- /* If this is not a static variable, issue a warning.
- It doesn't make any sense to give an ASMSPEC for an
- ordinary, non-register local variable. Historically,
- GCC has accepted -- but ignored -- the ASMSPEC in
- this case. */
- if (TREE_CODE (decl) == VAR_DECL
- && !C_DECL_REGISTER (decl)
- && !TREE_STATIC (decl))
- warning ("%Jignoring asm-specifier for non-static local "
- "variable '%D'", decl, decl);
- else
- change_decl_assembler_name (decl, get_identifier (asmspec));
+ DECL_HARD_REGISTER (decl) = 1;
+ /* This cannot be done for a structure with volatile
+ fields, on which DECL_REGISTER will have been
+ reset. */
+ if (!DECL_REGISTER (decl))
+ error ("cannot put object with volatile field into register");
}
if (TREE_CODE (decl) != FUNCTION_DECL)
add_stmt (build_stmt (DECL_EXPR, decl));
}
+
if (!DECL_FILE_SCOPE_P (decl))
{
@@ -3083,7 +3079,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
&& variably_modified_type_p (TREE_TYPE (decl), NULL_TREE))
add_stmt (build_stmt (DECL_EXPR, decl));
- rest_of_decl_compilation (decl, NULL, DECL_FILE_SCOPE_P (decl), 0);
+ rest_of_decl_compilation (decl, DECL_FILE_SCOPE_P (decl), 0);
}
/* At the end of a declaration, throw away any variable type sizes
@@ -3234,7 +3230,7 @@ build_compound_literal (tree type, tree init)
DECL_COMDAT (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
pushdecl (decl);
- rest_of_decl_compilation (decl, NULL, 1, 0);
+ rest_of_decl_compilation (decl, 1, 0);
}
return complit;
@@ -5410,7 +5406,7 @@ finish_struct (tree t, tree fieldlist, tree attributes)
layout_decl (decl, 0);
if (c_dialect_objc ())
objc_check_decl (decl);
- rest_of_decl_compilation (decl, NULL, toplevel, 0);
+ rest_of_decl_compilation (decl, toplevel, 0);
if (! toplevel)
expand_decl (decl);
}
@@ -6359,6 +6355,9 @@ finish_function (void)
&& !targetm.have_ctors_dtors)
static_dtors = tree_cons (NULL_TREE, fndecl, static_dtors);
+ /* Finalize the ELF visibility for the function. */
+ c_determine_visibility (fndecl);
+
/* Genericize before inlining. Delay genericizing nested functions
until their parent function is genericized. Since finalizing
requires GENERIC, delay that as well. */
@@ -6600,12 +6599,15 @@ identifier_global_value (tree t)
void
record_builtin_type (enum rid rid_index, const char *name, tree type)
{
- tree id;
+ tree id, decl;
if (name == 0)
id = ridpointers[(int) rid_index];
else
id = get_identifier (name);
- pushdecl (build_decl (TYPE_DECL, id, type));
+ decl = build_decl (TYPE_DECL, id, type);
+ pushdecl (decl);
+ if (debug_hooks->type_decl)
+ debug_hooks->type_decl (decl, false);
}
/* Build the void_list_node (void_type_node having been created). */
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 38f14949b8e..8debd1da2e7 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -62,10 +62,10 @@ int c_lex_string_translate = 1;
static tree interpret_integer (const cpp_token *, unsigned int);
static tree interpret_float (const cpp_token *, unsigned int);
-static enum integer_type_kind
- narrowest_unsigned_type (tree, unsigned int);
-static enum integer_type_kind
- narrowest_signed_type (tree, unsigned int);
+static enum integer_type_kind narrowest_unsigned_type
+ (unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT, unsigned int);
+static enum integer_type_kind narrowest_signed_type
+ (unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT, unsigned int);
static enum cpp_ttype lex_string (const cpp_token *, tree *, bool);
static tree lex_charconst (const cpp_token *);
static void update_header_times (const char *);
@@ -460,10 +460,13 @@ c_lex (tree *value)
}
/* Returns the narrowest C-visible unsigned type, starting with the
- minimum specified by FLAGS, that can fit VALUE, or itk_none if
+ minimum specified by FLAGS, that can fit HIGH:LOW, or itk_none if
there isn't one. */
+
static enum integer_type_kind
-narrowest_unsigned_type (tree value, unsigned int flags)
+narrowest_unsigned_type (unsigned HOST_WIDE_INT low,
+ unsigned HOST_WIDE_INT high,
+ unsigned int flags)
{
enum integer_type_kind itk;
@@ -474,20 +477,23 @@ narrowest_unsigned_type (tree value, unsigned int flags)
else
itk = itk_unsigned_long_long;
- /* int_fits_type_p must think the type of its first argument is
- wider than its second argument, or it won't do the proper check. */
- TREE_TYPE (value) = widest_unsigned_literal_type_node;
-
for (; itk < itk_none; itk += 2 /* skip unsigned types */)
- if (int_fits_type_p (value, integer_types[itk]))
- return itk;
+ {
+ tree upper = TYPE_MAX_VALUE (integer_types[itk]);
+
+ if ((unsigned HOST_WIDE_INT)TREE_INT_CST_HIGH (upper) > high
+ || ((unsigned HOST_WIDE_INT)TREE_INT_CST_HIGH (upper) == high
+ && TREE_INT_CST_LOW (upper) >= low))
+ return itk;
+ }
return itk_none;
}
/* Ditto, but narrowest signed type. */
static enum integer_type_kind
-narrowest_signed_type (tree value, unsigned int flags)
+narrowest_signed_type (unsigned HOST_WIDE_INT low,
+ unsigned HOST_WIDE_INT high, unsigned int flags)
{
enum integer_type_kind itk;
@@ -498,13 +504,16 @@ narrowest_signed_type (tree value, unsigned int flags)
else
itk = itk_long_long;
- /* int_fits_type_p must think the type of its first argument is
- wider than its second argument, or it won't do the proper check. */
- TREE_TYPE (value) = widest_unsigned_literal_type_node;
for (; itk < itk_none; itk += 2 /* skip signed types */)
- if (int_fits_type_p (value, integer_types[itk]))
- return itk;
+ {
+ tree upper = TYPE_MAX_VALUE (integer_types[itk]);
+
+ if ((unsigned HOST_WIDE_INT)TREE_INT_CST_HIGH (upper) > high
+ || ((unsigned HOST_WIDE_INT)TREE_INT_CST_HIGH (upper) == high
+ && TREE_INT_CST_LOW (upper) >= low))
+ return itk;
+ }
return itk_none;
}
@@ -520,18 +529,19 @@ interpret_integer (const cpp_token *token, unsigned int flags)
integer = cpp_interpret_integer (parse_in, token, flags);
integer = cpp_num_sign_extend (integer, options->precision);
- value = build_int_2 (integer.low, integer.high);
/* The type of a constant with a U suffix is straightforward. */
if (flags & CPP_N_UNSIGNED)
- itk = narrowest_unsigned_type (value, flags);
+ itk = narrowest_unsigned_type (integer.low, integer.high, flags);
else
{
/* The type of a potentially-signed integer constant varies
depending on the base it's in, the standard in use, and the
length suffixes. */
- enum integer_type_kind itk_u = narrowest_unsigned_type (value, flags);
- enum integer_type_kind itk_s = narrowest_signed_type (value, flags);
+ enum integer_type_kind itk_u
+ = narrowest_unsigned_type (integer.low, integer.high, flags);
+ enum integer_type_kind itk_s
+ = narrowest_signed_type (integer.low, integer.high, flags);
/* In both C89 and C99, octal and hex constants may be signed or
unsigned, whichever fits tighter. We do not warn about this
@@ -577,11 +587,13 @@ interpret_integer (const cpp_token *token, unsigned int flags)
pedwarn ("integer constant is too large for \"%s\" type",
(flags & CPP_N_UNSIGNED) ? "unsigned long" : "long");
+ value = build_int_2 (integer.low, integer.high);
TREE_TYPE (value) = type;
/* Convert imaginary to a complex type. */
if (flags & CPP_N_IMAGINARY)
- value = build_complex (NULL_TREE, convert (type, integer_zero_node), value);
+ value = build_complex (NULL_TREE,
+ convert (type, integer_zero_node), value);
return value;
}
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index faa6023b1b9..92a6c7273a3 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -958,10 +958,12 @@ c_common_post_options (const char **pfilename)
if (flag_objc_exceptions && !flag_objc_sjlj_exceptions)
flag_exceptions = 1;
- /* -Wextra implies -Wsign-compare, but not if explicitly
- overridden. */
+ /* -Wextra implies -Wsign-compare and -Wmissing-field-initializers,
+ but not if explicitly overridden. */
if (warn_sign_compare == -1)
warn_sign_compare = extra_warnings;
+ if (warn_missing_field_initializers == -1)
+ warn_missing_field_initializers = extra_warnings;
/* Special format checking options don't work without -Wformat; warn if
they are used. */
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c
index f164c9596ed..f40f5a2e495 100644
--- a/gcc/c-semantics.c
+++ b/gcc/c-semantics.c
@@ -195,41 +195,6 @@ build_stmt (enum tree_code code, ...)
return ret;
}
-/* Create RTL for the local static variable DECL. */
-
-void
-make_rtl_for_local_static (tree decl)
-{
- const char *asmspec = NULL;
-
- /* If we inlined this variable, we could see it's declaration
- again. */
- if (TREE_ASM_WRITTEN (decl))
- return;
-
- /* If the DECL_ASSEMBLER_NAME is not the same as the DECL_NAME, then
- either we already created RTL for this DECL (and since it was a
- local variable, its DECL_ASSEMBLER_NAME got hacked up to prevent
- clashes with other local statics with the same name by a previous
- call to make_decl_rtl), or the user explicitly requested a
- particular assembly name for this variable, using the GNU
- extension for this purpose:
-
- int i asm ("j");
-
- There's no way to know which case we're in, here. But, it turns
- out we're safe. If there's already RTL, then
- rest_of_decl_compilation ignores the ASMSPEC parameter, so we
- may as well not pass it in. If there isn't RTL, then we didn't
- already create RTL, which means that the modification to
- DECL_ASSEMBLER_NAME came only via the explicit extension. */
- if (DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl)
- && !DECL_RTL_SET_P (decl))
- asmspec = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
-
- rest_of_decl_compilation (decl, asmspec, /*top_level=*/0, /*at_end=*/0);
-}
-
/* Let the back-end know about DECL. */
void
@@ -241,9 +206,7 @@ emit_local_var (tree decl)
if (DECL_HARD_REGISTER (decl))
/* The user specified an assembler name for this variable.
Set that up now. */
- rest_of_decl_compilation
- (decl, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)),
- /*top_level=*/0, /*at_end=*/0);
+ rest_of_decl_compilation (decl, 0, 0);
else
expand_decl (decl);
}
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 255b28a319a..fbc87ca5a37 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -4765,7 +4765,7 @@ pop_init_level (int implicit)
}
/* Warn when some struct elements are implicitly initialized to zero. */
- if (extra_warnings
+ if (warn_missing_field_initializers
&& constructor_type
&& TREE_CODE (constructor_type) == RECORD_TYPE
&& constructor_unfilled_fields)
diff --git a/gcc/c.opt b/gcc/c.opt
index 2f85c8cb35f..b84c5ba8408 100644
--- a/gcc/c.opt
+++ b/gcc/c.opt
@@ -294,6 +294,10 @@ Wmissing-declarations
C ObjC Var(warn_missing_declarations)
Warn about global functions without previous declarations
+Wmissing-field-initializers
+C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1)
+Warn about missing fields in struct initializers
+
Wmissing-format-attribute
C ObjC C++ ObjC++ Var(warn_missing_format_attribute)
Warn about functions which might be candidates for format attributes
diff --git a/gcc/cfg.c b/gcc/cfg.c
index 4b6de6d66a8..cee3cf2211c 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -94,6 +94,9 @@ alloc_pool rbi_pool;
void debug_flow_info (void);
static void free_edge (edge);
+
+/* Indicate the presence of the profile. */
+enum profile_status profile_status;
/* Called once at initialization time. */
@@ -468,6 +471,53 @@ clear_bb_flags (void)
bb->flags = 0;
}
+/* Check the consistency of profile information. We can't do that
+ in verify_flow_info, as the counts may get invalid for incompletely
+ solved graphs, later eliminating of conditionals or roundoff errors.
+ It is still practical to have them reported for debugging of simple
+ testcases. */
+void
+check_bb_profile (basic_block bb, FILE * file)
+{
+ edge e;
+ int sum = 0;
+ gcov_type lsum;
+
+ if (profile_status == PROFILE_ABSENT)
+ return;
+
+ if (bb != EXIT_BLOCK_PTR)
+ {
+ for (e = bb->succ; e; e = e->succ_next)
+ sum += e->probability;
+ if (bb->succ && abs (sum - REG_BR_PROB_BASE) > 100)
+ fprintf (file, "Invalid sum of outgoing probabilities %.1f%%\n",
+ sum * 100.0 / REG_BR_PROB_BASE);
+ lsum = 0;
+ for (e = bb->succ; e; e = e->succ_next)
+ lsum += e->count;
+ if (bb->succ && (lsum - bb->count > 100 || lsum - bb->count < -100))
+ fprintf (file, "Invalid sum of outgoing counts %i, should be %i\n",
+ (int) lsum, (int) bb->count);
+ }
+ if (bb != ENTRY_BLOCK_PTR)
+ {
+ sum = 0;
+ for (e = bb->pred; e; e = e->pred_next)
+ sum += EDGE_FREQUENCY (e);
+ if (abs (sum - bb->frequency) > 100)
+ fprintf (file,
+ "Invalid sum of incomming frequencies %i, should be %i\n",
+ sum, bb->frequency);
+ lsum = 0;
+ for (e = bb->pred; e; e = e->pred_next)
+ lsum += e->count;
+ if (lsum - bb->count > 100 || lsum - bb->count < -100)
+ fprintf (file, "Invalid sum of incomming counts %i, should be %i\n",
+ (int) lsum, (int) bb->count);
+ }
+}
+
void
dump_flow_info (FILE *file)
{
@@ -527,8 +577,6 @@ dump_flow_info (FILE *file)
FOR_EACH_BB (bb)
{
edge e;
- int sum;
- gcov_type lsum;
fprintf (file, "\nBasic block %d ", bb->index);
fprintf (file, "prev %d, next %d, ",
@@ -555,39 +603,23 @@ dump_flow_info (FILE *file)
fprintf (file, "\nRegisters live at end:");
dump_regset (bb->global_live_at_end, file);
-
+
putc ('\n', file);
- /* Check the consistency of profile information. We can't do that
- in verify_flow_info, as the counts may get invalid for incompletely
- solved graphs, later eliminating of conditionals or roundoff errors.
- It is still practical to have them reported for debugging of simple
- testcases. */
- sum = 0;
- for (e = bb->succ; e; e = e->succ_next)
- sum += e->probability;
- if (bb->succ && abs (sum - REG_BR_PROB_BASE) > 100)
- fprintf (file, "Invalid sum of outgoing probabilities %.1f%%\n",
- sum * 100.0 / REG_BR_PROB_BASE);
- sum = 0;
- for (e = bb->pred; e; e = e->pred_next)
- sum += EDGE_FREQUENCY (e);
- if (abs (sum - bb->frequency) > 100)
- fprintf (file,
- "Invalid sum of incomming frequencies %i, should be %i\n",
- sum, bb->frequency);
- lsum = 0;
- for (e = bb->pred; e; e = e->pred_next)
- lsum += e->count;
- if (lsum - bb->count > 100 || lsum - bb->count < -100)
- fprintf (file, "Invalid sum of incomming counts %i, should be %i\n",
- (int)lsum, (int)bb->count);
- lsum = 0;
- for (e = bb->succ; e; e = e->succ_next)
- lsum += e->count;
- if (bb->succ && (lsum - bb->count > 100 || lsum - bb->count < -100))
- fprintf (file, "Invalid sum of incomming counts %i, should be %i\n",
- (int)lsum, (int)bb->count);
+ if (bb->global_live_at_start)
+ {
+ fprintf (file, "\nRegisters live at start:");
+ dump_regset (bb->global_live_at_start, file);
+ }
+
+ if (bb->global_live_at_end)
+ {
+ fprintf (file, "\nRegisters live at end:");
+ dump_regset (bb->global_live_at_end, file);
+ }
+
+ putc ('\n', file);
+ check_bb_profile (bb, file);
}
putc ('\n', file);
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c
index 3316f024184..cb451efe4f2 100644
--- a/gcc/cfgbuild.c
+++ b/gcc/cfgbuild.c
@@ -546,6 +546,8 @@ find_basic_blocks (rtx f, int nregs ATTRIBUTE_UNUSED,
find_basic_blocks_1 (f);
+ profile_status = PROFILE_ABSENT;
+
/* Discover the edges of our cfg. */
make_edges (ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR->prev_bb, 0);
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 517f0eddfb6..648c4a4f7c3 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -1507,7 +1507,13 @@ try_crossjump_to_edge (int mode, edge e1, edge e2)
/* ... and part the second. */
nmatch = flow_find_cross_jump (mode, src1, src2, &newpos1, &newpos2);
- if (!nmatch)
+
+ /* Don't proceed with the crossjump unless we found a sufficient number
+ of matching instructions or the 'from' block was totally matched
+ (such that its predecessors will hopefully be redirected and the
+ block removed). */
+ if ((nmatch < PARAM_VALUE (PARAM_MIN_CROSSJUMP_INSNS))
+ && (newpos1 != BB_HEAD (src1)))
return false;
#ifndef CASE_DROPS_THROUGH
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index aa5911890ee..faa4635aa31 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -433,6 +433,8 @@ tree_expand_cfg (void)
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)));
}
+ profile_status = PROFILE_ABSENT;
+
/* Some backends want to know that we are expanding to RTL. */
currently_expanding_to_rtl = 1;
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index a81ce4c7f8c..b805ae5bda9 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -267,12 +267,38 @@ insn_locators_initialize (void)
for (insn = get_insns (); insn; insn = next)
{
+ int active = 0;
+
next = NEXT_INSN (insn);
- if ((active_insn_p (insn)
- && GET_CODE (PATTERN (insn)) != ADDR_VEC
- && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC)
- || !NEXT_INSN (insn)
+ if (NOTE_P (insn))
+ {
+ switch (NOTE_LINE_NUMBER (insn))
+ {
+ case NOTE_INSN_BLOCK_BEG:
+ case NOTE_INSN_BLOCK_END:
+ abort ();
+
+ default:
+ if (NOTE_LINE_NUMBER (insn) > 0)
+ {
+ expanded_location xloc;
+ NOTE_EXPANDED_LOCATION (xloc, insn);
+ line_number = xloc.line;
+ file_name = xloc.file;
+ }
+ break;
+ }
+ }
+ else
+ active = (active_insn_p (insn)
+ && GET_CODE (PATTERN (insn)) != ADDR_VEC
+ && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC);
+
+ check_block_change (insn, &block);
+
+ if (active
+ || !next
|| (!prologue_locator && file_name))
{
if (last_block != block)
@@ -296,34 +322,13 @@ insn_locators_initialize (void)
VARRAY_PUSH_CHAR_PTR (file_locators_files, (char *) file_name);
last_file_name = file_name;
}
+ if (!prologue_locator && file_name)
+ prologue_locator = loc;
+ if (!next)
+ epilogue_locator = loc;
+ if (active)
+ INSN_LOCATOR (insn) = loc;
}
- if (!prologue_locator && file_name)
- prologue_locator = loc;
- if (!NEXT_INSN (insn))
- epilogue_locator = loc;
- if (active_insn_p (insn))
- INSN_LOCATOR (insn) = loc;
- else if (NOTE_P (insn))
- {
- switch (NOTE_LINE_NUMBER (insn))
- {
- case NOTE_INSN_BLOCK_BEG:
- case NOTE_INSN_BLOCK_END:
- abort ();
-
- default:
- if (NOTE_LINE_NUMBER (insn) > 0)
- {
- expanded_location xloc;
- NOTE_EXPANDED_LOCATION (xloc, insn);
- line_number = xloc.line;
- file_name = xloc.file;
- }
- break;
- }
- }
-
- check_block_change (insn, &block);
}
/* Tag the blocks with a depth number so that change_scope can find
diff --git a/gcc/common.opt b/gcc/common.opt
index 24310f19322..7694df121c6 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -543,6 +543,10 @@ fnew-ra
Common Report Var(flag_new_regalloc)
Use graph-coloring register allocation
+freschedule-modulo-scheduled-loops
+Common Report Var(flag_resched_modulo_sched)
+Enable/Disable the traditional scheduling in loops that already passed modulo scheduling
+
fnon-call-exceptions
Common Report Var(flag_non_call_exceptions)
Support synchronous non-call exceptions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index d20d3c5c3a1..68d80826f2d 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -944,13 +944,13 @@ i[34567]86-pc-msdosdjgpp*)
gas=yes
;;
i[34567]86-*-lynxos*)
- if test x$gas = xyes
- then
- tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h svr3.h lynx.h i386/lynx.h"
- else
- tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h lynx-ng.h i386/lynx-ng.h"
- fi
- use_fixproto=yes
+ xm_defines=POSIX
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
+ tmake_file="i386/t-crtstuff t-lynx"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ thread_file=lynx
+ gnu_ld=yes
+ gas=yes
;;
i[34567]86-*-nto-qnx*)
tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h svr4.h i386/unix.h i386/nto.h"
@@ -1597,6 +1597,15 @@ powerpc-wrs-windiss*) # Instruction-level simulator for VxWorks.
thread_file=""
use_fixproto=yes
;;
+powerpc-*-lynxos*)
+ xm_defines=POSIX
+ tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
+ tmake_file="t-lynx rs6000/t-lynx"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ thread_file=lynx
+ gnu_ld=yes
+ gas=yes
+ ;;
powerpcle-*-sysv*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcos rs6000/t-ppccomm"
@@ -1651,12 +1660,6 @@ rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
thread_file='aix'
extra_headers=
;;
-rs6000-*-lynxos*)
- tm_file="svr3.h lynx.h rs6000/lynxbase.h rs6000/rs6000.h rs6000/lynx.h"
- tmake_file=rs6000/t-fprules
- use_collect2=yes
- use_fixproto=yes
- ;;
s390-*-linux*)
tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
tmake_file="${tmake_file} s390/t-crtstuff"
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 6630702e9d5..9a9e44732d0 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -449,6 +449,8 @@ dbxout_function_end (void)
{
char lscope_label_name[100];
+ /* The Lscope label must be emitted even if we aren't doing anything
+ else; dbxout_block needs it. */
function_section (current_function_decl);
/* Convert Ltext into the appropriate format for local labels in case
@@ -458,6 +460,16 @@ dbxout_function_end (void)
targetm.asm_out.internal_label (asmfile, "Lscope", scope_labelno);
scope_labelno++;
+ /* The N_FUN tag at the end of the function is a GNU extension,
+ which may be undesirable, and is unnecessary if we do not have
+ named sections. */
+ if (!use_gnu_debug_info_extensions
+#if defined(NO_DBX_FUNCTION_END)
+ || NO_DBX_FUNCTION_END
+#endif
+ || !targetm.have_named_sections)
+ return;
+
/* By convention, GCC will mark the end of a function with an N_FUN
symbol and an empty string. */
#ifdef DBX_OUTPUT_NFUN
@@ -792,12 +804,7 @@ dbxout_function_decl (tree decl)
#ifdef DBX_OUTPUT_FUNCTION_END
DBX_OUTPUT_FUNCTION_END (asmfile, decl);
#endif
- if (use_gnu_debug_info_extensions
-#if defined(NO_DBX_FUNCTION_END)
- && ! NO_DBX_FUNCTION_END
-#endif
- && targetm.have_named_sections)
- dbxout_function_end ();
+ dbxout_function_end ();
}
#endif /* DBX_DEBUGGING_INFO */
@@ -3089,6 +3096,46 @@ dbxout_args (tree args)
}
}
+/* Subroutine of dbxout_block. Emit an N_LBRAC stab referencing LABEL.
+ BEGIN_LABEL is the name of the beginning of the function, which may
+ be required. */
+static void
+dbx_output_lbrac (const char *label,
+ const char *begin_label ATTRIBUTE_UNUSED)
+{
+#ifdef DBX_OUTPUT_LBRAC
+ DBX_OUTPUT_LBRAC (asmfile, label);
+#else
+ fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_LBRAC);
+ assemble_name (asmfile, label);
+#if DBX_BLOCKS_FUNCTION_RELATIVE
+ putc ('-', asmfile);
+ assemble_name (asmfile, begin_label);
+#endif
+ fprintf (asmfile, "\n");
+#endif
+}
+
+/* Subroutine of dbxout_block. Emit an N_RBRAC stab referencing LABEL.
+ BEGIN_LABEL is the name of the beginning of the function, which may
+ be required. */
+static void
+dbx_output_rbrac (const char *label,
+ const char *begin_label ATTRIBUTE_UNUSED)
+{
+#ifdef DBX_OUTPUT_RBRAC
+ DBX_OUTPUT_RBRAC (asmfile, label);
+#else
+ fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_RBRAC);
+ assemble_name (asmfile, label);
+#if DBX_BLOCKS_FUNCTION_RELATIVE
+ putc ('-', asmfile);
+ assemble_name (asmfile, begin_label);
+#endif
+ fprintf (asmfile, "\n");
+#endif
+}
+
/* Output everything about a symbol block (a BLOCK node
that represents a scope level),
including recursive output of contained blocks.
@@ -3109,15 +3156,11 @@ dbxout_args (tree args)
static void
dbxout_block (tree block, int depth, tree args)
{
- int blocknum = -1;
-
-#if DBX_BLOCKS_FUNCTION_RELATIVE
const char *begin_label;
if (current_function_func_begin_label != NULL_TREE)
begin_label = IDENTIFIER_POINTER (current_function_func_begin_label);
else
begin_label = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
-#endif
while (block)
{
@@ -3125,6 +3168,7 @@ dbxout_block (tree block, int depth, tree args)
if (TREE_USED (block) && TREE_ASM_WRITTEN (block))
{
int did_output;
+ int blocknum = BLOCK_NUMBER (block);
/* In dbx format, the syms of a block come before the N_LBRAC.
If nothing is output, we don't need the N_LBRAC, either. */
@@ -3138,11 +3182,20 @@ dbxout_block (tree block, int depth, tree args)
the block. Use the block's tree-walk order to generate
the assembler symbols LBBn and LBEn
that final will define around the code in this block. */
- if (depth > 0 && did_output)
+ if (did_output)
{
char buf[20];
- blocknum = BLOCK_NUMBER (block);
- ASM_GENERATE_INTERNAL_LABEL (buf, "LBB", blocknum);
+ const char *scope_start;
+
+ if (depth == 0)
+ /* The outermost block doesn't get LBB labels; use
+ the function symbol. */
+ scope_start = begin_label;
+ else
+ {
+ ASM_GENERATE_INTERNAL_LABEL (buf, "LBB", blocknum);
+ scope_start = buf;
+ }
if (BLOCK_HANDLER_BLOCK (block))
{
@@ -3152,44 +3205,30 @@ dbxout_block (tree block, int depth, tree args)
{
fprintf (asmfile, "%s\"%s:C1\",%d,0,0,", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (decl)), N_CATCH);
- assemble_name (asmfile, buf);
+ assemble_name (asmfile, scope_start);
fprintf (asmfile, "\n");
decl = TREE_CHAIN (decl);
}
}
-
-#ifdef DBX_OUTPUT_LBRAC
- DBX_OUTPUT_LBRAC (asmfile, buf);
-#else
- fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_LBRAC);
- assemble_name (asmfile, buf);
-#if DBX_BLOCKS_FUNCTION_RELATIVE
- putc ('-', asmfile);
- assemble_name (asmfile, begin_label);
-#endif
- fprintf (asmfile, "\n");
-#endif
+ dbx_output_lbrac (scope_start, begin_label);
}
/* Output the subblocks. */
dbxout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE);
/* Refer to the marker for the end of the block. */
- if (depth > 0 && did_output)
+ if (did_output)
{
- char buf[20];
- ASM_GENERATE_INTERNAL_LABEL (buf, "LBE", blocknum);
-#ifdef DBX_OUTPUT_RBRAC
- DBX_OUTPUT_RBRAC (asmfile, buf);
-#else
- fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_RBRAC);
- assemble_name (asmfile, buf);
-#if DBX_BLOCKS_FUNCTION_RELATIVE
- putc ('-', asmfile);
- assemble_name (asmfile, begin_label);
-#endif
- fprintf (asmfile, "\n");
-#endif
+ char buf[100];
+ if (depth == 0)
+ /* The outermost block doesn't get LBE labels;
+ use the "scope" label which will be emitted
+ by dbxout_function_end. */
+ ASM_GENERATE_INTERNAL_LABEL (buf, "Lscope", scope_labelno);
+ else
+ ASM_GENERATE_INTERNAL_LABEL (buf, "LBE", blocknum);
+
+ dbx_output_rbrac (buf, begin_label);
}
}
block = BLOCK_CHAIN (block);
diff --git a/gcc/defaults.h b/gcc/defaults.h
index cd45f9180ec..a1e5300a006 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -415,6 +415,20 @@ do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
#define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
#endif
+#ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
+#define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
+#endif
+
+#ifndef TARGET_DECLSPEC
+#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
+/* If the target supports the "dllimport" attribute, users are
+ probably used to the "__declspec" syntax. */
+#define TARGET_DECLSPEC 1
+#else
+#define TARGET_DECLSPEC 0
+#endif
+#endif
+
/* By default, the preprocessor should be invoked the same way in C++
as in C. */
#ifndef CPLUSPLUS_CPP_SPEC
diff --git a/gcc/errors.c b/gcc/errors.c
index 09504d39d86..13288a8ced4 100644
--- a/gcc/errors.c
+++ b/gcc/errors.c
@@ -1,5 +1,5 @@
/* Basic error reporting routines.
- Copyright (C) 1999, 2000, 2001, 2003
+ Copyright (C) 1999, 2000, 2001, 2003, 2004
Free Software Foundation, Inc.
This file is part of GCC.
@@ -20,10 +20,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
/* warning, error, and fatal. These definitions are suitable for use
- in the generator programs; eventually we would like to use them in
- cc1 too, but that's a longer term project. */
+ in the generator programs; the compiler has a more elaborate suite
+ of diagnostic printers, found in diagnostic.c. */
-#include "config.h"
+#include "bconfig.h"
#include "system.h"
#include "errors.h"
diff --git a/gcc/expr.c b/gcc/expr.c
index 3a2c48284b0..b6f43cd3c48 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -1368,10 +1368,7 @@ init_block_move_fn (const char *asmspec)
}
if (asmspec)
- {
- SET_DECL_RTL (block_move_fn, NULL_RTX);
- SET_DECL_ASSEMBLER_NAME (block_move_fn, get_identifier (asmspec));
- }
+ set_user_assembler_name (block_move_fn, asmspec);
}
static tree
@@ -1385,7 +1382,7 @@ emit_block_move_libcall_fn (int for_call)
if (for_call && !emitted_extern)
{
emitted_extern = true;
- make_decl_rtl (block_move_fn, NULL);
+ make_decl_rtl (block_move_fn);
assemble_external (block_move_fn);
}
@@ -2432,10 +2429,7 @@ init_block_clear_fn (const char *asmspec)
}
if (asmspec)
- {
- SET_DECL_RTL (block_clear_fn, NULL_RTX);
- SET_DECL_ASSEMBLER_NAME (block_clear_fn, get_identifier (asmspec));
- }
+ set_user_assembler_name (block_clear_fn, asmspec);
}
static tree
@@ -2449,7 +2443,7 @@ clear_storage_libcall_fn (int for_call)
if (for_call && !emitted_extern)
{
emitted_extern = true;
- make_decl_rtl (block_clear_fn, NULL);
+ make_decl_rtl (block_clear_fn);
assemble_external (block_clear_fn);
}
@@ -6044,7 +6038,7 @@ expand_var (tree var)
else if (TREE_CODE (var) == VAR_DECL && !TREE_STATIC (var))
expand_decl (var);
else if (TREE_CODE (var) == VAR_DECL && TREE_STATIC (var))
- rest_of_decl_compilation (var, NULL, 0, 0);
+ rest_of_decl_compilation (var, 0, 0);
else if (TREE_CODE (var) == TYPE_DECL
|| TREE_CODE (var) == CONST_DECL
|| TREE_CODE (var) == FUNCTION_DECL
@@ -8430,9 +8424,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
return op0;
- case ENTRY_VALUE_EXPR:
- abort ();
-
/* COMPLEX type for Extended Pascal & Fortran */
case COMPLEX_EXPR:
{
diff --git a/gcc/final.c b/gcc/final.c
index 623582ce707..90311bc5371 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1704,6 +1704,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
case NOTE_INSN_FUNCTION_END:
case NOTE_INSN_REPEATED_LINE_NUMBER:
case NOTE_INSN_EXPECTED_VALUE:
+ case NOTE_DISABLE_SCHED_OF_BLOCK:
break;
case NOTE_INSN_UNLIKELY_EXECUTED_CODE:
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 503b6f094cf..0b225c05e02 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -39,8 +39,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
size_int takes an integer value, and creates a tree constant
with type from `sizetype'.
- force_fit_type takes a constant and prior overflow indicator, and
- forces the value to fit the type. It returns an overflow indicator. */
+ force_fit_type takes a constant, an overflowable flag and prior
+ overflow indicators. It forces the value to fit the type and sets
+ TREE_OVERFLOW and TREE_CONSTANT_OVERFLOW as appropriate. */
#include "config.h"
#include "system.h"
@@ -184,30 +185,32 @@ decode (HOST_WIDE_INT *words, unsigned HOST_WIDE_INT *low,
*hi = words[2] + words[3] * BASE;
}
-/* Make the integer constant T valid for its type by setting to 0 or 1 all
- the bits in the constant that don't belong in the type.
+/* T is an INT_CST node. OVERFLOWABLE indicates if we are interested
+ in overflow of the value, when >0 we are only interested in signed
+ overflow, for <0 we are interested in any overflow. OVERFLOWED
+ indicates whether overflow has already occurred. CONST_OVERFLOWED
+ indicates whether constant overflow has already occurred. We force
+ T's value to be within range of T's type (by setting to 0 or 1 all
+ the bits outside the type's range). We set TREE_OVERFLOWED if,
+ OVERFLOWED is non-zero,
+ or OVERFLOWABLE is >0 and signed overflow occurs
+ or OVERFLOWABLE is <0 and any overflow occurs
+ We set TREE_CONSTANT_OVERFLOWED if,
+ CONST_OVERFLOWED is non-zero
+ or we set TREE_OVERFLOWED.
+ We return either the original T, or a copy. */
- Return 1 if a signed overflow occurs, 0 otherwise. If OVERFLOW is
- nonzero, a signed overflow has already occurred in calculating T, so
- propagate it. */
-
-int
-force_fit_type (tree t, int overflow)
+tree
+force_fit_type (tree t, int overflowable, bool overflowed, bool overflowed_const)
{
unsigned HOST_WIDE_INT low;
HOST_WIDE_INT high;
unsigned int prec;
+ int sign_extended_type;
- if (TREE_CODE (t) == REAL_CST)
- {
- /* ??? Used to check for overflow here via CHECK_FLOAT_TYPE.
- Consider doing it via real_convert now. */
- return overflow;
- }
-
- else if (TREE_CODE (t) != INTEGER_CST)
- return overflow;
-
+ if (TREE_CODE (t) != INTEGER_CST)
+ abort ();
+
low = TREE_INT_CST_LOW (t);
high = TREE_INT_CST_HIGH (t);
@@ -216,54 +219,69 @@ force_fit_type (tree t, int overflow)
prec = POINTER_SIZE;
else
prec = TYPE_PRECISION (TREE_TYPE (t));
+ /* Size types *are* sign extended. */
+ sign_extended_type = (!TYPE_UNSIGNED (TREE_TYPE (t))
+ || (TREE_CODE (TREE_TYPE (t)) == INTEGER_TYPE
+ && TYPE_IS_SIZETYPE (TREE_TYPE (t))));
/* First clear all bits that are beyond the type's precision. */
if (prec == 2 * HOST_BITS_PER_WIDE_INT)
;
else if (prec > HOST_BITS_PER_WIDE_INT)
- TREE_INT_CST_HIGH (t)
- &= ~((HOST_WIDE_INT) (-1) << (prec - HOST_BITS_PER_WIDE_INT));
+ high &= ~((HOST_WIDE_INT) (-1) << (prec - HOST_BITS_PER_WIDE_INT));
else
{
- TREE_INT_CST_HIGH (t) = 0;
+ high = 0;
if (prec < HOST_BITS_PER_WIDE_INT)
- TREE_INT_CST_LOW (t) &= ~((unsigned HOST_WIDE_INT) (-1) << prec);
- }
-
- /* Unsigned types do not suffer sign extension or overflow unless they
- are a sizetype. */
- if (TYPE_UNSIGNED (TREE_TYPE (t))
- && ! (TREE_CODE (TREE_TYPE (t)) == INTEGER_TYPE
- && TYPE_IS_SIZETYPE (TREE_TYPE (t))))
- return overflow;
-
- /* If the value's sign bit is set, extend the sign. */
- if (prec != 2 * HOST_BITS_PER_WIDE_INT
- && (prec > HOST_BITS_PER_WIDE_INT
- ? 0 != (TREE_INT_CST_HIGH (t)
- & ((HOST_WIDE_INT) 1
- << (prec - HOST_BITS_PER_WIDE_INT - 1)))
- : 0 != (TREE_INT_CST_LOW (t)
- & ((unsigned HOST_WIDE_INT) 1 << (prec - 1)))))
- {
- /* Value is negative:
- set to 1 all the bits that are outside this type's precision. */
- if (prec > HOST_BITS_PER_WIDE_INT)
- TREE_INT_CST_HIGH (t)
- |= ((HOST_WIDE_INT) (-1) << (prec - HOST_BITS_PER_WIDE_INT));
- else
+ low &= ~((HOST_WIDE_INT) (-1) << prec);
+ }
+
+ if (!sign_extended_type)
+ /* No sign extension */;
+ else if (prec == 2 * HOST_BITS_PER_WIDE_INT)
+ /* Correct width already. */;
+ else if (prec > HOST_BITS_PER_WIDE_INT)
+ {
+ /* Sign extend top half? */
+ if (high & ((unsigned HOST_WIDE_INT)1
+ << (prec - HOST_BITS_PER_WIDE_INT - 1)))
+ high |= (HOST_WIDE_INT) (-1) << (prec - HOST_BITS_PER_WIDE_INT);
+ }
+ else if (prec == HOST_BITS_PER_WIDE_INT)
+ {
+ if ((HOST_WIDE_INT)low < 0)
+ high = -1;
+ }
+ else
+ {
+ /* Sign extend bottom half? */
+ if (low & ((unsigned HOST_WIDE_INT)1 << (prec - 1)))
{
- TREE_INT_CST_HIGH (t) = -1;
- if (prec < HOST_BITS_PER_WIDE_INT)
- TREE_INT_CST_LOW (t) |= ((unsigned HOST_WIDE_INT) (-1) << prec);
+ high = -1;
+ low |= (HOST_WIDE_INT)(-1) << prec;
}
}
- /* Return nonzero if signed overflow occurred. */
- return
- ((overflow | (low ^ TREE_INT_CST_LOW (t)) | (high ^ TREE_INT_CST_HIGH (t)))
- != 0);
+ /* If the value changed, return a new node. */
+ if (overflowed || overflowed_const
+ || low != TREE_INT_CST_LOW (t) || high != TREE_INT_CST_HIGH (t))
+ {
+ if (overflowed
+ || overflowable < 0
+ || (overflowable > 0 && sign_extended_type))
+ {
+ TREE_OVERFLOW (t) = 1;
+ TREE_CONSTANT_OVERFLOW (t) = 1;
+ }
+ else if (overflowed_const)
+ TREE_CONSTANT_OVERFLOW (t) = 1;
+
+ TREE_INT_CST_LOW (t) = low;
+ TREE_INT_CST_HIGH (t) = high;
+ }
+
+ return t;
}
/* Add two doubleword integers with doubleword result.
@@ -1404,25 +1422,24 @@ int_const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc)
TREE_TYPE (t) = TREE_TYPE (arg1);
}
- TREE_OVERFLOW (t)
- = ((notrunc
- ? (!uns || is_sizetype) && overflow
- : (force_fit_type (t, (!uns || is_sizetype) && overflow)
- && ! no_overflow))
- | TREE_OVERFLOW (arg1)
- | TREE_OVERFLOW (arg2));
+ if (notrunc)
+ {
+ /* Propagate overflow flags ourselves. */
+ if (((!uns || is_sizetype) && overflow)
+ | TREE_OVERFLOW (arg1) | TREE_OVERFLOW (arg2))
+ TREE_OVERFLOW (t) = 1;
- /* If we're doing a size calculation, unsigned arithmetic does overflow.
- So check if force_fit_type truncated the value. */
- if (is_sizetype
- && ! TREE_OVERFLOW (t)
- && (TREE_INT_CST_HIGH (t) != hi
- || TREE_INT_CST_LOW (t) != low))
- TREE_OVERFLOW (t) = 1;
-
- TREE_CONSTANT_OVERFLOW (t) = (TREE_OVERFLOW (t)
- | TREE_CONSTANT_OVERFLOW (arg1)
- | TREE_CONSTANT_OVERFLOW (arg2));
+ if (TREE_OVERFLOW (t) | TREE_CONSTANT_OVERFLOW (arg1)
+ | TREE_CONSTANT_OVERFLOW (arg2))
+ TREE_CONSTANT_OVERFLOW (t) = 1;
+ }
+ else
+ t = force_fit_type (t, 1,
+ ((!uns || is_sizetype) && overflow)
+ | TREE_OVERFLOW (arg1) | TREE_OVERFLOW (arg2),
+ TREE_CONSTANT_OVERFLOW (arg1)
+ | TREE_CONSTANT_OVERFLOW (arg2));
+
return t;
}
@@ -1479,9 +1496,7 @@ const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc)
t = build_real (type, real_value_truncate (mode, value));
- TREE_OVERFLOW (t)
- = (force_fit_type (t, 0)
- | TREE_OVERFLOW (arg1) | TREE_OVERFLOW (arg2));
+ TREE_OVERFLOW (t) = TREE_OVERFLOW (arg1) | TREE_OVERFLOW (arg2);
TREE_CONSTANT_OVERFLOW (t)
= TREE_OVERFLOW (t)
| TREE_CONSTANT_OVERFLOW (arg1)
@@ -1616,6 +1631,9 @@ tree
size_int_type (HOST_WIDE_INT number, tree type)
{
void **slot;
+ unsigned int prec;
+ HOST_WIDE_INT high;
+ unsigned HOST_WIDE_INT low;
if (size_htab == 0)
{
@@ -1626,12 +1644,26 @@ size_int_type (HOST_WIDE_INT number, tree type)
/* Adjust NEW_CONST to be the constant we want. If it's already in the
hash table, we return the value from the hash table. Otherwise, we
place that in the hash table and make a new node for the next time. */
- TREE_INT_CST_LOW (new_const) = number;
- TREE_INT_CST_HIGH (new_const) = number < 0 ? -1 : 0;
+ prec = TYPE_PRECISION (type);
TREE_TYPE (new_const) = type;
- TREE_OVERFLOW (new_const) = TREE_CONSTANT_OVERFLOW (new_const)
- = force_fit_type (new_const, 0);
+ TREE_OVERFLOW (new_const) = TREE_CONSTANT_OVERFLOW (new_const) = 0;
+ low = number;
+ if (number >= 0)
+ high = 0;
+ else
+ {
+ /* Sizetype IS sign extended. */
+ high = -1;
+ if (prec <= HOST_BITS_PER_WIDE_INT)
+ low |= (HOST_WIDE_INT)(-1) << (prec - 1);
+ }
+ TREE_INT_CST_LOW (new_const) = low;
+ TREE_INT_CST_HIGH (new_const) = high;
+ if (low != (unsigned HOST_WIDE_INT)number
+ || high != (number < 0 ? -1 : 0))
+ TREE_OVERFLOW (new_const) = TREE_CONSTANT_OVERFLOW (new_const) = 1;
+
slot = htab_find_slot (size_htab, new_const, INSERT);
if (*slot == 0)
{
@@ -1757,20 +1789,16 @@ fold_convert_const (enum tree_code code, tree type, tree arg1)
t = build_int_2 (TREE_INT_CST_LOW (arg1),
TREE_INT_CST_HIGH (arg1));
TREE_TYPE (t) = type;
- /* Indicate an overflow if (1) ARG1 already overflowed,
- or (2) force_fit_type indicates an overflow.
- Tell force_fit_type that an overflow has already occurred
- if ARG1 is a too-large unsigned value and T is signed.
- But don't indicate an overflow if converting a pointer. */
- TREE_OVERFLOW (t)
- = ((force_fit_type (t,
- (TREE_INT_CST_HIGH (arg1) < 0
- && (TYPE_UNSIGNED (type)
- < TYPE_UNSIGNED (TREE_TYPE (arg1)))))
- && ! POINTER_TYPE_P (TREE_TYPE (arg1)))
- || TREE_OVERFLOW (arg1));
- TREE_CONSTANT_OVERFLOW (t)
- = TREE_OVERFLOW (t) | TREE_CONSTANT_OVERFLOW (arg1);
+
+ t = force_fit_type (t,
+ /* Don't set the overflow when
+ converting a pointer */
+ !POINTER_TYPE_P (TREE_TYPE (arg1)),
+ (TREE_INT_CST_HIGH (arg1) < 0
+ && (TYPE_UNSIGNED (type)
+ < TYPE_UNSIGNED (TREE_TYPE (arg1))))
+ | TREE_OVERFLOW (arg1),
+ TREE_CONSTANT_OVERFLOW (arg1));
return t;
}
else if (TREE_CODE (arg1) == REAL_CST)
@@ -1785,7 +1813,6 @@ fold_convert_const (enum tree_code code, tree type, tree arg1)
FP-to-integer conversion is unspecified upon overflow. */
HOST_WIDE_INT high, low;
-
REAL_VALUE_TYPE r;
REAL_VALUE_TYPE x = TREE_REAL_CST (arg1);
@@ -1854,10 +1881,9 @@ fold_convert_const (enum tree_code code, tree type, tree arg1)
t = build_int_2 (low, high);
TREE_TYPE (t) = type;
- TREE_OVERFLOW (t)
- = TREE_OVERFLOW (arg1) | force_fit_type (t, overflow);
- TREE_CONSTANT_OVERFLOW (t)
- = TREE_OVERFLOW (t) | TREE_CONSTANT_OVERFLOW (arg1);
+
+ t = force_fit_type (t, -1, overflow | TREE_OVERFLOW (arg1),
+ TREE_CONSTANT_OVERFLOW (arg1));
return t;
}
}
@@ -1880,8 +1906,7 @@ fold_convert_const (enum tree_code code, tree type, tree arg1)
real_value_truncate (TYPE_MODE (type),
TREE_REAL_CST (arg1)));
- TREE_OVERFLOW (t)
- = TREE_OVERFLOW (arg1) | force_fit_type (t, 0);
+ TREE_OVERFLOW (t) = TREE_OVERFLOW (arg1);
TREE_CONSTANT_OVERFLOW (t)
= TREE_OVERFLOW (t) | TREE_CONSTANT_OVERFLOW (arg1);
return t;
@@ -3166,7 +3191,7 @@ optimize_bit_field_compare (enum tree_code code, tree compare_type,
/* Make the mask to be used against the extracted field. */
mask = build_int_2 (~0, ~0);
TREE_TYPE (mask) = unsigned_type;
- force_fit_type (mask, 0);
+ mask = force_fit_type (mask, 0, false, false);
mask = fold_convert (unsigned_type, mask);
mask = const_binop (LSHIFT_EXPR, mask, size_int (nbitsize - lbitsize), 0);
mask = const_binop (RSHIFT_EXPR, mask,
@@ -3323,7 +3348,8 @@ decode_field_reference (tree exp, HOST_WIDE_INT *pbitsize,
mask = build_int_2 (~0, ~0);
TREE_TYPE (mask) = unsigned_type;
- force_fit_type (mask, 0);
+ mask = force_fit_type (mask, 0, false, false);
+
mask = const_binop (LSHIFT_EXPR, mask, size_int (precision - *pbitsize), 0);
mask = const_binop (RSHIFT_EXPR, mask, size_int (precision - *pbitsize), 0);
@@ -3349,7 +3375,8 @@ all_ones_mask_p (tree mask, int size)
tmask = build_int_2 (~0, ~0);
TREE_TYPE (tmask) = lang_hooks.types.signed_type (type);
- force_fit_type (tmask, 0);
+ tmask = force_fit_type (tmask, 0, false, false);
+
return
tree_int_cst_equal (mask,
const_binop (RSHIFT_EXPR,
@@ -5675,10 +5702,7 @@ fold_div_compare (enum tree_code code, tree type, tree arg0, tree arg1)
TREE_INT_CST_HIGH (arg1), &lpart, &hpart);
prod = build_int_2 (lpart, hpart);
TREE_TYPE (prod) = TREE_TYPE (arg00);
- TREE_OVERFLOW (prod) = force_fit_type (prod, overflow)
- || TREE_INT_CST_HIGH (prod) != hpart
- || TREE_INT_CST_LOW (prod) != lpart;
- TREE_CONSTANT_OVERFLOW (prod) = TREE_OVERFLOW (prod);
+ prod = force_fit_type (prod, -1, overflow, false);
if (TYPE_UNSIGNED (TREE_TYPE (arg0)))
{
@@ -5693,11 +5717,8 @@ fold_div_compare (enum tree_code code, tree type, tree arg0, tree arg1)
&lpart, &hpart);
hi = build_int_2 (lpart, hpart);
TREE_TYPE (hi) = TREE_TYPE (arg00);
- TREE_OVERFLOW (hi) = force_fit_type (hi, overflow)
- || TREE_INT_CST_HIGH (hi) != hpart
- || TREE_INT_CST_LOW (hi) != lpart
- || TREE_OVERFLOW (prod);
- TREE_CONSTANT_OVERFLOW (hi) = TREE_OVERFLOW (hi);
+ hi = force_fit_type (hi, -1, overflow | TREE_OVERFLOW (prod),
+ TREE_CONSTANT_OVERFLOW (prod));
}
else if (tree_int_cst_sgn (arg01) >= 0)
{
@@ -7238,7 +7259,7 @@ fold (tree expr)
{
t1 = build_int_2 (-1, -1);
TREE_TYPE (t1) = type;
- force_fit_type (t1, 0);
+ t1 = force_fit_type (t1, 0, false, false);
return omit_one_operand (type, t1, arg1);
}
@@ -7248,7 +7269,7 @@ fold (tree expr)
{
t1 = build_int_2 (-1, -1);
TREE_TYPE (t1) = type;
- force_fit_type (t1, 0);
+ t1 = force_fit_type (t1, 0, false, false);
return omit_one_operand (type, t1, arg0);
}
@@ -7289,7 +7310,7 @@ fold (tree expr)
{
t1 = build_int_2 (-1, -1);
TREE_TYPE (t1) = type;
- force_fit_type (t1, 0);
+ t1 = force_fit_type (t1, 0, false, false);
return omit_one_operand (type, t1, arg1);
}
@@ -7299,7 +7320,7 @@ fold (tree expr)
{
t1 = build_int_2 (-1, -1);
TREE_TYPE (t1) = type;
- force_fit_type (t1, 0);
+ t1 = force_fit_type (t1, 0, false, false);
return omit_one_operand (type, t1, arg0);
}
@@ -10340,11 +10361,10 @@ fold_negate_const (tree arg0, tree type)
&low, &high);
t = build_int_2 (low, high);
TREE_TYPE (t) = type;
- TREE_OVERFLOW (t)
- = (TREE_OVERFLOW (arg0)
- | force_fit_type (t, overflow && !TYPE_UNSIGNED (type)));
- TREE_CONSTANT_OVERFLOW (t)
- = TREE_OVERFLOW (t) | TREE_CONSTANT_OVERFLOW (arg0);
+ t = force_fit_type (t, 1,
+ (overflow | TREE_OVERFLOW (arg0))
+ && !TYPE_UNSIGNED (type),
+ TREE_CONSTANT_OVERFLOW (arg0));
}
else if (TREE_CODE (arg0) == REAL_CST)
t = build_real (type, REAL_VALUE_NEGATE (TREE_REAL_CST (arg0)));
@@ -10386,11 +10406,8 @@ fold_abs_const (tree arg0, tree type)
&low, &high);
t = build_int_2 (low, high);
TREE_TYPE (t) = type;
- TREE_OVERFLOW (t)
- = (TREE_OVERFLOW (arg0)
- | force_fit_type (t, overflow));
- TREE_CONSTANT_OVERFLOW (t)
- = TREE_OVERFLOW (t) | TREE_CONSTANT_OVERFLOW (arg0);
+ t = force_fit_type (t, -1, overflow | TREE_OVERFLOW (arg0),
+ TREE_CONSTANT_OVERFLOW (arg0));
return t;
}
}
@@ -10422,9 +10439,8 @@ fold_not_const (tree arg0, tree type)
t = build_int_2 (~ TREE_INT_CST_LOW (arg0),
~ TREE_INT_CST_HIGH (arg0));
TREE_TYPE (t) = type;
- force_fit_type (t, 0);
- TREE_OVERFLOW (t) = TREE_OVERFLOW (arg0);
- TREE_CONSTANT_OVERFLOW (t) = TREE_CONSTANT_OVERFLOW (arg0);
+ t = force_fit_type (t, 0, TREE_OVERFLOW (arg0),
+ TREE_CONSTANT_OVERFLOW (arg0));
}
#ifdef ENABLE_CHECKING
else
diff --git a/gcc/function.c b/gcc/function.c
index 699a009ee03..4de748aceb8 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -1883,6 +1883,11 @@ aggregate_value_p (tree exp, tree fntype)
if (TREE_CODE (type) == VOID_TYPE)
return 0;
+ /* If the front end has decided that this needs to be passed by
+ reference, do so. */
+ if ((TREE_CODE (exp) == PARM_DECL || TREE_CODE (exp) == RESULT_DECL)
+ && DECL_BY_REFERENCE (exp))
+ return 1;
if (targetm.calls.return_in_memory (type, fntype))
return 1;
/* Types that are TREE_ADDRESSABLE must be constructed in memory,
@@ -2187,15 +2192,6 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm,
data->passed_pointer = true;
passed_mode = nominal_mode = Pmode;
}
- /* See if the frontend wants to pass this by invisible reference. */
- else if (passed_type != nominal_type
- && POINTER_TYPE_P (passed_type)
- && TREE_TYPE (passed_type) == nominal_type)
- {
- nominal_type = passed_type;
- data->passed_pointer = 1;
- passed_mode = nominal_mode = Pmode;
- }
/* Find mode as it is passed by the ABI. */
promoted_mode = passed_mode;
@@ -3095,9 +3091,14 @@ assign_parms (tree fndecl)
rtx addr = DECL_RTL (all.function_result_decl);
rtx x;
- addr = convert_memory_address (Pmode, addr);
- x = gen_rtx_MEM (DECL_MODE (result), addr);
- set_mem_attributes (x, result, 1);
+ if (DECL_BY_REFERENCE (result))
+ x = addr;
+ else
+ {
+ addr = convert_memory_address (Pmode, addr);
+ x = gen_rtx_MEM (DECL_MODE (result), addr);
+ set_mem_attributes (x, result, 1);
+ }
SET_DECL_RTL (result, x);
}
@@ -4385,17 +4386,22 @@ expand_function_end (void)
if (current_function_returns_struct
|| current_function_returns_pcc_struct)
{
- rtx value_address
- = XEXP (DECL_RTL (DECL_RESULT (current_function_decl)), 0);
+ rtx value_address = DECL_RTL (DECL_RESULT (current_function_decl));
tree type = TREE_TYPE (DECL_RESULT (current_function_decl));
+ rtx outgoing;
+
+ if (DECL_BY_REFERENCE (DECL_RESULT (current_function_decl)))
+ type = TREE_TYPE (type);
+ else
+ value_address = XEXP (value_address, 0);
+
#ifdef FUNCTION_OUTGOING_VALUE
- rtx outgoing
- = FUNCTION_OUTGOING_VALUE (build_pointer_type (type),
- current_function_decl);
+ outgoing = FUNCTION_OUTGOING_VALUE (build_pointer_type (type),
+ current_function_decl);
#else
- rtx outgoing
- = FUNCTION_VALUE (build_pointer_type (type), current_function_decl);
-#endif
+ outgoing = FUNCTION_VALUE (build_pointer_type (type),
+ current_function_decl);
+#endif
/* Mark this as a function return value so integrate will delete the
assignment and USE below when inlining this function. */
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index 56a96308b47..e430ef8accc 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -24,8 +24,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "tm.h"
#include "gengtype.h"
#include "gtyp-gen.h"
-
-#define NO_GENRTL_H
#include "rtl.h"
#undef abort
diff --git a/gcc/genpreds.c b/gcc/genpreds.c
index e52e424dd3c..b5601208df8 100644
--- a/gcc/genpreds.c
+++ b/gcc/genpreds.c
@@ -25,11 +25,8 @@ Boston, MA 02111-1307, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-
-#define NO_GENRTL_H
#include "rtl.h"
-
static void
output_predicate_decls (void)
{
diff --git a/gcc/ggc-none.c b/gcc/ggc-none.c
index 4c7e5190682..2e657dbaec8 100644
--- a/gcc/ggc-none.c
+++ b/gcc/ggc-none.c
@@ -23,11 +23,11 @@
need GC at all. This prevents problems with pulling in all the
tree stuff. */
-#include "config.h"
+#include "bconfig.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
#include "ggc.h"
+
struct alloc_zone *rtl_zone = NULL;
struct alloc_zone *garbage_zone = NULL;
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 53cf1feac32..3675c8a942f 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -895,6 +895,9 @@ gimplify_return_expr (tree stmt, tree *pre_p)
else
{
result_decl = TREE_OPERAND (ret_expr, 0);
+ if (TREE_CODE (result_decl) == INDIRECT_REF)
+ /* See through a return by reference. */
+ result_decl = TREE_OPERAND (result_decl, 0);
#ifdef ENABLE_CHECKING
if ((TREE_CODE (ret_expr) != MODIFY_EXPR
&& TREE_CODE (ret_expr) != INIT_EXPR)
@@ -3021,12 +3024,14 @@ gimplify_addr_expr (tree *expr_p, tree *pre_p, tree *post_p)
default:
/* We use fb_either here because the C frontend sometimes takes
- the address of a call that returns a struct. */
+ the address of a call that returns a struct; see
+ gcc.dg/c99-array-lval-1.c. The gimplifier will correctly make
+ the implied temporary explicit. */
ret = gimplify_expr (&TREE_OPERAND (expr, 0), pre_p, post_p,
is_gimple_addressable, fb_either);
if (ret != GS_ERROR)
{
- /* The above may have made an INDIRECT ref (e.g, Ada's NULL_EXPR),
+ /* The above may have made an INDIRECT_REF (e.g, Ada's NULL_EXPR),
so check for it here. It's not worth checking for the other
cases above. */
if (TREE_CODE (TREE_OPERAND (expr, 0)) == INDIRECT_REF)
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index 5feb0504312..0a01f86cb43 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -104,17 +104,17 @@ dump_iv_info (FILE *file, struct rtx_iv *iv)
return;
}
- if (iv->step == const0_rtx)
- {
- fprintf (file, "invariant ");
- print_rtl (file, iv->base);
- return;
- }
+ if (iv->step == const0_rtx
+ && !iv->first_special)
+ fprintf (file, "invariant ");
print_rtl (file, iv->base);
- fprintf (file, " + ");
- print_rtl (file, iv->step);
- fprintf (file, " * iteration");
+ if (iv->step != const0_rtx)
+ {
+ fprintf (file, " + ");
+ print_rtl (file, iv->step);
+ fprintf (file, " * iteration");
+ }
fprintf (file, " (in %s)", GET_MODE_NAME (iv->mode));
if (iv->mode != iv->extend_mode)
@@ -440,6 +440,21 @@ iv_constant (struct rtx_iv *iv, rtx cst, enum machine_mode mode)
static bool
iv_subreg (struct rtx_iv *iv, enum machine_mode mode)
{
+ /* If iv is invariant, just calculate the new value. */
+ if (iv->step == const0_rtx
+ && !iv->first_special)
+ {
+ rtx val = get_iv_value (iv, const0_rtx);
+ val = lowpart_subreg (mode, val, iv->extend_mode);
+
+ iv->base = val;
+ iv->extend = NIL;
+ iv->mode = iv->extend_mode = mode;
+ iv->delta = const0_rtx;
+ iv->mult = const1_rtx;
+ return true;
+ }
+
if (iv->extend_mode == mode)
return true;
@@ -465,6 +480,21 @@ iv_subreg (struct rtx_iv *iv, enum machine_mode mode)
static bool
iv_extend (struct rtx_iv *iv, enum rtx_code extend, enum machine_mode mode)
{
+ /* If iv is invariant, just calculate the new value. */
+ if (iv->step == const0_rtx
+ && !iv->first_special)
+ {
+ rtx val = get_iv_value (iv, const0_rtx);
+ val = simplify_gen_unary (extend, mode, val, iv->extend_mode);
+
+ iv->base = val;
+ iv->extend = NIL;
+ iv->mode = iv->extend_mode = mode;
+ iv->delta = const0_rtx;
+ iv->mult = const1_rtx;
+ return true;
+ }
+
if (mode != iv->extend_mode)
return false;
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index d9cb45c83c1..86e0f8c4640 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -152,7 +152,9 @@ void free_partial_schedule (partial_schedule_ptr);
void reset_partial_schedule (partial_schedule_ptr, int new_ii);
void print_partial_schedule (partial_schedule_ptr, FILE *);
ps_insn_ptr ps_add_node_check_conflicts (partial_schedule_ptr,
- ddg_node_ptr node, int cycle);
+ ddg_node_ptr node, int cycle,
+ sbitmap must_precede,
+ sbitmap must_follow);
void rotate_partial_schedule (partial_schedule_ptr, int);
void set_row_column_for_ps (partial_schedule_ptr);
@@ -874,7 +876,7 @@ sms_schedule (FILE *dump_file)
continue;
/* For debugging. */
- if (passes++ > MAX_SMS_LOOP_NUMBER && MAX_SMS_LOOP_NUMBER != -1)
+ if ((passes++ > MAX_SMS_LOOP_NUMBER) && (MAX_SMS_LOOP_NUMBER != -1))
{
if (dump_file)
fprintf (dump_file, "SMS reached MAX_PASSES... \n");
@@ -1086,8 +1088,8 @@ sms_schedule (FILE *dump_file)
int i;
start_sequence ();
- /* Copy the original loop code before modifying it - so we can use
- it later. */
+ /* Copy the original loop code before modifying it -
+ so we can use it later. */
for (i = 0; i < ps->g->num_nodes; i++)
duplicate_insn_chain (ps->g->nodes[i].first_note,
ps->g->nodes[i].insn);
@@ -1106,6 +1108,13 @@ sms_schedule (FILE *dump_file)
set_columns_for_ps (ps);
permute_partial_schedule (ps, g->closing_branch->first_note);
+
+ /* Mark this loop as software pipelined so the later
+ scheduling passes doesn't touch it. */
+ if (! flag_resched_modulo_sched)
+ emit_note_before (NOTE_DISABLE_SCHED_OF_BLOCK,
+ g->closing_branch->insn);
+
generate_reg_moves (ps);
if (dump_file)
print_node_sched_params (dump_file, g->num_nodes);
@@ -1217,6 +1226,9 @@ sms_schedule_by_order (ddg_ptr g, int mii, int maxii, int *nodes_order, FILE *du
sbitmap sched_nodes = sbitmap_alloc (num_nodes);
sbitmap psp = sbitmap_alloc (num_nodes);
sbitmap pss = sbitmap_alloc (num_nodes);
+ sbitmap must_precede = sbitmap_alloc (num_nodes);
+ sbitmap must_follow = sbitmap_alloc (num_nodes);
+
partial_schedule_ptr ps = create_partial_schedule (ii, g, DFA_HISTORY);
while (try_again_with_larger_ii && ii < maxii)
@@ -1258,9 +1270,11 @@ sms_schedule_by_order (ddg_ptr g, int mii, int maxii, int *nodes_order, FILE *du
ddg_node_ptr v_node = e->src;
if (TEST_BIT (sched_nodes, v_node->cuid))
{
- early_start = MAX (early_start,
- SCHED_TIME (v_node)
- + e->latency - (e->distance * ii));
+ int node_st = SCHED_TIME (v_node)
+ + e->latency - (e->distance * ii);
+
+ early_start = MAX (early_start, node_st);
+
if (e->data_type == MEM_DEP)
end = MIN (end, SCHED_TIME (v_node) + ii - 1);
}
@@ -1341,11 +1355,31 @@ sms_schedule_by_order (ddg_ptr g, int mii, int maxii, int *nodes_order, FILE *du
fprintf(dump_file, "Trying to schedule node %d in (%d .. %d) step %d\n",
u, start, end, step);
+ /* use must_follow & must_precede bitmaps to determine order
+ of nodes within the cycle. */
+ sbitmap_zero (must_precede);
+ sbitmap_zero (must_follow);
+ for (e = u_node->in; e != 0; e = e->next_in)
+ if (TEST_BIT (sched_nodes, e->src->cuid)
+ && e->latency == (ii * e->distance)
+ && start == SCHED_TIME (e->src))
+ SET_BIT (must_precede, e->src->cuid);
+
+ for (e = u_node->out; e != 0; e = e->next_out)
+ if (TEST_BIT (sched_nodes, e->dest->cuid)
+ && e->latency == (ii * e->distance)
+ && end == SCHED_TIME (e->dest))
+ SET_BIT (must_follow, e->dest->cuid);
+
success = 0;
if ((step > 0 && start < end) || (step < 0 && start > end))
for (c = start; c != end; c += step)
{
- ps_insn_ptr psi = ps_add_node_check_conflicts (ps, u_node, c);
+ ps_insn_ptr psi;
+
+ psi = ps_add_node_check_conflicts (ps, u_node, c,
+ must_precede,
+ must_follow);
if (psi)
{
@@ -1884,13 +1918,80 @@ remove_node_from_ps (partial_schedule_ptr ps, ps_insn_ptr ps_i)
return true;
}
+/* Unlike what literature describes for modulo scheduling (which focuses
+ on VLIW machines) the order of the instructions inside a cycle is
+ important. Given the bitmaps MUST_FOLLOW and MUST_PRECEDE we know
+ where the current instruction should go relative to the already
+ scheduled instructions in the given cycle. Go over these
+ instructions and find the first possible column to put it in. */
+static bool
+ps_insn_find_column (partial_schedule_ptr ps, ps_insn_ptr ps_i,
+ sbitmap must_precede, sbitmap must_follow)
+{
+ ps_insn_ptr next_ps_i;
+ ps_insn_ptr first_must_follow = NULL;
+ ps_insn_ptr last_must_precede = NULL;
+ int row;
+
+ if (! ps_i)
+ return false;
+
+ row = SMODULO (ps_i->cycle, ps->ii);
+
+ /* Find the first must follow and the last must precede
+ and insert the node immediatly after the must precede
+ but make sure that it there is no must follow after it. */
+ for (next_ps_i = ps->rows[row];
+ next_ps_i;
+ next_ps_i = next_ps_i->next_in_row)
+ {
+ if (TEST_BIT (must_follow, next_ps_i->node->cuid)
+ && ! first_must_follow)
+ first_must_follow = next_ps_i;
+ if (TEST_BIT (must_precede, next_ps_i->node->cuid))
+ {
+ /* If we have already met a node that must follow, then
+ there is no possible column. */
+ if (first_must_follow)
+ return false;
+ else
+ last_must_precede = next_ps_i;
+ }
+ }
+
+ /* Now insert the node after INSERT_AFTER_PSI. */
+
+ if (! last_must_precede)
+ {
+ ps_i->next_in_row = ps->rows[row];
+ ps_i->prev_in_row = NULL;
+ if (ps_i->next_in_row)
+ ps_i->next_in_row->prev_in_row = ps_i;
+ ps->rows[row] = ps_i;
+ }
+ else
+ {
+ ps_i->next_in_row = last_must_precede->next_in_row;
+ last_must_precede->next_in_row = ps_i;
+ ps_i->prev_in_row = last_must_precede;
+ if (ps_i->next_in_row)
+ ps_i->next_in_row->prev_in_row = ps_i;
+ }
+
+ return true;
+}
+
/* Advances the PS_INSN one column in its current row; returns false
- in failure and true in success. */
+ in failure and true in success. Bit N is set in MUST_FOLLOW if
+ the node with cuid N must be come after the node pointed to by
+ PS_I when scheduled in the same cycle. */
static int
-ps_insn_advance_column (partial_schedule_ptr ps, ps_insn_ptr ps_i)
+ps_insn_advance_column (partial_schedule_ptr ps, ps_insn_ptr ps_i,
+ sbitmap must_follow)
{
ps_insn_ptr prev, next;
int row;
+ ddg_node_ptr next_node;
if (!ps || !ps_i)
return false;
@@ -1900,17 +2001,12 @@ ps_insn_advance_column (partial_schedule_ptr ps, ps_insn_ptr ps_i)
if (! ps_i->next_in_row)
return false;
+ next_node = ps_i->next_in_row->node;
+
/* Check if next_in_row is dependent on ps_i, both having same sched
times (typically ANTI_DEP). If so, ps_i cannot skip over it. */
- if (ps_i->cycle == ps_i->next_in_row->cycle)
- {
- ddg_edge_ptr e;
- ddg_node_ptr next_node = ps_i->next_in_row->node;
-
- for (e = ps_i->node->out; e; e = e->next_out)
- if (e->dest == next_node)
- return false;
- }
+ if (TEST_BIT (must_follow, next_node->cuid))
+ return false;
/* Advace PS_I over its next_in_row in the doubly linked list. */
prev = ps_i->prev_in_row;
@@ -1935,14 +2031,17 @@ ps_insn_advance_column (partial_schedule_ptr ps, ps_insn_ptr ps_i)
}
/* Inserts a DDG_NODE to the given partial schedule at the given cycle.
- Returns 0 if this is not possible and a PS_INSN otherwise. */
+ Returns 0 if this is not possible and a PS_INSN otherwise. Bit N is
+ set in MUST_PRECEDE/MUST_FOLLOW if the node with cuid N must be come
+ before/after (respectively) the node pointed to by PS_I when scheduled
+ in the same cycle. */
static ps_insn_ptr
-add_node_to_ps (partial_schedule_ptr ps, ddg_node_ptr node, int cycle)
+add_node_to_ps (partial_schedule_ptr ps, ddg_node_ptr node, int cycle,
+ sbitmap must_precede, sbitmap must_follow)
{
- ps_insn_ptr ps_i, next_ps_i, advance_after;
+ ps_insn_ptr ps_i;
int rest_count = 1;
int row = SMODULO (cycle, ps->ii);
- ddg_edge_ptr e;
if (ps->rows[row]
&& ps->rows[row]->row_rest_count >= issue_rate)
@@ -1952,30 +2051,14 @@ add_node_to_ps (partial_schedule_ptr ps, ddg_node_ptr node, int cycle)
rest_count += ps->rows[row]->row_rest_count;
ps_i = create_ps_insn (node, rest_count, cycle);
- ps_i->next_in_row = ps->rows[row];
- ps_i->prev_in_row = NULL;
- if (ps_i->next_in_row)
- ps_i->next_in_row->prev_in_row = ps_i;
- ps->rows[row] = ps_i;
-
- /* Check if n is dependent on an insn already in row, having same cycle
- (typically ANTI_DEP). If so, n must skip over it. */
- advance_after = NULL;
- for (next_ps_i = ps_i->next_in_row;
- next_ps_i;
- next_ps_i = next_ps_i->next_in_row)
- if (next_ps_i->cycle == cycle)
- for (e = node->in; e; e = e->next_in)
- if (e->src == next_ps_i->node)
- advance_after = next_ps_i;
-
- if (advance_after)
- while (ps_i->prev_in_row != advance_after)
- if (!ps_insn_advance_column (ps, ps_i))
- {
- remove_node_from_ps (ps, ps_i);
- return NULL;
- }
+
+ /* Finds and inserts PS_I according to MUST_FOLLOW and
+ MUST_PRECEDE. */
+ if (! ps_insn_find_column (ps, ps_i, must_precede, must_follow))
+ {
+ free (ps_i);
+ return NULL;
+ }
return ps_i;
}
@@ -2049,16 +2132,20 @@ ps_has_conflicts (partial_schedule_ptr ps, int from, int to)
/* Checks if the given node causes resource conflicts when added to PS at
cycle C. If not the node is added to PS and returned; otherwise zero
- is returned. */
+ is returned. Bit N is set in MUST_PRECEDE/MUST_FOLLOW if the node with
+ cuid N must be come before/after (respectively) the node pointed to by
+ PS_I when scheduled in the same cycle. */
ps_insn_ptr
-ps_add_node_check_conflicts (partial_schedule_ptr ps, ddg_node_ptr n, int c)
+ps_add_node_check_conflicts (partial_schedule_ptr ps, ddg_node_ptr n,
+ int c, sbitmap must_precede,
+ sbitmap must_follow)
{
int has_conflicts = 0;
ps_insn_ptr ps_i;
- /* First add the node to the PS, if this succeeds check for conflicts,
- trying different issue slots in the same row. */
- if (! (ps_i = add_node_to_ps (ps, n, c)))
+ /* First add the node to the PS, if this succeeds check for
+ conflicts, trying different issue slots in the same row. */
+ if (! (ps_i = add_node_to_ps (ps, n, c, must_precede, must_follow)))
return NULL; /* Failed to insert the node at the given cycle. */
has_conflicts = ps_has_conflicts (ps, c, c)
@@ -2071,7 +2158,7 @@ ps_add_node_check_conflicts (partial_schedule_ptr ps, ddg_node_ptr n, int c)
scheduled in without conflicts. */
while (has_conflicts)
{
- if (! ps_insn_advance_column (ps, ps_i))
+ if (! ps_insn_advance_column (ps, ps_i, must_follow))
break;
has_conflicts = ps_has_conflicts (ps, c, c)
|| (ps->history > 0
diff --git a/gcc/params.def b/gcc/params.def
index 4b5a9ce7b93..aed7655c9a4 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -306,6 +306,12 @@ DEFPARAM(PARAM_MAX_CROSSJUMP_EDGES,
"The maximum number of incoming edges to consider for crossjumping",
100)
+/* The minimum number of matching instructions to consider for crossjumping. */
+DEFPARAM(PARAM_MIN_CROSSJUMP_INSNS,
+ "min-crossjump-insns",
+ "The minimum number of matching instructions to consider for crossjumping",
+ 5)
+
/* The maximum length of path considered in cse. */
DEFPARAM(PARAM_MAX_CSE_PATH_LENGTH,
"max-cse-path-length",
diff --git a/gcc/passes.c b/gcc/passes.c
index 4b50a1f5a41..2f625c57a6d 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -320,18 +320,16 @@ close_dump_file (enum dump_file_index index,
and TYPE_DECL nodes.
This does nothing for local (non-static) variables, unless the
- variable is a register variable with an ASMSPEC. In that case, or
- if the variable is not an automatic, it sets up the RTL and
- outputs any assembler code (label definition, storage allocation
- and initialization).
+ variable is a register variable with DECL_ASSEMBLER_NAME set. In
+ that case, or if the variable is not an automatic, it sets up the
+ RTL and outputs any assembler code (label definition, storage
+ allocation and initialization).
- DECL is the declaration. If ASMSPEC is nonzero, it specifies
- the assembler symbol name to be used. TOP_LEVEL is nonzero
+ DECL is the declaration. TOP_LEVEL is nonzero
if this declaration is not within a function. */
void
rest_of_decl_compilation (tree decl,
- const char *asmspec,
int top_level,
int at_end)
{
@@ -348,6 +346,11 @@ rest_of_decl_compilation (tree decl,
}
}
+ /* Can't defer this, because it needs to happen before any
+ later function definitions are processed. */
+ if (DECL_REGISTER (decl) && DECL_ASSEMBLER_NAME_SET_P (decl))
+ make_decl_rtl (decl);
+
/* Forward declarations for nested functions are not "external",
but we need to treat them as if they were. */
if (TREE_STATIC (decl) || DECL_EXTERNAL (decl)
@@ -355,9 +358,6 @@ rest_of_decl_compilation (tree decl,
{
timevar_push (TV_VARCONST);
- if (asmspec)
- make_decl_rtl (decl, asmspec);
-
/* Don't output anything when a tentative file-scope definition
is seen. But at end of compilation, do output code for them.
@@ -393,22 +393,6 @@ rest_of_decl_compilation (tree decl,
timevar_pop (TV_VARCONST);
}
- else if (DECL_REGISTER (decl) && asmspec != 0)
- {
- if (decode_reg_name (asmspec) >= 0)
- {
- SET_DECL_RTL (decl, NULL_RTX);
- make_decl_rtl (decl, asmspec);
- }
- else
- {
- error ("%Hinvalid register name `%s' for register variable",
- &DECL_SOURCE_LOCATION (decl), asmspec);
- DECL_REGISTER (decl) = 0;
- if (!top_level)
- expand_decl (decl);
- }
- }
else if (TREE_CODE (decl) == TYPE_DECL)
{
timevar_push (TV_SYMOUT);
diff --git a/gcc/predict.c b/gcc/predict.c
index e55427d9acc..d89282daa89 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -805,6 +805,8 @@ estimate_probability (struct loops *loops_info)
}
estimate_bb_frequencies (loops_info);
free_dominance_info (CDI_POST_DOMINATORS);
+ if (profile_status == PROFILE_ABSENT)
+ profile_status = PROFILE_GUESSED;
}
@@ -988,6 +990,8 @@ tree_estimate_probability (void)
flow_loops_free (&loops_info);
if (dump_file && (dump_flags & TDF_DETAILS))
dump_tree_cfg (dump_file, dump_flags);
+ if (profile_status == PROFILE_ABSENT)
+ profile_status = PROFILE_GUESSED;
}
/* __builtin_expect dropped tokens into the insn stream describing expected
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 7ae35a08f0a..2ca57a94c19 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -34,7 +34,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "flags.h"
#include "hard-reg-set.h"
#include "basic-block.h"
-#include "tm_p.h"
static FILE *outfile;
diff --git a/gcc/profile.c b/gcc/profile.c
index ad62f87ccb4..002e7a1b694 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -1005,6 +1005,7 @@ branch_prob (void)
}
free_edge_list (el);
+ profile_status = PROFILE_READ;
}
/* Union find algorithm implementation for the basic blocks using
diff --git a/gcc/rtl.h b/gcc/rtl.h
index f0ad10e7333..8174b6e3c4a 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -21,10 +21,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef GCC_RTL_H
#define GCC_RTL_H
-#include "statistics.h"
-
-struct function;
+#include "statistics.h"
#include "machmode.h"
#include "input.h"
@@ -985,6 +983,12 @@ enum insn_note
/* Generated at the start of a duplicated exit test. */
NOTE_INSN_LOOP_VTOP,
+ /* Mark that a block shouldn't be scheduled. This is currently
+ used in modulo scheduling. Modulo scheduling adds this note
+ to the blocks of the modulo-scheduled loops to disable scheduling
+ them in the later traditional scheduling passes. */
+ NOTE_DISABLE_SCHED_OF_BLOCK,
+
/* This kind of note is generated at the end of the function body,
just before the return insn or return label. In an optimizing
compilation it is deleted by the first jump optimization, after
@@ -1634,6 +1638,8 @@ extern rtx immed_double_const (HOST_WIDE_INT, HOST_WIDE_INT,
extern rtx force_const_mem (enum machine_mode, rtx);
/* In varasm.c */
+
+struct function;
extern rtx get_pool_constant (rtx);
extern rtx get_pool_constant_mark (rtx, bool *);
extern enum machine_mode get_pool_mode (rtx);
@@ -1983,7 +1989,7 @@ extern GTY(()) rtx return_address_pointer_rtx;
/* Include the RTL generation functions. */
-#ifndef NO_GENRTL_H
+#ifndef GENERATOR_FILE
#include "genrtl.h"
#ifndef USE_MAPPED_LOCATION
#undef gen_rtx_ASM_OPERANDS
@@ -2109,9 +2115,7 @@ extern int rtx_to_tree_code (enum rtx_code);
/* In cse.c */
extern int delete_trivially_dead_insns (rtx, int);
-#ifdef BUFSIZ
extern int cse_main (rtx, int, int, FILE *);
-#endif
extern void cse_condition_code_reg (void);
/* In jump.c */
@@ -2192,22 +2196,16 @@ extern rtx gen_lowpart_SUBREG (enum machine_mode, rtx);
extern int combine_instructions (rtx, unsigned int);
extern unsigned int extended_count (rtx, enum machine_mode, int);
extern rtx remove_death (unsigned int, rtx);
-#ifdef BUFSIZ
extern void dump_combine_stats (FILE *);
extern void dump_combine_total_stats (FILE *);
-#endif
/* In web.c */
extern void web_main (void);
/* In sched-rgn.c. */
-#ifdef BUFSIZ
extern void schedule_insns (FILE *);
-#endif
/* In sched-ebb.c. */
-#ifdef BUFSIZ
extern void schedule_ebbs (FILE *);
-#endif
/* In haifa-sched.c. */
extern void fix_sched_param (const char *, const char *);
@@ -2218,19 +2216,15 @@ extern void debug_rtx (rtx);
extern void debug_rtx_list (rtx, int);
extern void debug_rtx_range (rtx, rtx);
extern rtx debug_rtx_find (rtx, int);
-#ifdef BUFSIZ
extern void print_mem_expr (FILE *, tree);
extern void print_rtl (FILE *, rtx);
extern void print_simple_rtl (FILE *, rtx);
extern int print_rtl_single (FILE *, rtx);
extern void print_inline_rtx (FILE *, rtx, int);
-#endif
/* In loop.c */
extern void init_loop (void);
-#ifdef BUFSIZ
extern void loop_optimize (rtx, FILE *, int);
-#endif
extern void branch_target_load_optimize (bool);
/* In function.c */
@@ -2256,10 +2250,8 @@ extern rtx move_by_pieces (rtx, rtx, unsigned HOST_WIDE_INT,
extern void recompute_reg_usage (rtx, int);
extern int initialize_uninitialized_subregs (void);
extern void delete_dead_jumptables (void);
-#ifdef BUFSIZ
extern void print_rtl_with_bb (FILE *, rtx);
extern void dump_flow_info (FILE *);
-#endif
/* In expmed.c */
extern void init_expmed (void);
@@ -2271,18 +2263,14 @@ extern rtx expand_mult_highpart (enum machine_mode, rtx,
/* In gcse.c */
extern bool can_copy_p (enum machine_mode);
extern rtx fis_get_condition (rtx);
-#ifdef BUFSIZ
extern int gcse_main (rtx, FILE *);
extern int bypass_jumps (FILE *);
extern void gcse_after_reload_main (rtx, FILE *);
-#endif
/* In global.c */
extern void mark_elimination (int, int);
-#ifdef BUFSIZ
extern int global_alloc (FILE *);
extern void dump_global_regs (FILE *);
-#endif
#ifdef HARD_CONST
/* Yes, this ifdef is silly, but HARD_REG_SET is not always defined. */
extern void retry_global_alloc (int, HARD_REG_SET);
@@ -2311,26 +2299,18 @@ extern bool invalid_mode_change_p (unsigned int, enum reg_class,
enum machine_mode);
/* In regmove.c */
-#ifdef BUFSIZ
extern void regmove_optimize (rtx, int, FILE *);
-#endif
extern void combine_stack_adjustments (void);
/* In reorg.c */
-#ifdef BUFSIZ
extern void dbr_schedule (rtx, FILE *);
-#endif
/* In local-alloc.c */
-#ifdef BUFSIZ
extern void dump_local_alloc (FILE *);
-#endif
extern int local_alloc (void);
/* In reg-stack.c */
-#ifdef BUFSIZ
extern bool reg_to_stack (FILE *);
-#endif
/* In calls.c */
enum libcall_type
@@ -2363,11 +2343,9 @@ extern void init_rtl (void);
extern void traverse_md_constants (int (*) (void **, void *), void *);
struct md_constant { char *name, *value; };
-#ifdef BUFSIZ
+/* In read-rtl.c */
extern int read_skip_spaces (FILE *);
extern rtx read_rtx (FILE *);
-#endif
-
extern const char *read_rtx_filename;
extern int read_rtx_lineno;
@@ -2442,9 +2420,7 @@ extern void simplify_using_condition (rtx, rtx *, struct bitmap_head_def *);
extern void reg_alloc (void);
/* In modulo-sched.c. */
-#ifdef BUFSIZ
extern void sms_schedule (FILE *);
-#endif
struct rtl_hooks
{
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index 325e1693cd4..62d2f2343b7 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -117,6 +117,7 @@ static int *out_edges;
static int is_cfg_nonregular (void);
static int build_control_flow (struct edge_list *);
static void new_edge (int, int);
+static bool sched_is_disabled_for_current_region_p (void);
/* A region is the main entity for interblock scheduling: insns
are allowed to move between blocks in the same region, along
@@ -2332,6 +2333,37 @@ debug_dependencies (void)
fprintf (sched_dump, "\n");
}
+/* Returns true if all the basic blocks of the current region have
+ NOTE_DISABLE_SCHED_OF_BLOCK which means not to schedule that region. */
+static bool
+sched_is_disabled_for_current_region_p (void)
+{
+ rtx first_bb_insn, last_bb_insn, insn;
+ int bb;
+
+ for (bb = 0; bb < current_nr_blocks; bb++)
+ {
+ bool disable_sched = false;
+ /* Searching for NOTE_DISABLE_SCHED_OF_BLOCK note between the
+ start and end of the basic block. */
+ get_block_head_tail (BB_TO_BLOCK (bb), &first_bb_insn,
+ &last_bb_insn);
+ for (insn = last_bb_insn; insn != NULL && insn != first_bb_insn;
+ insn = PREV_INSN (insn))
+ if (GET_CODE (insn) == NOTE
+ && (NOTE_LINE_NUMBER (insn)
+ == NOTE_DISABLE_SCHED_OF_BLOCK))
+ {
+ disable_sched = true;
+ break;
+ }
+ if (! disable_sched)
+ return false;
+ }
+
+ return true;
+}
+
/* Schedule a region. A region is either an inner loop, a loop-free
subroutine, or a single basic block. Each bb in the region is
scheduled after its flow predecessors. */
@@ -2347,6 +2379,11 @@ schedule_region (int rgn)
current_nr_blocks = RGN_NR_BLOCKS (rgn);
current_blocks = RGN_BLOCKS (rgn);
+ /* Don't schedule region that is marked by
+ NOTE_DISABLE_SCHED_OF_BLOCK. */
+ if (sched_is_disabled_for_current_region_p ())
+ return;
+
init_deps_global ();
/* Initializations for region data dependence analysis. */
diff --git a/gcc/target-def.h b/gcc/target-def.h
index a3edb019a14..fe06c8c702a 100644
--- a/gcc/target-def.h
+++ b/gcc/target-def.h
@@ -412,13 +412,18 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TARGET_CXX_IMPORT_EXPORT_CLASS NULL
#endif
+#ifndef TARGET_CXX_CDTOR_RETURNS_THIS
+#define TARGET_CXX_CDTOR_RETURNS_THIS hook_bool_void_false
+#endif
+
#define TARGET_CXX \
{ \
TARGET_CXX_GUARD_TYPE, \
TARGET_CXX_GUARD_MASK_BIT, \
TARGET_CXX_GET_COOKIE_SIZE, \
TARGET_CXX_COOKIE_HAS_SIZE, \
- TARGET_CXX_IMPORT_EXPORT_CLASS \
+ TARGET_CXX_IMPORT_EXPORT_CLASS, \
+ TARGET_CXX_CDTOR_RETURNS_THIS \
}
/* The whole shebang. */
diff --git a/gcc/target.h b/gcc/target.h
index cdcaa18acd9..44562da3964 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -492,6 +492,8 @@ struct gcc_target
/* Allows backends to perform additional processing when
deciding if a class should be exported or imported. */
int (*import_export_class) (tree, int);
+ /* Returns true if constructors and destructors return "this". */
+ bool (*cdtor_returns_this) (void);
} cxx;
/* Leave the boolean fields at the end. */
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 5df0155adc1..80608400ccb 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -783,7 +783,7 @@ wrapup_global_declarations (tree *vec, int len)
if (needed)
{
reconsider = 1;
- rest_of_decl_compilation (decl, NULL, 1, 1);
+ rest_of_decl_compilation (decl, 1, 1);
}
}
}
diff --git a/gcc/toplev.h b/gcc/toplev.h
index 6f6cad32a7c..64983caaeb3 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -73,7 +73,7 @@ extern void pedwarn (const char *, ...) ATTRIBUTE_GCC_FE_DIAG(1,2);
extern void sorry (const char *, ...) ATTRIBUTE_GCC_FE_DIAG(1,2);
extern void inform (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
-extern void rest_of_decl_compilation (tree, const char *, int, int);
+extern void rest_of_decl_compilation (tree, int, int);
extern void rest_of_type_compilation (tree, int);
extern void rest_of_compilation (void);
extern void tree_rest_of_compilation (tree, bool);
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index c9d2424cf4c..86ac7ee3a92 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -125,6 +125,7 @@ build_tree_cfg (tree *tp)
/* Initialize the basic block array. */
init_flow ();
+ profile_status = PROFILE_ABSENT;
n_basic_blocks = 0;
last_basic_block = 0;
VARRAY_BB_INIT (basic_block_info, initial_cfg_capacity, "basic_block_info");
@@ -4297,8 +4298,19 @@ tree_duplicate_bb (basic_block bb)
{
basic_block new_bb;
block_stmt_iterator bsi, bsi_tgt;
+ tree phi;
+ def_optype defs;
+ v_may_def_optype v_may_defs;
+ v_must_def_optype v_must_defs;
+ unsigned j;
new_bb = create_empty_bb (EXIT_BLOCK_PTR->prev_bb);
+
+ for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ {
+ mark_for_rewrite (PHI_RESULT (phi));
+ }
+
bsi_tgt = bsi_start (new_bb);
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
{
@@ -4308,6 +4320,21 @@ tree_duplicate_bb (basic_block bb)
if (TREE_CODE (stmt) == LABEL_EXPR)
continue;
+ /* Record the definitions. */
+ get_stmt_operands (stmt);
+
+ defs = STMT_DEF_OPS (stmt);
+ for (j = 0; j < NUM_DEFS (defs); j++)
+ mark_for_rewrite (DEF_OP (defs, j));
+
+ v_may_defs = STMT_V_MAY_DEF_OPS (stmt);
+ for (j = 0; j < NUM_V_MAY_DEFS (v_may_defs); j++)
+ mark_for_rewrite (V_MAY_DEF_RESULT (v_may_defs, j));
+
+ v_must_defs = STMT_V_MUST_DEF_OPS (stmt);
+ for (j = 0; j < NUM_V_MUST_DEFS (v_must_defs); j++)
+ mark_for_rewrite (V_MUST_DEF_OP (v_must_defs, j));
+
copy = unshare_expr (stmt);
/* Copy also the virtual operands. */
@@ -4370,6 +4397,7 @@ dump_function_to_file (tree fn, FILE *file, int flags)
if (basic_block_info)
{
/* Make a CFG based dump. */
+ check_bb_profile (ENTRY_BLOCK_PTR, file);
if (!ignore_topmost_bind)
fprintf (file, "{\n");
@@ -4380,6 +4408,7 @@ dump_function_to_file (tree fn, FILE *file, int flags)
dump_generic_bb (file, bb, 2, flags);
fprintf (file, "}\n");
+ check_bb_profile (EXIT_BLOCK_PTR, file);
}
else
{
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 600d46256c2..f55943b5cdb 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -581,7 +581,7 @@ extern void kill_redundant_phi_nodes (void);
/* In tree-into-ssa.c */
extern void rewrite_into_ssa (bool);
-extern void rewrite_ssa_into_ssa (bitmap);
+extern void rewrite_ssa_into_ssa (void);
void compute_global_livein (bitmap, bitmap);
tree duplicate_ssa_name (tree, tree);
@@ -645,6 +645,8 @@ tree find_loop_niter_by_eval (struct loop *, edge *);
void estimate_numbers_of_iterations (struct loops *);
tree can_count_iv_in_wider_type (struct loop *, tree, tree, tree, tree);
void free_numbers_of_iterations_estimates (struct loops *);
+void rewrite_into_loop_closed_ssa (void);
+void verify_loop_closed_ssa (void);
void loop_commit_inserts (void);
bool for_each_index (tree *, bool (*) (tree, tree *, void *), void *);
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index bb2af8dc2bc..b34844d82f3 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -573,33 +573,6 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data)
}
}
}
- else if (TREE_CODE (*tp) == ADDR_EXPR
- && (lang_hooks.tree_inlining.auto_var_in_fn_p
- (TREE_OPERAND (*tp, 0), fn)))
- {
- /* Get rid of &* from inline substitutions. It can occur when
- someone takes the address of a parm or return slot passed by
- invisible reference. */
- tree decl = TREE_OPERAND (*tp, 0), value;
- splay_tree_node n;
-
- n = splay_tree_lookup (id->decl_map, (splay_tree_key) decl);
- if (n)
- {
- value = (tree) n->value;
- if (TREE_CODE (value) == INDIRECT_REF)
- {
- if (!lang_hooks.types_compatible_p
- (TREE_TYPE (*tp), TREE_TYPE (TREE_OPERAND (value, 0))))
- *tp = fold_convert (TREE_TYPE (*tp),
- TREE_OPERAND (value, 0));
- else
- *tp = TREE_OPERAND (value, 0);
-
- return copy_body_r (tp, walk_subtrees, data);
- }
- }
- }
else if (TREE_CODE (*tp) == INDIRECT_REF)
{
/* Get rid of *& from inline substitutions that can happen when a
@@ -861,7 +834,7 @@ declare_return_variable (inline_data *id, tree return_slot_addr,
return NULL_TREE;
}
- /* If there was a return slot, then the return value the the
+ /* If there was a return slot, then the return value is the
dereferenced address of that object. */
if (return_slot_addr)
{
@@ -869,7 +842,10 @@ declare_return_variable (inline_data *id, tree return_slot_addr,
a modify expression. */
if (modify_dest)
abort ();
- var = build_fold_indirect_ref (return_slot_addr);
+ if (DECL_BY_REFERENCE (result))
+ var = return_slot_addr;
+ else
+ var = build_fold_indirect_ref (return_slot_addr);
use = NULL;
goto done;
}
@@ -1233,7 +1209,6 @@ estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data)
case STATEMENT_LIST:
case ERROR_MARK:
case NON_LVALUE_EXPR:
- case ENTRY_VALUE_EXPR:
case FDESC_EXPR:
case VA_ARG_EXPR:
case TRY_CATCH_EXPR:
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 4d5992e2d56..edeeab5f1bf 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -1740,11 +1740,11 @@ rewrite_into_ssa (bool all)
timevar_pop (TV_TREE_SSA_OTHER);
}
-/* The ssa names in NAMES_TO_RENAME may have more than one definition;
+/* The marked ssa names may have more than one definition;
add phi nodes and rewrite them to fix this. */
void
-rewrite_ssa_into_ssa (bitmap names_to_rename)
+rewrite_ssa_into_ssa (void)
{
bitmap *dfs;
basic_block bb;
@@ -1753,9 +1753,11 @@ rewrite_ssa_into_ssa (bitmap names_to_rename)
unsigned i;
sbitmap snames_to_rename;
tree name;
+ bitmap to_rename;
- if (bitmap_first_set_bit (names_to_rename) < 0)
+ if (!any_marked_for_rewrite_p ())
return;
+ to_rename = marked_ssa_names ();
timevar_push (TV_TREE_SSA_OTHER);
@@ -1800,7 +1802,7 @@ rewrite_ssa_into_ssa (bitmap names_to_rename)
snames_to_rename = sbitmap_alloc (num_ssa_names);
sbitmap_zero (snames_to_rename);
- EXECUTE_IF_SET_IN_BITMAP (names_to_rename, 0, i,
+ EXECUTE_IF_SET_IN_BITMAP (to_rename, 0, i,
SET_BIT (snames_to_rename, i));
mark_def_sites_global_data.kills = sbitmap_alloc (num_ssa_names);
@@ -1826,7 +1828,7 @@ rewrite_ssa_into_ssa (bitmap names_to_rename)
set_current_def (ssa_name (i), NULL_TREE);
/* Insert PHI nodes at dominance frontiers of definition blocks. */
- insert_phi_nodes (dfs, names_to_rename);
+ insert_phi_nodes (dfs, to_rename);
/* Rewrite all the basic blocks in the program. */
timevar_push (TV_TREE_SSA_REWRITE_BLOCKS);
@@ -1855,8 +1857,9 @@ rewrite_ssa_into_ssa (bitmap names_to_rename)
/* Finalize the dominator walker. */
fini_walk_dominator_tree (&walk_data);
- EXECUTE_IF_SET_IN_BITMAP (names_to_rename, 0, i,
- release_ssa_name (ssa_name (i)));
+ unmark_all_for_rewrite ();
+
+ EXECUTE_IF_SET_IN_BITMAP (to_rename, 0, i, release_ssa_name (ssa_name (i)));
sbitmap_free (snames_to_rename);
@@ -1886,6 +1889,7 @@ rewrite_ssa_into_ssa (bitmap names_to_rename)
SSA_NAME_AUX (name) = NULL;
}
+ BITMAP_XFREE (to_rename);
timevar_pop (TV_TREE_SSA_OTHER);
}
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index a3a3a01d75e..a211a8235ca 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -1102,10 +1102,6 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
pp_character (buffer, '>');
break;
- case ENTRY_VALUE_EXPR:
- NIY;
- break;
-
case COMPLEX_EXPR:
pp_string (buffer, "COMPLEX_EXPR <");
dump_generic_node (buffer, TREE_OPERAND (node, 0), spc, flags, false);
@@ -2144,6 +2140,8 @@ dump_bb_header (pretty_printer *buffer, basic_block bb, int indent, int flags)
pp_newline (buffer);
}
}
+ pp_write_text_to_stream (buffer);
+ check_bb_profile (bb, buffer->buffer->stream);
}
/* Dumps end of basic block BB to buffer BUFFER indented by INDENT
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index c1498ea8d5c..1a7b744f3a7 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -146,7 +146,8 @@ tree_gen_const_delta_profiler (struct histogram_value *value ATTRIBUTE_UNUSED,
If it is, set up hooks for tree-based profiling.
Gate for pass_tree_profile. */
-static bool do_tree_profiling (void) {
+static bool do_tree_profiling (void)
+{
if (flag_tree_based_profiling)
{
tree_register_profile_hooks ();
diff --git a/gcc/tree-ssa-loop-ch.c b/gcc/tree-ssa-loop-ch.c
index ddb2438bae7..f10ec75e1cc 100644
--- a/gcc/tree-ssa-loop-ch.c
+++ b/gcc/tree-ssa-loop-ch.c
@@ -99,54 +99,6 @@ should_duplicate_loop_header_p (basic_block header, struct loop *loop,
return true;
}
-/* Marks variables defined in basic block BB for rewriting. */
-
-static void
-mark_defs_for_rewrite (basic_block bb)
-{
- tree stmt, var;
- block_stmt_iterator bsi;
- stmt_ann_t ann;
- def_optype defs;
- v_may_def_optype v_may_defs;
- v_must_def_optype v_must_defs;
- unsigned i;
-
- for (stmt = phi_nodes (bb); stmt; stmt = TREE_CHAIN (stmt))
- {
- var = PHI_RESULT (stmt);
- bitmap_set_bit (vars_to_rename, SSA_NAME_VERSION (var));
- }
-
- for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
- {
- stmt = bsi_stmt (bsi);
- get_stmt_operands (stmt);
- ann = stmt_ann (stmt);
-
- defs = DEF_OPS (ann);
- for (i = 0; i < NUM_DEFS (defs); i++)
- {
- var = DEF_OP (defs, i);
- bitmap_set_bit (vars_to_rename, SSA_NAME_VERSION (var));
- }
-
- v_may_defs = V_MAY_DEF_OPS (ann);
- for (i = 0; i < NUM_V_MAY_DEFS (v_may_defs); i++)
- {
- var = V_MAY_DEF_RESULT (v_may_defs, i);
- bitmap_set_bit (vars_to_rename, SSA_NAME_VERSION (var));
- }
-
- v_must_defs = V_MUST_DEF_OPS (ann);
- for (i = 0; i < NUM_V_MUST_DEFS (v_must_defs); i++)
- {
- var = V_MUST_DEF_OP (v_must_defs, i);
- bitmap_set_bit (vars_to_rename, SSA_NAME_VERSION (var));
- }
- }
-}
-
/* Duplicates destinations of edges in BBS_TO_DUPLICATE. */
static void
@@ -166,18 +118,6 @@ duplicate_blocks (varray_type bbs_to_duplicate)
preheader_edge = VARRAY_GENERIC_PTR_NOGC (bbs_to_duplicate, i);
header = preheader_edge->dest;
- /* It is sufficient to rewrite the definitions, since the uses of
- the operands defined outside of the duplicated basic block are
- still valid (every basic block that dominates the original block
- also dominates the duplicate). */
- mark_defs_for_rewrite (header);
- }
-
- for (i = 0; i < VARRAY_ACTIVE_SIZE (bbs_to_duplicate); i++)
- {
- preheader_edge = VARRAY_GENERIC_PTR_NOGC (bbs_to_duplicate, i);
- header = preheader_edge->dest;
-
if (!header->aux)
abort ();
header->aux = NULL;
@@ -210,8 +150,7 @@ duplicate_blocks (varray_type bbs_to_duplicate)
calculate_dominance_info (CDI_DOMINATORS);
- rewrite_ssa_into_ssa (vars_to_rename);
- bitmap_clear (vars_to_rename);
+ rewrite_ssa_into_ssa ();
}
/* Checks whether LOOP is a do-while style loop. */
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 589f42de65c..465442615cb 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -675,6 +675,13 @@ move_computations (void)
loop_commit_inserts ();
rewrite_into_ssa (false);
+ if (bitmap_first_set_bit (vars_to_rename) >= 0)
+ {
+ /* The rewrite of ssa names may cause violation of loop closed ssa
+ form invariants. TODO -- avoid these rewrites completely.
+ Information in virtual phi nodes is sufficient for it. */
+ rewrite_into_loop_closed_ssa ();
+ }
bitmap_clear (vars_to_rename);
}
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index 816be1526af..a1e6494712a 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -60,6 +60,11 @@ tree_loop_optimizer_init (FILE *dump)
rewrite_into_ssa (false);
bitmap_clear (vars_to_rename);
+ rewrite_into_loop_closed_ssa ();
+#ifdef ENABLE_CHECKING
+ verify_loop_closed_ssa ();
+#endif
+
return loops;
}
@@ -152,6 +157,10 @@ tree_ssa_loop_done (void)
if (!current_loops)
return;
+#ifdef ENABLE_CHECKING
+ verify_loop_closed_ssa ();
+#endif
+
loop_optimizer_finalize (current_loops,
(dump_flags & TDF_DETAILS ? dump_file : NULL));
current_loops = NULL;
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index 4e8985a4b21..94c14538b16 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -60,7 +60,10 @@ Boston, MA 02111-1307, USA. */
/* Array of all SSA_NAMEs used in the function. */
varray_type ssa_names;
-
+
+/* Bitmap of ssa names marked for rewriting. */
+bitmap ssa_names_to_rewrite;
+
/* Free list of SSA_NAMEs. This list is wiped at the end of each function
after we leave SSA form. */
static GTY (()) tree free_ssanames;
@@ -74,6 +77,64 @@ unsigned int ssa_name_nodes_reused;
unsigned int ssa_name_nodes_created;
#endif
+/* Returns true if ssa name VAR is marked for rewrite. */
+
+bool
+marked_for_rewrite_p (tree var)
+{
+ if (ssa_names_to_rewrite
+ && bitmap_bit_p (ssa_names_to_rewrite, SSA_NAME_VERSION (var)))
+ return true;
+
+ return false;
+}
+
+/* Returns true if any ssa name is marked for rewrite. */
+
+bool
+any_marked_for_rewrite_p (void)
+{
+ if (!ssa_names_to_rewrite)
+ return false;
+
+ return bitmap_first_set_bit (ssa_names_to_rewrite) != -1;
+}
+
+/* Mark ssa name VAR for rewriting. */
+
+void
+mark_for_rewrite (tree var)
+{
+ if (!ssa_names_to_rewrite)
+ ssa_names_to_rewrite = BITMAP_XMALLOC ();
+
+ bitmap_set_bit (ssa_names_to_rewrite, SSA_NAME_VERSION (var));
+}
+
+/* Unmark all ssa names marked for rewrite. */
+
+void
+unmark_all_for_rewrite (void)
+{
+ if (!ssa_names_to_rewrite)
+ return;
+
+ bitmap_clear (ssa_names_to_rewrite);
+}
+
+/* Return the bitmap of ssa names to rewrite. Copy the bitmap,
+ so that the optimizers cannot access internals directly */
+
+bitmap
+marked_ssa_names (void)
+{
+ bitmap ret = BITMAP_XMALLOC ();
+ if (ssa_names_to_rewrite)
+ bitmap_copy (ret, ssa_names_to_rewrite);
+
+ return ret;
+}
+
/* Initialize management of SSA_NAMEs. */
void
@@ -182,6 +243,12 @@ release_ssa_name (tree var)
if (var == var_ann (SSA_NAME_VAR (var))->default_def)
return;
+ /* If the ssa name is marked for rewriting, it may have multiple definitions,
+ but we may happen to remove just one of them. So do not remove the
+ ssa name now. */
+ if (marked_for_rewrite_p (var))
+ return;
+
/* release_ssa_name can be called multiple times on a single SSA_NAME.
However, it should only end up on our free list one time. We
keep a status bit in the SSA_NAME node itself to indicate it has
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 6599cbd09e2..6e1957c597d 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -730,7 +730,17 @@ eliminate_tail_call (struct tailcall *t)
if (!phi)
{
tree name = var_ann (param)->default_def;
- tree new_name = make_ssa_name (param, SSA_NAME_DEF_STMT (name));
+ tree new_name;
+
+ if (!name)
+ {
+ /* It may happen that the tag does not have a default_def in case
+ when all uses of it are dominated by a MUST_DEF. This however
+ means that it is not necessary to add a phi node for this
+ tag. */
+ continue;
+ }
+ new_name = make_ssa_name (param, SSA_NAME_DEF_STMT (name));
var_ann (param)->default_def = new_name;
phi = create_phi_node (name, first);
diff --git a/gcc/tree.c b/gcc/tree.c
index 30fcb556ab3..c8153b8f535 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1130,7 +1130,7 @@ size_in_bytes (tree type)
}
if (TREE_CODE (t) == INTEGER_CST)
- force_fit_type (t, 0);
+ t = force_fit_type (t, 0, false, false);
return t;
}
@@ -2887,7 +2887,7 @@ merge_decl_attributes (tree olddecl, tree newdecl)
DECL_ATTRIBUTES (newdecl));
}
-#ifdef TARGET_DLLIMPORT_DECL_ATTRIBUTES
+#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
/* Specialization of merge_decl_attributes for various Windows targets.
@@ -2940,6 +2940,81 @@ merge_dllimport_decl_attributes (tree old, tree new)
return a;
}
+/* Handle a "dllimport" or "dllexport" attribute; arguments as in
+ struct attribute_spec.handler. */
+
+tree
+handle_dll_attribute (tree * pnode, tree name, tree args, int flags,
+ bool *no_add_attrs)
+{
+ tree node = *pnode;
+
+ /* These attributes may apply to structure and union types being created,
+ but otherwise should pass to the declaration involved. */
+ if (!DECL_P (node))
+ {
+ if (flags & ((int) ATTR_FLAG_DECL_NEXT | (int) ATTR_FLAG_FUNCTION_NEXT
+ | (int) ATTR_FLAG_ARRAY_NEXT))
+ {
+ *no_add_attrs = true;
+ return tree_cons (name, args, NULL_TREE);
+ }
+ if (TREE_CODE (node) != RECORD_TYPE && TREE_CODE (node) != UNION_TYPE)
+ {
+ warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ *no_add_attrs = true;
+ }
+
+ return NULL_TREE;
+ }
+
+ /* Report error on dllimport ambiguities seen now before they cause
+ any damage. */
+ if (is_attribute_p ("dllimport", name))
+ {
+ /* Like MS, treat definition of dllimported variables and
+ non-inlined functions on declaration as syntax errors. We
+ allow the attribute for function definitions if declared
+ inline. */
+ if (TREE_CODE (node) == FUNCTION_DECL && DECL_INITIAL (node)
+ && !DECL_DECLARED_INLINE_P (node))
+ {
+ error ("%Jfunction `%D' definition is marked dllimport.", node, node);
+ *no_add_attrs = true;
+ }
+
+ else if (TREE_CODE (node) == VAR_DECL)
+ {
+ if (DECL_INITIAL (node))
+ {
+ error ("%Jvariable `%D' definition is marked dllimport.",
+ node, node);
+ *no_add_attrs = true;
+ }
+
+ /* `extern' needn't be specified with dllimport.
+ Specify `extern' now and hope for the best. Sigh. */
+ DECL_EXTERNAL (node) = 1;
+ /* Also, implicitly give dllimport'd variables declared within
+ a function global scope, unless declared static. */
+ if (current_function_decl != NULL_TREE && !TREE_STATIC (node))
+ TREE_PUBLIC (node) = 1;
+ }
+ }
+
+ /* Report error if symbol is not accessible at global scope. */
+ if (!TREE_PUBLIC (node)
+ && (TREE_CODE (node) == VAR_DECL
+ || TREE_CODE (node) == FUNCTION_DECL))
+ {
+ error ("%Jexternal linkage required for symbol '%D' because of "
+ "'%s' attribute.", node, node, IDENTIFIER_POINTER (name));
+ *no_add_attrs = true;
+ }
+
+ return NULL_TREE;
+}
+
#endif /* TARGET_DLLIMPORT_DECL_ATTRIBUTES */
/* Set the type qualifiers for TYPE to TYPE_QUALS, which is a bitmask
@@ -4563,7 +4638,8 @@ int_fits_type_p (tree c, tree type)
{
c = copy_node (c);
TREE_TYPE (c) = type;
- return !force_fit_type (c, 0);
+ c = force_fit_type (c, -1, false, false);
+ return !TREE_OVERFLOW (c);
}
}
diff --git a/gcc/tree.def b/gcc/tree.def
index 49cb8fb4e2e..552be88fc94 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -720,10 +720,6 @@ DEFTREECODE (SAVE_EXPR, "save_expr", 'e', 1)
Operand may have any mode. Result mode is Pmode. */
DEFTREECODE (ADDR_EXPR, "addr_expr", 'e', 1)
-/* Operand is a function constant; result is a function variable value
- of type EPmode. Used only for languages that need static chains. */
-DEFTREECODE (ENTRY_VALUE_EXPR, "entry_value_expr", 'e', 1)
-
/* Operand0 is a function constant; result is part N of a function
descriptor of type ptr_mode. */
DEFTREECODE (FDESC_EXPR, "fdesc_expr", 'e', 2)
diff --git a/gcc/tree.h b/gcc/tree.h
index 92e9a55d802..8bd1219240b 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1862,7 +1862,7 @@ struct tree_binfo GTY (())
#define DECL_RTL(NODE) \
(DECL_CHECK (NODE)->decl.rtl \
? (NODE)->decl.rtl \
- : (make_decl_rtl (NODE, NULL), (NODE)->decl.rtl))
+ : (make_decl_rtl (NODE), (NODE)->decl.rtl))
/* Set the DECL_RTL for NODE to RTL. */
#define SET_DECL_RTL(NODE, RTL) set_decl_rtl (NODE, RTL)
/* Returns nonzero if the DECL_RTL for NODE has already been set. */
@@ -2658,6 +2658,13 @@ extern void replace_ssa_name_symbol (tree, tree);
extern void ssanames_print_statistics (void);
#endif
+extern void mark_for_rewrite (tree);
+extern void unmark_all_for_rewrite (void);
+extern bool marked_for_rewrite_p (tree);
+extern bool any_marked_for_rewrite_p (void);
+extern struct bitmap_head_def *marked_ssa_names (void);
+
+
/* Return the (unique) IDENTIFIER_NODE node for a given name.
The name is supplied as a char *. */
@@ -2887,10 +2894,13 @@ extern tree lookup_attribute (const char *, tree);
extern tree merge_attributes (tree, tree);
-#ifdef TARGET_DLLIMPORT_DECL_ATTRIBUTES
+#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
/* Given two Windows decl attributes lists, possibly including
dllimport, return a list of their union . */
extern tree merge_dllimport_decl_attributes (tree, tree);
+
+/* Handle a "dllimport" or "dllexport" attribute. */
+extern tree handle_dll_attribute (tree *, tree, tree, int, bool *);
#endif
/* Check whether CAND is suitable to be returned from get_qualified_type
@@ -3377,7 +3387,8 @@ extern tree fold_single_bit_test (enum tree_code, tree, tree, tree);
extern tree fold_ignored_result (tree);
extern tree fold_abs_const (tree, tree);
-extern int force_fit_type (tree, int);
+extern tree force_fit_type (tree, int, bool, bool);
+
extern int add_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
unsigned HOST_WIDE_INT, HOST_WIDE_INT,
unsigned HOST_WIDE_INT *, HOST_WIDE_INT *);
@@ -3596,7 +3607,7 @@ extern void internal_reference_types (void);
extern unsigned int update_alignment_for_field (record_layout_info, tree,
unsigned int);
/* varasm.c */
-extern void make_decl_rtl (tree, const char *);
+extern void make_decl_rtl (tree);
extern void make_decl_one_only (tree);
extern int supports_one_only (void);
extern void variable_section (tree, int);
@@ -3605,6 +3616,7 @@ extern void resolve_unique_section (tree, int, int);
extern void mark_referenced (tree);
extern void mark_decl_referenced (tree);
extern void notice_global_symbol (tree);
+extern void set_user_assembler_name (tree, const char *);
/* In stmt.c */
extern void emit_nop (void);
diff --git a/gcc/varasm.c b/gcc/varasm.c
index b73c6542231..0fc93755d0e 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -668,6 +668,19 @@ strip_reg_name (const char *name)
return name;
}
+/* The user has asked for a DECL to have a particular name. Set (or
+ change) it in such a way that we don't prefix an underscore to
+ it. */
+void
+set_user_assembler_name (tree decl, const char *name)
+{
+ char *starred = alloca (strlen (name) + 2);
+ starred[0] = '*';
+ strcpy (starred + 1, name);
+ change_decl_assembler_name (decl, get_identifier (starred));
+ SET_DECL_RTL (decl, NULL_RTX);
+}
+
/* Decode an `asm' spec for a declaration as a register name.
Return the register number, or -1 if nothing specified,
or -2 if the ASMSPEC is not `cc' or `memory' and is not recognized,
@@ -734,13 +747,10 @@ decode_reg_name (const char *asmspec)
There is, however, one exception: this function handles variables
explicitly placed in a particular register by the user.
- ASMSPEC, if not 0, is the string which the user specified as the
- assembler symbol name.
-
This is never called for PARM_DECL nodes. */
void
-make_decl_rtl (tree decl, const char *asmspec)
+make_decl_rtl (tree decl)
{
const char *name = 0;
int reg_number;
@@ -770,6 +780,9 @@ make_decl_rtl (tree decl, const char *asmspec)
SET_DECL_RTL (decl, adjust_address_nv (DECL_RTL (decl),
DECL_MODE (decl), 0));
+ if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl))
+ return;
+
/* ??? Another way to do this would be to maintain a hashed
table of such critters. Instead of adding stuff to a DECL
to give certain attributes to it, we could use an external
@@ -787,19 +800,10 @@ make_decl_rtl (tree decl, const char *asmspec)
return;
}
- reg_number = decode_reg_name (asmspec);
- if (reg_number == -2)
- {
- /* ASMSPEC is given, and not the name of a register. Mark the
- name with a star so assemble_name won't munge it. */
- char *starred = alloca (strlen (asmspec) + 2);
- starred[0] = '*';
- strcpy (starred + 1, asmspec);
- change_decl_assembler_name (decl, get_identifier (starred));
- }
-
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
+ reg_number = decode_reg_name (name);
+
if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl))
{
/* First detect errors in declaring global registers. */
@@ -855,7 +859,7 @@ make_decl_rtl (tree decl, const char *asmspec)
/* Now handle ordinary static variables and functions (in memory).
Also handle vars declared register invalidly. */
- if (reg_number >= 0 || reg_number == -3)
+ if (name[0] == '*' && (reg_number >= 0 || reg_number == -3))
error ("%Jregister name given for non-register variable '%D'", decl, decl);
/* Specifying a section attribute on a variable forces it into a
@@ -4191,7 +4195,7 @@ assemble_alias (tree decl, tree target ATTRIBUTE_UNUSED)
/* We must force creation of DECL_RTL for debug info generation, even though
we don't use it here. */
- make_decl_rtl (decl, NULL);
+ make_decl_rtl (decl);
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
diff --git a/gcc/version.c b/gcc/version.c
index 4ac10289d9d..e563cbb0237 100644
--- a/gcc/version.c
+++ b/gcc/version.c
@@ -5,7 +5,7 @@
please modify this string to indicate that, e.g. by putting your
organization's name in parentheses at the end of the string. */
-const char version_string[] = "3.5.0 20040804 (experimental)";
+const char version_string[] = "3.5.0 20040808 (experimental)";
/* This is the location of the online document giving instructions for
reporting bugs. If you distribute a modified version of GCC,
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 2593982c487..fc7f6654c2c 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,24 @@
+2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
+
+ * intrinsics/env.c: New file.
+ * Makefile.am: Add env.c to build.
+ * Makefile.in: Regenerate.
+
+2004-08-05 Victor Leikehman <lei@il.ibm.com>
+
+ PR libgfortran/16704
+ * io/read.c (read_radix): Understand letters f and F as hex digits.
+
+2004-08-04 Victor Leikehman <lei@il.ibm.com>
+
+ * libgfortran.h (array_t, size0) New declarations.
+ * m4/ifunction.m4, m4/transpose.m4, intrinsics/cshift0.c: Allocate
+ space if return value descriptor has NULL in its data field,
+ and initialize bounds and stride.
+ * intrinsics/size.c (array_t, size0): Declarations moved to
+ libgfortran.h.
+ * generated/*.c: Regenerate.
+
2004-08-03 Roger Sayle <roger@eyesopen.com>
PR libgfortran/16137
diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am
index 450a9a4e868..35332dc4c07 100644
--- a/libgfortran/Makefile.am
+++ b/libgfortran/Makefile.am
@@ -43,6 +43,7 @@ intrinsics/c99_functions.c \
intrinsics/cpu_time.c \
intrinsics/cshift0.c \
intrinsics/date_and_time.c \
+intrinsics/env.c \
intrinsics/eoshift0.c \
intrinsics/eoshift2.c \
intrinsics/etime.c \
diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in
index 754c3ea4027..b0fa2ec7bba 100644
--- a/libgfortran/Makefile.in
+++ b/libgfortran/Makefile.in
@@ -119,7 +119,7 @@ am__objects_32 = backspace.lo close.lo endfile.lo format.lo inquire.lo \
list_read.lo lock.lo open.lo read.lo rewind.lo transfer.lo \
unit.lo unix.lo write.lo
am__objects_33 = associated.lo abort.lo args.lo c99_functions.lo \
- cpu_time.lo cshift0.lo date_and_time.lo eoshift0.lo \
+ cpu_time.lo cshift0.lo date_and_time.lo env.lo eoshift0.lo \
eoshift2.lo etime.lo ishftc.lo pack_generic.lo size.lo \
spread_generic.lo string_intrinsics.lo rand.lo random.lo \
reshape_generic.lo reshape_packed.lo selected_kind.lo \
@@ -314,6 +314,7 @@ intrinsics/c99_functions.c \
intrinsics/cpu_time.c \
intrinsics/cshift0.c \
intrinsics/date_and_time.c \
+intrinsics/env.c \
intrinsics/eoshift0.c \
intrinsics/eoshift2.c \
intrinsics/etime.c \
@@ -2025,6 +2026,15 @@ date_and_time.obj: intrinsics/date_and_time.c
date_and_time.lo: intrinsics/date_and_time.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o date_and_time.lo `test -f 'intrinsics/date_and_time.c' || echo '$(srcdir)/'`intrinsics/date_and_time.c
+env.o: intrinsics/env.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o env.o `test -f 'intrinsics/env.c' || echo '$(srcdir)/'`intrinsics/env.c
+
+env.obj: intrinsics/env.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o env.obj `if test -f 'intrinsics/env.c'; then $(CYGPATH_W) 'intrinsics/env.c'; else $(CYGPATH_W) '$(srcdir)/intrinsics/env.c'; fi`
+
+env.lo: intrinsics/env.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o env.lo `test -f 'intrinsics/env.c' || echo '$(srcdir)/'`intrinsics/env.c
+
eoshift0.o: intrinsics/eoshift0.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eoshift0.o `test -f 'intrinsics/eoshift0.c' || echo '$(srcdir)/'`intrinsics/eoshift0.c
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h
index c0406aaffed..6cc26492898 100644
--- a/libgfortran/libgfortran.h
+++ b/libgfortran/libgfortran.h
@@ -417,5 +417,12 @@ GFC_REAL_4 normalize_r4_i4 (GFC_UINTEGER_4, GFC_UINTEGER_4);
#define normalize_r8_i8 prefix(normalize_r8_i8)
GFC_REAL_8 normalize_r8_i8 (GFC_UINTEGER_8, GFC_UINTEGER_8);
+/* size.c */
+
+typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, void) array_t;
+
+#define size0 prefix(size0)
+index_type size0 (const array_t * array);
+
#endif
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index e958f0c93c2..5448a0785c9 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,43 @@
+2004-08-05 Andreas Tobler <a.tobler@schweiz.ch>
+
+ * Makefile.am: Fix missing rename from x_nat_headers to
+ xlib_nat_headers.
+ * Makefile.in: Regenerated.
+
+2004-08-04 Andrew Haley <aph@redhat.com>
+
+ * java/security/BasicPermission.java: Don't check wildcards.
+
+2004-08-04 Thomas Fitzsimmons <fitzsim@redhat.com>
+ Michael Koch <konqueror@gmx.de>
+
+ * acinclude.m4: Correctly quote PKG_CHECK_MODULES.
+ * configure.in: Replaced all usages of AC_LINK_FILES by
+ AC_CONFIG_LINKS.
+ * aclocal.m4,
+ configure: Regenerated.
+
+2004-08-04 Thomas Fitzsimmons <fitzsim@redhat.com>
+ Michael Koch <konqueror@gmx.de>
+
+ * acconfig.h: Removed.
+ * Makefile.am: Rename variables for xlib peer to include xlib and
+ gtk_c_headers to gtk_jni_headers.
+ * Makefile.in: Regenerated.
+
+2004-08-04 Andrew Haley <aph@redhat.com>
+
+ * testsuite/lib/libjava.exp (bytecompile_file): Byte compile with
+ debugging.
+
+2004-08-03 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * configure.in: Eliminate uses of changequote (mostly by quoting []).
+ Replace most top level 'dnl' comments with '#' comments, conforming
+ to new autoconf style. Use AS_HELP_STRING throughout; improve a few
+ help strings.
+ * configure: Rebuilt.
+
2004-07-17 Nathanael Nerode <neroden@gcc.gnu.org>
* acinclude.m4: Include no-executables.m4.
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index 100d456c51a..ac5a7789da1 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -29,11 +29,11 @@ target_noncanonical = @target_noncanonical@
##
if XLIB_AWT
-cond_x_ltlibrary = lib-gnu-awt-xlib.la
+cond_xlib_ltlibrary = lib-gnu-awt-xlib.la
## We require libstdc++-v3 to be in the same build tree.
xlib_includes = -I../libstdc++-v3/include -I../libstdc++-v3/include/$(target_noncanonical) -I$(srcdir)/../libstdc++-v3/libsupc++
else
-cond_x_ltlibrary =
+cond_xlib_ltlibrary =
xlib_includes =
endif
@@ -44,7 +44,7 @@ cond_gtk_ltlibrary =
endif
toolexeclib_LTLIBRARIES = libgcj.la libgij.la lib-org-xml-sax.la lib-org-w3c-dom.la \
- $(cond_gtk_ltlibrary) $(cond_x_ltlibrary)
+ $(cond_gtk_ltlibrary) $(cond_xlib_ltlibrary)
toolexecmainlib_DATA = libgcj.spec
pkgconfigdir = $(libdir)/pkgconfig
@@ -132,7 +132,7 @@ INCLUDES = -I$(top_srcdir) -Iinclude -I$(top_srcdir)/include \
## Objects from C++ sources in subdirs.
nat_files = $(nat_source_files:.cc=.lo)
-x_nat_files = $(x_nat_source_files:.cc=.lo)
+xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
## Objects from C sources in subdirs.
c_files = $(c_source_files:.c=.lo)
extra_cc_files = $(extra_cc_source_files:.cc=.lo)
@@ -141,7 +141,7 @@ gtk_c_files = $(gtk_c_source_files:.c=.lo)
## Objects from Java sources in subdirs.
javao_files = $(java_source_files:.java=.lo) \
$(built_java_source_files:.java=.lo)
-x_javao_files = $(x_java_source_files:.java=.lo)
+xlib_javao_files = $(xlib_java_source_files:.java=.lo)
libgij_la_SOURCES = gij.cc
@@ -160,9 +160,9 @@ libgcj_la_LIBADD = $(javao_files) $(c_files) $(extra_cc_files) $(GCOBJS) \
$(THREADOBJS) $(PLATFORMOBJS) $(propertyo_files)
# Include THREADLIBS here to ensure that the correct version of
# certain linuxthread functions get linked:
+## The mysterious backslash in the grep pattern is consumed by make.
libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
$(LIBLTDL) $(SYS_ZLIBS) \
-## The mysterious backslash is consumed by make.
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
libgcj_la_LINK = $(LIBLINK)
@@ -265,9 +265,9 @@ gnu/java/awt/peer/gtk/GtkTextFieldPeer.java \
gnu/java/awt/peer/gtk/GtkToolkit.java \
gnu/java/awt/peer/gtk/GtkWindowPeer.java
-gtk_c_headers = $(patsubst %.java,jniinclude/%.h,$(subst /,_,$(gtk_awt_peer_sources)))
+gtk_jni_headers = $(patsubst %.java,jniinclude/%.h,$(subst /,_,$(gtk_awt_peer_sources)))
-$(gtk_c_headers): $(gtk_awt_peer_sources)
+$(gtk_jni_headers): $(gtk_awt_peer_sources)
@input=`echo $@ | sed -e 's,jniinclude/,,' -e 's,_,.,g' -e 's,.h$$,,'`; \
echo "$(GCJH) -jni -d jniinclude -classpath '' -bootclasspath $(top_builddir) $$input"; \
$(GCJH) -jni -d jniinclude -classpath '' -bootclasspath $(top_builddir) $$input
@@ -283,8 +283,9 @@ jni/classpath/native_state.h \
jni/classpath/primlib.h
lib_gnu_java_awt_peer_gtk_la_LIBADD = $(GTK_LIBS) $(GLIB_LIBS) $(LIBART_LIBS) $(CAIRO_LIBS) $(PANGOFT2_LIBS)
+lib_gnu_java_awt_peer_gtk_la_DEPENDENCIES = $(gtk_jni_headers)
+## The mysterious backslash in the grep pattern is consumed by make.
lib_gnu_java_awt_peer_gtk_la_LDFLAGS = \
-## The mysterious backslash is consumed by make.
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
lib_org_w3c_dom_la_SOURCES = org/w3c/dom/Attr.java \
@@ -314,8 +315,8 @@ org/w3c/dom/traversal/NodeIterator.java \
org/w3c/dom/traversal/TreeWalker.java
## See jv_convert_LDADD.
lib_org_w3c_dom_la_LIBADD = -L$(here)/.libs libgcj.la
+## The mysterious backslash in the grep pattern is consumed by make.
lib_org_w3c_dom_la_LDFLAGS = -rpath $(toolexeclibdir) \
-## The mysterious backslash is consumed by make.
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
lib_org_xml_sax_la_SOURCES = org/xml/sax/ext/DeclHandler.java \
@@ -350,18 +351,18 @@ org/xml/sax/XMLFilter.java \
org/xml/sax/XMLReader.java
## See jv_convert_LDADD.
lib_org_xml_sax_la_LIBADD = -L$(here)/.libs libgcj.la
+## The mysterious backslash in the grep pattern is consumed by make.
lib_org_xml_sax_la_LDFLAGS = -rpath $(toolexeclibdir) \
-## The mysterious backslash is consumed by make.
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
-lib_gnu_awt_xlib_la_SOURCES = $(x_nat_source_files)
-EXTRA_lib_gnu_awt_xlib_la_SOURCES = $(x_java_source_files)
-lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-@gcc_version@.jar $(x_javao_files)
-lib_gnu_awt_xlib_la_LIBADD = $(x_javao_files)
+lib_gnu_awt_xlib_la_SOURCES = $(xlib_nat_source_files)
+EXTRA_lib_gnu_awt_xlib_la_SOURCES = $(xlib_java_source_files)
+lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-@gcc_version@.jar $(xlib_javao_files)
+lib_gnu_awt_xlib_la_LIBADD = $(xlib_javao_files)
+## The mysterious backslash in the grep pattern is consumed by make.
lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
@X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
-rpath $(toolexeclibdir) \
-## The mysterious backslash is consumed by make.
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
lib_gnu_awt_xlib_la_LINK = $(LIBLINK)
@@ -371,7 +372,7 @@ all_java_source_files = \
$(lib_org_xml_sax_la_SOURCES) \
$(lib_org_w3c_dom_la_SOURCES) \
$(gtk_awt_peer_sources) \
- $(x_java_source_files)
+ $(xlib_java_source_files)
all_java_class_files = $(all_java_source_files:.java=.class)
@@ -424,7 +425,7 @@ endif
# Note: The libtool objects are removed by mostlyclean-local
# because of command-line-length issues.
-MOSTLYCLEANFILES = $(nat_headers) $(x_nat_headers)
+MOSTLYCLEANFILES = $(nat_headers) $(xlib_nat_headers)
CLEANFILES = libgcj-@gcc_version@.jar
@@ -442,7 +443,7 @@ distclean-local:
# Just remove the objects from C++ sources, for testing the C++ compiler.
clean-nat:
- rm -f $(nat_files) $(x_nat_files)
+ rm -f $(nat_files) $(xlib_nat_files)
SUFFIXES = .class .java .h .properties
@@ -455,7 +456,7 @@ SUFFIXES = .class .java .h .properties
## FIXME: For the .o files in subdirs, use a special rule. The
## standard automake rule can't be overridden (this is a bug in
## automake), and it also won't put the .o files into subdirs.
-$(nat_files) $(x_nat_files): %.lo: %.cc
+$(nat_files) $(xlib_nat_files): %.lo: %.cc
@echo '$(LTCXXCOMPILE) -MD -MT $@ -MF $(@:.lo=.pp) -c -o $@ $<'; \
$(LTCXXCOMPILE) -MD -MT $@ -MF $(@:.lo=.pp) -c -o $@ $<
@-mv $(@:.lo=.pp) $(@:.lo=.d)
@@ -476,13 +477,13 @@ $(gtk_c_files): %.lo: %.c
$(PEDANTIC_CFLAGS) $(GTK_CFLAGS) $(LIBART_CFLAGS) \
$(CAIRO_LIBS) $(PANGOFT2_LIBS) -o $@ $<
-$(gtk_c_files): $(gtk_c_headers)
+$(gtk_c_files): $(gtk_jni_headers)
## FIXME: see above.
## Note: we omit StackTrace here, since it has an explicit rule a bit
## later, and GNU make will warn in this case.
-$(filter-out gnu/gcj/runtime/StackTrace.lo, $(javao_files)) $(x_javao_files) $(lib_org_w3c_dom_la_OBJECTS) $(lib_org_xml_sax_la_OBJECTS): %.lo: %.java
+$(filter-out gnu/gcj/runtime/StackTrace.lo, $(javao_files)) $(xlib_javao_files) $(lib_org_w3c_dom_la_OBJECTS) $(lib_org_xml_sax_la_OBJECTS): %.lo: %.java
$(GCJCOMPILE) -o $@ $<
$(gtk_awt_peer_sources:.java=.lo): %.lo: %.java
@@ -536,9 +537,9 @@ inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
nat_headers = $(ordinary_nat_headers) $(inner_nat_headers)
nat_headers_install = $(ordinary_nat_headers)
-x_nat_headers = $(x_java_source_files:.java=.h)
+xlib_nat_headers = $(xlib_java_source_files:.java=.h)
-$(ordinary_nat_headers) $(x_nat_headers): %.h: %.class
+$(ordinary_nat_headers) $(xlib_nat_headers): %.h: %.class
java/lang/ClassLoader.h: java/lang/ClassLoader.class
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
@@ -3001,7 +3002,7 @@ java/util/natTimeZone.cc \
java/util/zip/natDeflater.cc \
java/util/zip/natInflater.cc
-x_java_source_files = \
+xlib_java_source_files = \
gnu/gcj/xlib/Clip.java \
gnu/gcj/xlib/Colormap.java \
gnu/gcj/xlib/Display.java \
@@ -3037,7 +3038,7 @@ gnu/awt/xlib/XPanelPeer.java \
gnu/awt/xlib/XFontPeer.java \
gnu/awt/xlib/XToolkit.java
-x_nat_source_files = \
+xlib_nat_source_files = \
gnu/gcj/xlib/natClip.cc \
gnu/gcj/xlib/natColormap.cc \
gnu/gcj/xlib/natDisplay.cc \
@@ -3112,7 +3113,7 @@ texinfo: TexinfoDoclet.class
## the C++ code whenever any .java file is touched.
## Also force all the class files to build first. This makes them build in
## the right order to improve performance.
-all-recursive: libgcj-@gcc_version@.jar $(nat_headers) $(x_nat_headers)
+all-recursive: libgcj-@gcc_version@.jar $(nat_headers) $(xlib_nat_headers)
## ################################################################
diff --git a/libjava/Makefile.in b/libjava/Makefile.in
index 0352b791d9f..4fbdbb8189c 100644
--- a/libjava/Makefile.in
+++ b/libjava/Makefile.in
@@ -174,15 +174,15 @@ write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) $(foreach o
# autoconf2.13's target_alias
target_noncanonical = @target_noncanonical@
-@XLIB_AWT_TRUE@cond_x_ltlibrary = @XLIB_AWT_TRUE@lib-gnu-awt-xlib.la
-@XLIB_AWT_FALSE@cond_x_ltlibrary =
+@XLIB_AWT_TRUE@cond_xlib_ltlibrary = @XLIB_AWT_TRUE@lib-gnu-awt-xlib.la
+@XLIB_AWT_FALSE@cond_xlib_ltlibrary =
@XLIB_AWT_TRUE@xlib_includes = @XLIB_AWT_TRUE@-I../libstdc++-v3/include -I../libstdc++-v3/include/$(target_noncanonical) -I$(srcdir)/../libstdc++-v3/libsupc++
@XLIB_AWT_FALSE@xlib_includes =
@GTK_AWT_TRUE@cond_gtk_ltlibrary = @GTK_AWT_TRUE@lib-gnu-java-awt-peer-gtk.la
@GTK_AWT_FALSE@cond_gtk_ltlibrary =
toolexeclib_LTLIBRARIES = libgcj.la libgij.la lib-org-xml-sax.la lib-org-w3c-dom.la \
- $(cond_gtk_ltlibrary) $(cond_x_ltlibrary)
+ $(cond_gtk_ltlibrary) $(cond_xlib_ltlibrary)
toolexecmainlib_DATA = libgcj.spec
@@ -240,14 +240,14 @@ INCLUDES = -I$(top_srcdir) -Iinclude -I$(top_srcdir)/include \
nat_files = $(nat_source_files:.cc=.lo)
-x_nat_files = $(x_nat_source_files:.cc=.lo)
+xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
c_files = $(c_source_files:.c=.lo)
extra_cc_files = $(extra_cc_source_files:.cc=.lo)
gtk_c_files = $(gtk_c_source_files:.c=.lo)
javao_files = $(java_source_files:.java=.lo) \
$(built_java_source_files:.java=.lo)
-x_javao_files = $(x_java_source_files:.java=.lo)
+xlib_javao_files = $(xlib_java_source_files:.java=.lo)
libgij_la_SOURCES = gij.cc
@@ -370,7 +370,7 @@ gnu/java/awt/peer/gtk/GtkToolkit.java \
gnu/java/awt/peer/gtk/GtkWindowPeer.java
-gtk_c_headers = $(patsubst %.java,jniinclude/%.h,$(subst /,_,$(gtk_awt_peer_sources)))
+gtk_jni_headers = $(patsubst %.java,jniinclude/%.h,$(subst /,_,$(gtk_awt_peer_sources)))
lib_gnu_java_awt_peer_gtk_la_SOURCES = \
$(gtk_awt_peer_sources) \
@@ -384,6 +384,7 @@ jni/classpath/primlib.h
lib_gnu_java_awt_peer_gtk_la_LIBADD = $(GTK_LIBS) $(GLIB_LIBS) $(LIBART_LIBS) $(CAIRO_LIBS) $(PANGOFT2_LIBS)
+lib_gnu_java_awt_peer_gtk_la_DEPENDENCIES = $(gtk_jni_headers)
lib_gnu_java_awt_peer_gtk_la_LDFLAGS = \
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
@@ -455,10 +456,10 @@ lib_org_xml_sax_la_LDFLAGS = -rpath $(toolexeclibdir) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
-lib_gnu_awt_xlib_la_SOURCES = $(x_nat_source_files)
-EXTRA_lib_gnu_awt_xlib_la_SOURCES = $(x_java_source_files)
-lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-@gcc_version@.jar $(x_javao_files)
-lib_gnu_awt_xlib_la_LIBADD = $(x_javao_files)
+lib_gnu_awt_xlib_la_SOURCES = $(xlib_nat_source_files)
+EXTRA_lib_gnu_awt_xlib_la_SOURCES = $(xlib_java_source_files)
+lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-@gcc_version@.jar $(xlib_javao_files)
+lib_gnu_awt_xlib_la_LIBADD = $(xlib_javao_files)
lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
@X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
-rpath $(toolexeclibdir) \
@@ -472,7 +473,7 @@ all_java_source_files = \
$(lib_org_xml_sax_la_SOURCES) \
$(lib_org_w3c_dom_la_SOURCES) \
$(gtk_awt_peer_sources) \
- $(x_java_source_files)
+ $(xlib_java_source_files)
all_java_class_files = $(all_java_source_files:.java=.class)
@@ -486,7 +487,7 @@ propertyo_files = $(property_files:.properties=.properties.lo)
# Note: The libtool objects are removed by mostlyclean-local
# because of command-line-length issues.
-MOSTLYCLEANFILES = $(nat_headers) $(x_nat_headers)
+MOSTLYCLEANFILES = $(nat_headers) $(xlib_nat_headers)
CLEANFILES = libgcj-@gcc_version@.jar
@@ -511,7 +512,7 @@ inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
nat_headers = $(ordinary_nat_headers) $(inner_nat_headers)
nat_headers_install = $(ordinary_nat_headers)
-x_nat_headers = $(x_java_source_files:.java=.h)
+xlib_nat_headers = $(xlib_java_source_files:.java=.h)
extra_headers = java/lang/Object.h java/lang/Class.h
@@ -2686,7 +2687,7 @@ java/util/zip/natDeflater.cc \
java/util/zip/natInflater.cc
-x_java_source_files = \
+xlib_java_source_files = \
gnu/gcj/xlib/Clip.java \
gnu/gcj/xlib/Colormap.java \
gnu/gcj/xlib/Display.java \
@@ -2723,7 +2724,7 @@ gnu/awt/xlib/XFontPeer.java \
gnu/awt/xlib/XToolkit.java
-x_nat_source_files = \
+xlib_nat_source_files = \
gnu/gcj/xlib/natClip.cc \
gnu/gcj/xlib/natColormap.cc \
gnu/gcj/xlib/natDisplay.cc \
@@ -2885,7 +2886,6 @@ org/w3c/dom/traversal/DocumentTraversal.lo \
org/w3c/dom/traversal/NodeFilter.lo \
org/w3c/dom/traversal/NodeIterator.lo \
org/w3c/dom/traversal/TreeWalker.lo
-lib_gnu_java_awt_peer_gtk_la_DEPENDENCIES =
@GTK_CAIRO_FALSE@lib_gnu_java_awt_peer_gtk_la_OBJECTS = \
@GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GdkClasspathFontPeer.lo \
@GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.lo \
@@ -5458,7 +5458,7 @@ installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-$(gtk_c_headers): $(gtk_awt_peer_sources)
+$(gtk_jni_headers): $(gtk_awt_peer_sources)
@input=`echo $@ | sed -e 's,jniinclude/,,' -e 's,_,.,g' -e 's,.h$$,,'`; \
echo "$(GCJH) -jni -d jniinclude -classpath '' -bootclasspath $(top_builddir) $$input"; \
$(GCJH) -jni -d jniinclude -classpath '' -bootclasspath $(top_builddir) $$input
@@ -5506,7 +5506,7 @@ distclean-local:
# Just remove the objects from C++ sources, for testing the C++ compiler.
clean-nat:
- rm -f $(nat_files) $(x_nat_files)
+ rm -f $(nat_files) $(xlib_nat_files)
.class.lo:
$(GCJCOMPILE) -o $@ $<
@@ -5514,7 +5514,7 @@ clean-nat:
.java.lo:
$(GCJCOMPILE) -o $@ $<
-$(nat_files) $(x_nat_files): %.lo: %.cc
+$(nat_files) $(xlib_nat_files): %.lo: %.cc
@echo '$(LTCXXCOMPILE) -MD -MT $@ -MF $(@:.lo=.pp) -c -o $@ $<'; \
$(LTCXXCOMPILE) -MD -MT $@ -MF $(@:.lo=.pp) -c -o $@ $<
@-mv $(@:.lo=.pp) $(@:.lo=.d)
@@ -5532,9 +5532,9 @@ $(gtk_c_files): %.lo: %.c
$(PEDANTIC_CFLAGS) $(GTK_CFLAGS) $(LIBART_CFLAGS) \
$(CAIRO_LIBS) $(PANGOFT2_LIBS) -o $@ $<
-$(gtk_c_files): $(gtk_c_headers)
+$(gtk_c_files): $(gtk_jni_headers)
-$(filter-out gnu/gcj/runtime/StackTrace.lo, $(javao_files)) $(x_javao_files) $(lib_org_w3c_dom_la_OBJECTS) $(lib_org_xml_sax_la_OBJECTS): %.lo: %.java
+$(filter-out gnu/gcj/runtime/StackTrace.lo, $(javao_files)) $(xlib_javao_files) $(lib_org_w3c_dom_la_OBJECTS) $(lib_org_xml_sax_la_OBJECTS): %.lo: %.java
$(GCJCOMPILE) -o $@ $<
$(gtk_awt_peer_sources:.java=.lo): %.lo: %.java
@@ -5559,7 +5559,7 @@ lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPEND
.class.h:
$(GCJH) -classpath '' -bootclasspath $(top_builddir) $(basename $<)
-$(ordinary_nat_headers) $(x_nat_headers): %.h: %.class
+$(ordinary_nat_headers) $(xlib_nat_headers): %.h: %.class
java/lang/ClassLoader.h: java/lang/ClassLoader.class
$(GCJH) -classpath '' -bootclasspath $(top_builddir) \
@@ -5803,7 +5803,7 @@ texinfo: TexinfoDoclet.class
-include deps.mk
-all-recursive: libgcj-@gcc_version@.jar $(nat_headers) $(x_nat_headers)
+all-recursive: libgcj-@gcc_version@.jar $(nat_headers) $(xlib_nat_headers)
# Multilib support.
.PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
diff --git a/libjava/acconfig.h b/libjava/acconfig.h
deleted file mode 100644
index 7055826b29b..00000000000
--- a/libjava/acconfig.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Define to `int' if `ssize_t' is not defined. */
-#undef ssize_t
diff --git a/libjava/acinclude.m4 b/libjava/acinclude.m4
index adaaa709ad8..fe0ab002212 100644
--- a/libjava/acinclude.m4
+++ b/libjava/acinclude.m4
@@ -139,7 +139,7 @@ fi[]dnl
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
dnl also defines GSTUFF_PKG_ERRORS on error
-AC_DEFUN(PKG_CHECK_MODULES, [
+AC_DEFUN([PKG_CHECK_MODULES], [
succeeded=no
if test -z "$PKG_CONFIG"; then
diff --git a/libjava/aclocal.m4 b/libjava/aclocal.m4
index ab373cf8c74..5cdb712ddee 100644
--- a/libjava/aclocal.m4
+++ b/libjava/aclocal.m4
@@ -151,7 +151,7 @@ fi[]dnl
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
dnl also defines GSTUFF_PKG_ERRORS on error
-AC_DEFUN(PKG_CHECK_MODULES, [
+AC_DEFUN([PKG_CHECK_MODULES], [
succeeded=no
if test -z "$PKG_CONFIG"; then
diff --git a/libjava/configure b/libjava/configure
index 6ef7952335f..5c657ef87f2 100755
--- a/libjava/configure
+++ b/libjava/configure
@@ -848,8 +848,8 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-version-specific-runtime-libs
- specify that runtime libraries should be installed in a compiler-specific
- directory
+ specify that runtime libraries should be installed
+ in a compiler-specific directory
--enable-multilib build many library versions (default)
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
@@ -862,27 +862,29 @@ Optional Features:
--enable-hash-synchronization
use global hash table for monitor locks
--enable-libgcj-multifile
- allow compilation of several files at once
+ allow compilation of several files at once
+
--enable-libgcj-debug enable runtime debugging code
--enable-interpreter enable interpreter
- --enable-sjlj-exceptions force use of builtin_setjmp for exceptions
+ --enable-sjlj-exceptions
+ force use of builtin_setjmp for exceptions
--disable-java-net disable java.net
--disable-jvmpi disable JVMPI support
--enable-java-awt list of AWT peer implementations to be built
- --enable-gtk-cairo build the cairo Graphics2D implementation on GTK
- --enable-java-gc=TYPE choose garbage collector boehm
+ --enable-gtk-cairo build the cairo Graphics2D implementation on GTK
+ --enable-java-gc=TYPE choose garbage collector (default is boehm)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-target-subdir=SUBDIR
- configuring in a subdirectory
- --with-cross-host=HOST configuring with a cross compiler
- --with-newlib Configuring with newlib
+ configure in a subdirectory
+ --with-cross-host=HOST configure with a cross compiler from HOST
+ --with-newlib configure with newlib
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-pic try to use only PIC/non-PIC objects default=use both
- --with-win32-nlsapi=ansi, unicows or unicode
- native MinGW libgcj Win32 OS API ansi
+ --with-win32-nlsapi=ansi or unicows or unicode
+ native MinGW libgcj Win32 OS API (default is ansi)
--without-libffi don't use libffi
--with-ecos enable runtime eCos target support
--with-system-zlib use installed libz
@@ -1340,6 +1342,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+# We use these options to decide which functions to include.
# Check whether --with-target-subdir or --without-target-subdir was given.
if test "${with_target_subdir+set}" = set; then
@@ -1347,6 +1350,8 @@ if test "${with_target_subdir+set}" = set; then
fi;
+# We may get other options which we don't document:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
# When building with srcdir == objdir, links to the source files will
# be created in directories within the target_subdir. We have to
@@ -1576,6 +1581,7 @@ else
fi;
+# Default to --enable-multilib
# Check whether --enable-multilib or --disable-multilib was given.
if test "${enable_multilib+set}" = set; then
enableval="$enable_multilib"
@@ -1589,6 +1595,7 @@ echo "$as_me: error: bad value ${enableval} for multilib option" >&2;}
else
multilib=yes
fi;
+# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
# (1) We use an abnormal CXX (without library references), so we
@@ -2921,7 +2928,9 @@ CXXFLAGS="$save_CXXFLAGS"
+# version is pulled out to make it a bit easier to change using sed.
version=0.0.7
+# Still use "libjava" here to placate dejagnu.
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -4315,7 +4324,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4318 "configure"' > conftest.$ac_ext
+ echo '#line 4327 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -4871,6 +4880,7 @@ else
fi
+# The -no-testsuite modules omit the test subdir.
if test -d $srcdir/testsuite; then
@@ -4881,12 +4891,15 @@ else
TESTSUBDIR_FALSE=
fi
+# Should the runtime set system properties by examining the
+# environment variable GCJ_PROPERTIES?
# Check whether --enable-getenv-properties or --disable-getenv-properties was given.
if test "${enable_getenv_properties+set}" = set; then
enableval="$enable_getenv_properties"
fi;
+# Whether GCJ_PROPERTIES is used depends on the target.
if test -z "$enable_getenv_properties"; then
enable_getenv_properties=${enable_getenv_properties_default-yes}
fi
@@ -4898,6 +4911,7 @@ _ACEOF
fi
+# Whether we should use arguments to main()
if test -z "$enable_main_args"; then
enable_main_args=${enable_main_args_default-yes}
fi
@@ -4910,6 +4924,9 @@ _ACEOF
fi
+# Should we use hashtable-based synchronization?
+# Currently works only for Linux X86/ia64
+# Typically faster and more space-efficient
# Check whether --enable-hash-synchronization or --disable-hash-synchronization was given.
if test "${enable_hash_synchronization+set}" = set; then
enableval="$enable_hash_synchronization"
@@ -4949,8 +4966,7 @@ fi
# Check whether --with-win32-nlsapi or --without-win32-nlsapi was given.
if test "${with_win32_nlsapi+set}" = set; then
withval="$with_win32_nlsapi"
-
-case "${withval}" in
+ case "${withval}" in
ansi) with_win32_nlsapi=ansi ;;
unicows) with_win32_nlsapi=unicows ;;
unicode) with_win32_nlsapi=unicode ;;
@@ -4972,6 +4988,8 @@ _ACEOF
;;
esac
+# configure.host sets slow_pthread_self if the synchronization code should
+# try to avoid pthread_self calls by caching thread IDs in a hashtable.
if test "${slow_pthread_self}" = "yes"; then
cat >>confdefs.h <<\_ACEOF
@@ -4981,6 +4999,7 @@ _ACEOF
fi
+# See if the user has requested runtime debugging.
LIBGCJDEBUG="false"
# Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
@@ -4996,6 +5015,7 @@ _ACEOF
fi
fi;
+# See if the user has the interpreter included.
# Check whether --enable-interpreter or --disable-interpreter was given.
if test "${enable_interpreter+set}" = set; then
enableval="$enable_interpreter"
@@ -5033,7 +5053,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then
:
else
cat > conftest.$ac_ext << EOF
-#line 5036 "configure"
+#line 5056 "configure"
struct S { ~S(); };
void bar();
void foo()
@@ -5089,12 +5109,15 @@ if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
EXCEPTIONSPEC=
fi
+# See if the user wants to disable java.net. This is the mildly
+# ugly way that we admit that target-side configuration sucks.
# Check whether --enable-java-net or --disable-java-net was given.
if test "${enable_java_net+set}" = set; then
enableval="$enable_java_net"
fi;
+# Whether java.net is built by default can depend on the target.
if test -z "$enable_java_net"; then
enable_java_net=${enable_java_net_default-yes}
fi
@@ -5106,11 +5129,14 @@ _ACEOF
fi
+# See if the user wants to configure without libffi. Some
+# architectures don't support it, and default values are set in
+# configure.host.
# Check whether --with-libffi or --without-libffi was given.
if test "${with_libffi+set}" = set; then
withval="$with_libffi"
-
+ :
else
with_libffi=${with_libffi_default-yes}
fi;
@@ -5129,6 +5155,7 @@ fi
+# See if the user wants to disable JVMPI support.
# Check whether --enable-jvmpi or --disable-jvmpi was given.
if test "${enable_jvmpi+set}" = set; then
enableval="$enable_jvmpi"
@@ -5143,6 +5170,10 @@ _ACEOF
fi
+# If the target is an eCos system, use the appropriate eCos
+# I/O routines.
+# FIXME: this should not be a local option but a global target
+# system; at present there is no eCos target.
TARGET_ECOS=${PROCESS-"no"}
# Check whether --with-ecos or --without-ecos was given.
@@ -5213,14 +5244,7 @@ _ACEOF
;;
esac
-ac_sources="include/$PLATFORMH"
-ac_dests="include/platform.h"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_1"
+ ac_config_links="$ac_config_links include/platform.h:include/$PLATFORMH"
ac_ext=c
@@ -5551,6 +5575,8 @@ rm -f conftest*
+# These may not be defined in a non-ANS conformant embedded system.
+# FIXME: Should these case a runtime exception in that case?
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -5590,108 +5616,44 @@ fi
rm -f conftest*
+# Create the subdirectory for natFile.cc, or the attempt
+# to create the link will fail.
test -d java || mkdir java
test -d java/io || mkdir java/io
test -d gnu || mkdir gnu
-ac_sources="java/io/natFile${FILE-${PLATFORM}}.cc"
-ac_dests="java/io/natFile.cc"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_2="$ac_config_links_2 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_2"
+ ac_config_links="$ac_config_links java/io/natFile.cc:java/io/natFile${FILE-${PLATFORM}}.cc"
+# Likewise for ConcreteProcess.java and natConcreteProcess.cc.
test -d java/lang || mkdir java/lang
-ac_sources="java/lang/${PLATFORM}Process.java"
-ac_dests="java/lang/ConcreteProcess.java"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_3="$ac_config_links_3 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_3"
-
-ac_sources="java/lang/nat${PLATFORM}Process.cc"
-ac_dests="java/lang/natConcreteProcess.cc"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_4="$ac_config_links_4 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_4"
+ ac_config_links="$ac_config_links java/lang/ConcreteProcess.java:java/lang/${PLATFORM}Process.java"
+ ac_config_links="$ac_config_links java/lang/natConcreteProcess.cc:java/lang/nat${PLATFORM}Process.cc"
+
+# Likewise for natInetAddress.cc and natNetworkInterface.cc.
test -d java/net || mkdir java/net
-ac_sources="java/net/natInetAddress${PLATFORMNET}.cc"
-ac_dests="java/net/natInetAddress.cc"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_5="$ac_config_links_5 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_5"
-
-ac_sources="java/net/natNetworkInterface${PLATFORMNET}.cc"
-ac_dests="java/net/natNetworkInterface.cc"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_6="$ac_config_links_6 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_6"
+ ac_config_links="$ac_config_links java/net/natInetAddress.cc:java/net/natInetAddress${PLATFORMNET}.cc"
+
+ ac_config_links="$ac_config_links java/net/natNetworkInterface.cc:java/net/natNetworkInterface${PLATFORMNET}.cc"
+# Likewise for natPlainSocketImpl.cc and natPlainDatagramSocketImpl.cc.
test -d gnu/java || mkdir gnu/java
test -d gnu/java/net || mkdir gnu/java/net
-ac_sources="gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc"
-ac_dests="gnu/java/net/natPlainSocketImpl.cc"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_7="$ac_config_links_7 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_7"
-
-ac_sources="gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc"
-ac_dests="gnu/java/net/natPlainDatagramSocketImpl.cc"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_8="$ac_config_links_8 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_8"
+ ac_config_links="$ac_config_links gnu/java/net/natPlainSocketImpl.cc:gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc"
+ ac_config_links="$ac_config_links gnu/java/net/natPlainDatagramSocketImpl.cc:gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc"
+
+# Likewise for natPipeImpl.cc and natSelectorImpl.cc.
test -d gnu/java/nio || mkdir gnu/java/nio
-ac_sources="gnu/java/nio/natPipeImpl${PLATFORM}.cc"
-ac_dests="gnu/java/nio/natPipeImpl.cc"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_9="$ac_config_links_9 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_9"
-
-ac_sources="gnu/java/nio/natSelectorImpl${PLATFORM}.cc"
-ac_dests="gnu/java/nio/natSelectorImpl.cc"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_10="$ac_config_links_10 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_10"
+ ac_config_links="$ac_config_links gnu/java/nio/natPipeImpl.cc:gnu/java/nio/natPipeImpl${PLATFORM}.cc"
+
+ ac_config_links="$ac_config_links gnu/java/nio/natSelectorImpl.cc:gnu/java/nio/natSelectorImpl${PLATFORM}.cc"
test -d gnu/java/nio/channels || mkdir gnu/java/nio/channels
-ac_sources="gnu/java/nio/channels/natFileChannel${FILE-${PLATFORM}}.cc"
-ac_dests="gnu/java/nio/channels/natFileChannelImpl.cc"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_11="$ac_config_links_11 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_11"
+ ac_config_links="$ac_config_links gnu/java/nio/channels/natFileChannelImpl.cc:gnu/java/nio/channels/natFileChannel${FILE-${PLATFORM}}.cc"
case "${host}" in
@@ -7182,6 +7144,7 @@ fi
fi
+# Determine which AWT peer libraries to build
# Check whether --enable-java-awt or --disable-java-awt was given.
if test "${enable_java_awt+set}" = set; then
enableval="$enable_java_awt"
@@ -7250,6 +7213,7 @@ else
GTK_AWT_FALSE=
fi
+# determine whether to enable the cairo GTK Graphics2D backend
# Check whether --enable-gtk-cairo or --disable-gtk-cairo was given.
if test "${enable_gtk_cairo+set}" = set; then
enableval="$enable_gtk_cairo"
@@ -7468,14 +7432,15 @@ fi
+# FIXME: this should be _libs on some hosts.
libsubdir=.libs
+# Allow the GC to be disabled. Can be useful when debugging.
echo "$as_me:$LINENO: checking for garbage collector to use" >&5
echo $ECHO_N "checking for garbage collector to use... $ECHO_C" >&6
# Check whether --enable-java-gc or --disable-java-gc was given.
if test "${enable_java_gc+set}" = set; then
enableval="$enable_java_gc"
-
GC=$enableval
else
GC=boehm
@@ -7495,9 +7460,12 @@ echo "${ECHO_T}boehm" >&6
JC1GCSPEC='-fuse-boehm-gc'
GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs"
- GCINCS="`cat ../boehm-gc/boehm-cflags`"
+ # We also want to pick up some cpp flags required when including
+ # boehm-config.h. Yuck.
+ GCINCS="`cat ../boehm-gc/boehm-cflags`"
GCOBJS=boehm.lo
GCHDR=boehm-gc.h
+ # The POSIX thread support needs to know this.
cat >>confdefs.h <<\_ACEOF
#define HAVE_BOEHM_GC 1
@@ -7523,14 +7491,7 @@ esac
-ac_sources="include/$GCHDR"
-ac_dests="include/java-gc.h"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_12="$ac_config_links_12 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_12"
+ ac_config_links="$ac_config_links include/java-gc.h:include/$GCHDR"
@@ -7584,9 +7545,7 @@ case "$THREADS" in
*-*-cygwin*)
# Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
;;
-
*-*-freebsd[1234]*)
-
# Before FreeBSD 5, it didn't have -lpthread (or any library which
# merely adds pthread_* functions) but it does have a -pthread switch
# which is required at link-time to select -lc_r *instead* of -lc.
@@ -7653,14 +7612,7 @@ _ACEOF
THREADH=no-threads.h
;;
esac
-ac_sources="include/$THREADH"
-ac_dests="include/java-threads.h"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_13="$ac_config_links_13 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_13"
+ ac_config_links="$ac_config_links include/java-threads.h:include/$THREADH"
@@ -7671,14 +7623,7 @@ done
if test -d sysdep; then true; else mkdir sysdep; fi
-ac_sources="sysdep/$sysdeps_dir/locks.h"
-ac_dests="sysdep/locks.h"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_14="$ac_config_links_14 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_14"
+ ac_config_links="$ac_config_links sysdep/locks.h:sysdep/$sysdeps_dir/locks.h"
HASH_SYNC_SPEC=
@@ -7757,16 +7702,19 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_USLEEP_DECL 1
_ACEOF
+ # This is only for POSIX threads.
cat >>confdefs.h <<\_ACEOF
#define HAVE_PTHREAD_MUTEXATTR_INIT 1
_ACEOF
- cat >>confdefs.h <<\_ACEOF
+ # We also assume we are using gcc, which provides alloca.
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_ALLOCA 1
_ACEOF
+ # Assume we do not have getuid and friends.
cat >>confdefs.h <<\_ACEOF
#define NO_GETUID 1
@@ -12471,9 +12419,7 @@ fi
if test -z "${with_multisubdir}"; then
builddotdot=.
else
-
builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
-
fi
NATIVE=yes
@@ -12828,9 +12774,7 @@ esac
# Determine gcj version number.
-
gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`
-
GCJVERSION=$gcjversion
@@ -12839,6 +12783,9 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+# We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
+# On that system, sys/ioctl.h will not include sys/filio.h unless
+# BSD_COMP is defined; just including sys/filio.h is simpler.
@@ -13006,6 +12953,8 @@ fi
done
+# We avoid AC_HEADER_DIRENT since we really only care about dirent.h
+# for now. If you change this, you also must update natFile.cc.
for ac_header in dirent.h
do
@@ -14817,14 +14766,7 @@ if test -z "$SIGNAL_HANDLER_AUX"; then
SIGNAL_HANDLER_AUX=$SIGNAL_HANDLER
fi
-ac_sources="$SIGNAL_HANDLER $SIGNAL_HANDLER_AUX"
-ac_dests="include/java-signal.h include/java-signal-aux.h"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_15="$ac_config_links_15 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_15"
+ ac_config_links="$ac_config_links include/java-signal.h:$SIGNAL_HANDLER include/java-signal-aux.h:$SIGNAL_HANDLER_AUX"
if test "${multilib}" = "yes"; then
@@ -15400,21 +15342,22 @@ do
"gcj/Makefile" ) CONFIG_FILES="$CONFIG_FILES gcj/Makefile" ;;
"include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
"testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
- "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
- "$ac_config_links_2" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_2" ;;
- "$ac_config_links_3" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_3" ;;
- "$ac_config_links_4" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_4" ;;
- "$ac_config_links_5" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_5" ;;
- "$ac_config_links_6" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_6" ;;
- "$ac_config_links_7" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_7" ;;
- "$ac_config_links_8" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_8" ;;
- "$ac_config_links_9" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_9" ;;
- "$ac_config_links_10" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_10" ;;
- "$ac_config_links_11" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_11" ;;
- "$ac_config_links_12" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_12" ;;
- "$ac_config_links_13" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_13" ;;
- "$ac_config_links_14" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_14" ;;
- "$ac_config_links_15" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_15" ;;
+ "include/platform.h" ) CONFIG_LINKS="$CONFIG_LINKS include/platform.h:include/$PLATFORMH" ;;
+ "java/io/natFile.cc" ) CONFIG_LINKS="$CONFIG_LINKS java/io/natFile.cc:java/io/natFile${FILE-${PLATFORM}}.cc" ;;
+ "java/lang/ConcreteProcess.java" ) CONFIG_LINKS="$CONFIG_LINKS java/lang/ConcreteProcess.java:java/lang/${PLATFORM}Process.java" ;;
+ "java/lang/natConcreteProcess.cc" ) CONFIG_LINKS="$CONFIG_LINKS java/lang/natConcreteProcess.cc:java/lang/nat${PLATFORM}Process.cc" ;;
+ "java/net/natInetAddress.cc" ) CONFIG_LINKS="$CONFIG_LINKS java/net/natInetAddress.cc:java/net/natInetAddress${PLATFORMNET}.cc" ;;
+ "java/net/natNetworkInterface.cc" ) CONFIG_LINKS="$CONFIG_LINKS java/net/natNetworkInterface.cc:java/net/natNetworkInterface${PLATFORMNET}.cc" ;;
+ "gnu/java/net/natPlainSocketImpl.cc" ) CONFIG_LINKS="$CONFIG_LINKS gnu/java/net/natPlainSocketImpl.cc:gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc" ;;
+ "gnu/java/net/natPlainDatagramSocketImpl.cc" ) CONFIG_LINKS="$CONFIG_LINKS gnu/java/net/natPlainDatagramSocketImpl.cc:gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc" ;;
+ "gnu/java/nio/natPipeImpl.cc" ) CONFIG_LINKS="$CONFIG_LINKS gnu/java/nio/natPipeImpl.cc:gnu/java/nio/natPipeImpl${PLATFORM}.cc" ;;
+ "gnu/java/nio/natSelectorImpl.cc" ) CONFIG_LINKS="$CONFIG_LINKS gnu/java/nio/natSelectorImpl.cc:gnu/java/nio/natSelectorImpl${PLATFORM}.cc" ;;
+ "gnu/java/nio/channels/natFileChannelImpl.cc" ) CONFIG_LINKS="$CONFIG_LINKS gnu/java/nio/channels/natFileChannelImpl.cc:gnu/java/nio/channels/natFileChannel${FILE-${PLATFORM}}.cc" ;;
+ "include/java-gc.h" ) CONFIG_LINKS="$CONFIG_LINKS include/java-gc.h:include/$GCHDR" ;;
+ "include/java-threads.h" ) CONFIG_LINKS="$CONFIG_LINKS include/java-threads.h:include/$THREADH" ;;
+ "sysdep/locks.h" ) CONFIG_LINKS="$CONFIG_LINKS sysdep/locks.h:sysdep/$sysdeps_dir/locks.h" ;;
+ "include/java-signal.h" ) CONFIG_LINKS="$CONFIG_LINKS include/java-signal.h:$SIGNAL_HANDLER" ;;
+ "include/java-signal-aux.h" ) CONFIG_LINKS="$CONFIG_LINKS include/java-signal-aux.h:$SIGNAL_HANDLER_AUX" ;;
"default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
"include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;;
@@ -16391,9 +16334,7 @@ h=`${PWDCMD-pwd}`
while read f; do
echo "include $f" >> deps.mk
test -f $f || {
-
d=`echo $f | sed -e 's,/[^/]*$,,'`
-
if test ! -d $d; then
$libgcj_basedir/../mkinstalldirs $d
fi;
diff --git a/libjava/configure.in b/libjava/configure.in
index 38ccec5ac0e..c40405f14ef 100644
--- a/libjava/configure.in
+++ b/libjava/configure.in
@@ -1,14 +1,14 @@
-dnl Process this with autoconf to create configure
+dnl # Process this with autoconf to create configure
AC_PREREQ(2.59)
AC_INIT(java/lang/System.java)
-dnl We use these options to decide which functions to include.
+# We use these options to decide which functions to include.
AC_ARG_WITH(target-subdir,
-[ --with-target-subdir=SUBDIR
- configuring in a subdirectory])
+ AS_HELP_STRING([--with-target-subdir=SUBDIR],
+ [configure in a subdirectory]))
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
+# We may get other options which we don't document:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
# When building with srcdir == objdir, links to the source files will
# be created in directories within the target_subdir. We have to
@@ -58,15 +58,16 @@ mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
AC_SUBST(mkinstalldirs)
AC_ARG_WITH(cross-host,
-[ --with-cross-host=HOST configuring with a cross compiler])
+ AS_HELP_STRING([--with-cross-host=HOST],
+ [configure with a cross compiler from HOST]))
AC_ARG_WITH(newlib,
-[ --with-newlib Configuring with newlib])
+ AS_HELP_STRING([--with-newlib],
+ [configure with newlib]))
AC_ARG_ENABLE(version-specific-runtime-libs,
-[ --enable-version-specific-runtime-libs
- specify that runtime libraries should be installed in a compiler-specific
- directory ],
+ AS_HELP_STRING([--enable-version-specific-runtime-libs],
+ [specify that runtime libraries should be installed in a compiler-specific directory]),
[case "$enableval" in
yes) version_specific_libs=yes ;;
no) version_specific_libs=no ;;
@@ -75,16 +76,17 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
[version_specific_libs=no]
)
-dnl Default to --enable-multilib
+# Default to --enable-multilib
AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
+ AS_HELP_STRING([--enable-multilib],
+ [build many library versions (default)]),
[case "${enableval}" in
yes) multilib=yes ;;
no) multilib=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
esac], [multilib=yes])dnl
-dnl # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
+# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
GCC_NO_EXECUTABLES
# (1) We use an abnormal CXX (without library references), so we
@@ -110,9 +112,9 @@ AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(LDFLAGS)
-dnl version is pulled out to make it a bit easier to change using sed.
+# version is pulled out to make it a bit easier to change using sed.
version=0.0.7
-dnl Still use "libjava" here to placate dejagnu.
+# Still use "libjava" here to placate dejagnu.
AM_INIT_AUTOMAKE(libjava, $version)
AC_CHECK_TOOL(AS, as)
@@ -134,11 +136,11 @@ libgcj_cflags=
libgcj_cxxflags=
libgcj_javaflags=
-. [$]{srcdir}/configure.host
+. ${srcdir}/configure.host
-LIBGCJ_CFLAGS="[$]{libgcj_cflags}"
-LIBGCJ_CXXFLAGS="[$]{libgcj_cxxflags}"
-LIBGCJ_JAVAFLAGS="[$]{libgcj_javaflags}"
+LIBGCJ_CFLAGS="${libgcj_cflags}"
+LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
+LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
AC_SUBST(LIBGCJ_CFLAGS)
AC_SUBST(LIBGCJ_CXXFLAGS)
AC_SUBST(LIBGCJ_JAVAFLAGS)
@@ -170,16 +172,16 @@ else
fi
AC_SUBST(COMPPATH)
-dnl The -no-testsuite modules omit the test subdir.
+# The -no-testsuite modules omit the test subdir.
AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite)
-dnl Should the runtime set system properties by examining the
-dnl environment variable GCJ_PROPERTIES?
+# Should the runtime set system properties by examining the
+# environment variable GCJ_PROPERTIES?
AC_ARG_ENABLE(getenv-properties,
-[ --disable-getenv-properties
- don't set system properties from GCJ_PROPERTIES])
+ AS_HELP_STRING([--disable-getenv-properties],
+ [don't set system properties from GCJ_PROPERTIES]))
-dnl Whether GCJ_PROPERTIES is used depends on the target.
+# Whether GCJ_PROPERTIES is used depends on the target.
if test -z "$enable_getenv_properties"; then
enable_getenv_properties=${enable_getenv_properties_default-yes}
fi
@@ -188,7 +190,7 @@ if test "$enable_getenv_properties" = no; then
[Define if system properties shouldn't be read from getenv("GCJ_PROPERTIES").])
fi
-dnl Whether we should use arguments to main()
+# Whether we should use arguments to main()
if test -z "$enable_main_args"; then
enable_main_args=${enable_main_args_default-yes}
fi
@@ -197,12 +199,12 @@ if test "$enable_main_args" = no; then
fi
-dnl Should we use hashtable-based synchronization?
-dnl Currently works only for Linux X86/ia64
-dnl Typically faster and more space-efficient
+# Should we use hashtable-based synchronization?
+# Currently works only for Linux X86/ia64
+# Typically faster and more space-efficient
AC_ARG_ENABLE(hash-synchronization,
-[ --enable-hash-synchronization
- use global hash table for monitor locks])
+ AS_HELP_STRING([--enable-hash-synchronization],
+ [use global hash table for monitor locks]))
if test -z "$enable_hash_synchronization"; then
enable_hash_synchronization=$enable_hash_synchronization_default
@@ -210,8 +212,8 @@ fi
# Do we allow intermodule optimizations (i.e. compiling many files at once)?
AC_ARG_ENABLE(libgcj-multifile,
-[ --enable-libgcj-multifile
- allow compilation of several files at once],
+ AS_HELP_STRING([--enable-libgcj-multifile]
+ [allow compilation of several files at once]),
[case "${enableval}" in
yes) enable_libgcj_multifile=yes ;;
no) enable_libgcj_multifile=no ;;
@@ -221,10 +223,8 @@ AM_CONDITIONAL(ONESTEP, test "$enable_libgcj_multifile" = yes)
# What is the native OS API for MinGW?
AC_ARG_WITH(win32-nlsapi,
-changequote(<<,>>)dnl
-<< --with-win32-nlsapi=ansi, unicows or unicode
- native MinGW libgcj Win32 OS API [ansi]>>,
-changequote([,])
+ AS_HELP_STRING([--with-win32-nlsapi=ansi or unicows or unicode],
+ [native MinGW libgcj Win32 OS API (default is ansi)]),
[case "${withval}" in
ansi) with_win32_nlsapi=ansi ;;
unicows) with_win32_nlsapi=unicows ;;
@@ -239,33 +239,35 @@ case "${with_win32_nlsapi}" in
;;
esac
-dnl configure.host sets slow_pthread_self if the synchronization code should
-dnl try to avoid pthread_self calls by caching thread IDs in a hashtable.
+# configure.host sets slow_pthread_self if the synchronization code should
+# try to avoid pthread_self calls by caching thread IDs in a hashtable.
if test "${slow_pthread_self}" = "yes"; then
AC_DEFINE(SLOW_PTHREAD_SELF, 1,
[Define if if the synchronization code should try to avoid pthread_self calls by caching thread IDs in a hashtable.])
fi
-dnl See if the user has requested runtime debugging.
+# See if the user has requested runtime debugging.
LIBGCJDEBUG="false"
AC_SUBST(LIBGCJDEBUG)
AC_ARG_ENABLE(libgcj-debug,
-[ --enable-libgcj-debug enable runtime debugging code],
- if test "$enable_libgcj_debug" = yes; then
+ AS_HELP_STRING([--enable-libgcj-debug],
+ [enable runtime debugging code]),
+ [if test "$enable_libgcj_debug" = yes; then
AC_DEFINE(DEBUG, 1, [Define this if you want runtime debugging enabled.])
LIBGCJDEBUG="true"
- fi)
+ fi])
-dnl See if the user has the interpreter included.
+# See if the user has the interpreter included.
AC_ARG_ENABLE(interpreter,
-[ --enable-interpreter enable interpreter],
- if test "$enable_interpreter" = yes; then
+ AS_HELP_STRING([--enable-interpreter],
+ [enable interpreter]),
+ [if test "$enable_interpreter" = yes; then
# This can also be set in configure.host.
libgcj_interpreter=yes
elif test "$enable_interpreter" = no; then
libgcj_interpreter=no
- fi)
+ fi])
if test "$libgcj_interpreter" = yes; then
AC_DEFINE(INTERPRETER, 1, [Define if you want a bytecode interpreter.])
@@ -277,7 +279,8 @@ AC_MSG_CHECKING([for exception model to use])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_ARG_ENABLE(sjlj-exceptions,
-[ --enable-sjlj-exceptions force use of builtin_setjmp for exceptions],
+ AS_HELP_STRING([--enable-sjlj-exceptions],
+ [force use of builtin_setjmp for exceptions]),
[:],
[dnl Botheration. Now we've got to detect the exception model.
dnl Link tests against libgcc.a are problematic since -- at least
@@ -327,12 +330,13 @@ if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
EXCEPTIONSPEC=
fi
-dnl See if the user wants to disable java.net. This is the mildly
-dnl ugly way that we admit that target-side configuration sucks.
+# See if the user wants to disable java.net. This is the mildly
+# ugly way that we admit that target-side configuration sucks.
AC_ARG_ENABLE(java-net,
-[ --disable-java-net disable java.net])
+ AS_HELP_STRING([--disable-java-net],
+ [disable java.net]))
-dnl Whether java.net is built by default can depend on the target.
+# Whether java.net is built by default can depend on the target.
if test -z "$enable_java_net"; then
enable_java_net=${enable_java_net_default-yes}
fi
@@ -340,11 +344,14 @@ if test "$enable_java_net" = no; then
AC_DEFINE(DISABLE_JAVA_NET, 1, [Define if java.net native functions should be stubbed out.])
fi
-dnl See if the user wants to configure without libffi. Some
-dnl architectures don't support it, and default values are set in
-dnl configure.host.
+# See if the user wants to configure without libffi. Some
+# architectures don't support it, and default values are set in
+# configure.host.
AC_ARG_WITH(libffi,
-[ --without-libffi don't use libffi],,with_libffi=${with_libffi_default-yes})
+ AS_HELP_STRING([--without-libffi],
+ [don't use libffi]),
+ [:],
+ [with_libffi=${with_libffi_default-yes}])
LIBFFI=
LIBFFIINCS=
@@ -356,18 +363,19 @@ fi
AC_SUBST(LIBFFI)
AC_SUBST(LIBFFIINCS)
-dnl See if the user wants to disable JVMPI support.
+# See if the user wants to disable JVMPI support.
AC_ARG_ENABLE(jvmpi,
-[ --disable-jvmpi disable JVMPI support])
+ AS_HELP_STRING([--disable-jvmpi],
+ [disable JVMPI support]))
if test "$enable_jvmpi" != no; then
AC_DEFINE(ENABLE_JVMPI, 1, [Define if you are using JVMPI.])
fi
-dnl If the target is an eCos system, use the appropriate eCos
-dnl I/O routines.
-dnl FIXME: this should not be a local option but a global target
-dnl system; at present there is no eCos target.
+# If the target is an eCos system, use the appropriate eCos
+# I/O routines.
+# FIXME: this should not be a local option but a global target
+# system; at present there is no eCos target.
TARGET_ECOS=${PROCESS-"no"}
AC_ARG_WITH(ecos,
[ --with-ecos enable runtime eCos target support],
@@ -404,7 +412,7 @@ case "$TARGET_ECOS" in
;;
esac
AC_SUBST(PLATFORMOBJS)
-AC_LINK_FILES(include/$PLATFORMH, include/platform.h)
+AC_CONFIG_LINKS(include/platform.h:include/$PLATFORMH)
AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1,
[Define if you have int32_t and uint32_t.]))
@@ -416,42 +424,42 @@ AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1,
[Define if you have u_int32_t]))
-dnl These may not be defined in a non-ANS conformant embedded system.
-dnl FIXME: Should these case a runtime exception in that case?
+# These may not be defined in a non-ANS conformant embedded system.
+# FIXME: Should these case a runtime exception in that case?
AC_EGREP_HEADER(mktime, time.h, AC_DEFINE(HAVE_MKTIME, 1,
[Define is you have 'mktime' in <time.h>]))
AC_EGREP_HEADER(localtime, time.h, AC_DEFINE(HAVE_LOCALTIME, 1,
[Define is you have 'localtime' in <time.h>]))
-dnl Create the subdirectory for natFile.cc, or the attempt
-dnl to create the link will fail.
+# Create the subdirectory for natFile.cc, or the attempt
+# to create the link will fail.
test -d java || mkdir java
test -d java/io || mkdir java/io
test -d gnu || mkdir gnu
-AC_LINK_FILES(java/io/natFile${FILE-${PLATFORM}}.cc, java/io/natFile.cc)
+AC_CONFIG_LINKS(java/io/natFile.cc:java/io/natFile${FILE-${PLATFORM}}.cc)
-dnl Likewise for ConcreteProcess.java and natConcreteProcess.cc.
+# Likewise for ConcreteProcess.java and natConcreteProcess.cc.
test -d java/lang || mkdir java/lang
-AC_LINK_FILES(java/lang/${PLATFORM}Process.java, java/lang/ConcreteProcess.java)
-AC_LINK_FILES(java/lang/nat${PLATFORM}Process.cc, java/lang/natConcreteProcess.cc)
+AC_CONFIG_LINKS(java/lang/ConcreteProcess.java:java/lang/${PLATFORM}Process.java)
+AC_CONFIG_LINKS(java/lang/natConcreteProcess.cc:java/lang/nat${PLATFORM}Process.cc)
-dnl Likewise for natInetAddress.cc and natNetworkInterface.cc.
+# Likewise for natInetAddress.cc and natNetworkInterface.cc.
test -d java/net || mkdir java/net
-AC_LINK_FILES(java/net/natInetAddress${PLATFORMNET}.cc, java/net/natInetAddress.cc)
-AC_LINK_FILES(java/net/natNetworkInterface${PLATFORMNET}.cc, java/net/natNetworkInterface.cc)
+AC_CONFIG_LINKS(java/net/natInetAddress.cc:java/net/natInetAddress${PLATFORMNET}.cc)
+AC_CONFIG_LINKS(java/net/natNetworkInterface.cc:java/net/natNetworkInterface${PLATFORMNET}.cc)
-dnl Likewise for natPlainSocketImpl.cc and natPlainDatagramSocketImpl.cc.
+# Likewise for natPlainSocketImpl.cc and natPlainDatagramSocketImpl.cc.
test -d gnu/java || mkdir gnu/java
test -d gnu/java/net || mkdir gnu/java/net
-AC_LINK_FILES(gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc, gnu/java/net/natPlainSocketImpl.cc)
-AC_LINK_FILES(gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc, gnu/java/net/natPlainDatagramSocketImpl.cc)
+AC_CONFIG_LINKS(gnu/java/net/natPlainSocketImpl.cc:gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc)
+AC_CONFIG_LINKS(gnu/java/net/natPlainDatagramSocketImpl.cc:gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc)
-dnl Likewise for natPipeImpl.cc and natSelectorImpl.cc.
+# Likewise for natPipeImpl.cc and natSelectorImpl.cc.
test -d gnu/java/nio || mkdir gnu/java/nio
-AC_LINK_FILES(gnu/java/nio/natPipeImpl${PLATFORM}.cc, gnu/java/nio/natPipeImpl.cc)
-AC_LINK_FILES(gnu/java/nio/natSelectorImpl${PLATFORM}.cc, gnu/java/nio/natSelectorImpl.cc)
+AC_CONFIG_LINKS(gnu/java/nio/natPipeImpl.cc:gnu/java/nio/natPipeImpl${PLATFORM}.cc)
+AC_CONFIG_LINKS(gnu/java/nio/natSelectorImpl.cc:gnu/java/nio/natSelectorImpl${PLATFORM}.cc)
test -d gnu/java/nio/channels || mkdir gnu/java/nio/channels
-AC_LINK_FILES(gnu/java/nio/channels/natFileChannel${FILE-${PLATFORM}}.cc, gnu/java/nio/channels/natFileChannelImpl.cc)
+AC_CONFIG_LINKS(gnu/java/nio/channels/natFileChannelImpl.cc:gnu/java/nio/channels/natFileChannel${FILE-${PLATFORM}}.cc)
case "${host}" in
*mingw*)
@@ -470,7 +478,8 @@ LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
AC_SUBST(LIBGCJTESTSPEC)
AC_ARG_WITH(system-zlib,
-[ --with-system-zlib use installed libz])
+ AS_HELP_STRING([--with-system-zlib],
+ [use installed libz]))
ZLIBSPEC=
AC_SUBST(ZLIBSPEC)
ZLIBTESTSPEC=
@@ -478,9 +487,10 @@ AC_SUBST(ZLIBTESTSPEC)
AC_PATH_XTRA
-dnl Determine which AWT peer libraries to build
+# Determine which AWT peer libraries to build
AC_ARG_ENABLE(java-awt,
-[ --enable-java-awt list of AWT peer implementations to be built])
+ AS_HELP_STRING([--enable-java-awt],
+ [list of AWT peer implementations to be built]))
peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
use_xlib_awt=""
@@ -528,8 +538,10 @@ done
AM_CONDITIONAL(XLIB_AWT, test "$use_xlib_awt" = yes)
AM_CONDITIONAL(GTK_AWT, test "$use_gtk_awt" = yes)
-dnl determine whether to enable the cairo GTK Graphics2D backend
-AC_ARG_ENABLE(gtk-cairo, [ --enable-gtk-cairo build the cairo Graphics2D implementation on GTK])
+# determine whether to enable the cairo GTK Graphics2D backend
+AC_ARG_ENABLE(gtk-cairo,
+ AS_HELP_STRING([--enable-gtk-cairo],
+ [build the cairo Graphics2D implementation on GTK]))
AM_CONDITIONAL(GTK_CAIRO, test "x${enable_gtk_cairo}" = xyes)
if test "x${enable_gtk_cairo}" = xyes
then
@@ -541,17 +553,16 @@ AC_SUBST(CAIRO_CFLAGS)
AC_SUBST(PANGOFT2_LIBS)
AC_SUBST(PANGOFT2_CFLAGS)
-dnl FIXME: this should be _libs on some hosts.
+# FIXME: this should be _libs on some hosts.
libsubdir=.libs
-dnl Allow the GC to be disabled. Can be useful when debugging.
+# Allow the GC to be disabled. Can be useful when debugging.
AC_MSG_CHECKING([for garbage collector to use])
AC_ARG_ENABLE(java-gc,
-changequote(<<,>>)dnl
-<< --enable-java-gc=TYPE choose garbage collector [boehm]>>,
-changequote([,])
- GC=$enableval,
- GC=boehm)
+ AS_HELP_STRING([--enable-java-gc=TYPE],
+ [choose garbage collector (default is boehm)]),
+ [GC=$enableval],
+ [GC=boehm])
GCLIBS=
GCINCS=
GCDEPS=
@@ -566,12 +577,12 @@ case "$GC" in
JC1GCSPEC='-fuse-boehm-gc'
GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs"
- dnl We also want to pick up some cpp flags required when including
- dnl boehm-config.h. Yuck.
+ # We also want to pick up some cpp flags required when including
+ # boehm-config.h. Yuck.
GCINCS="`cat ../boehm-gc/boehm-cflags`"
GCOBJS=boehm.lo
GCHDR=boehm-gc.h
- dnl The POSIX thread support needs to know this.
+ # The POSIX thread support needs to know this.
AC_DEFINE(HAVE_BOEHM_GC, 1, [Define if Boehm GC in use.])
;;
no)
@@ -590,7 +601,7 @@ AC_SUBST(GCOBJS)
AC_SUBST(GCSPEC)
AC_SUBST(JC1GCSPEC)
AC_SUBST(GCTESTSPEC)
-AC_LINK_FILES(include/$GCHDR, include/java-gc.h)
+AC_CONFIG_LINKS(include/java-gc.h:include/$GCHDR)
AC_MSG_CHECKING([for thread model used by GCC])
@@ -633,9 +644,7 @@ case "$THREADS" in
*-*-cygwin*)
# Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
;;
-changequote(<<,>>)
- *-*-freebsd[1234]*)
-changequote([,])
+ *-*-freebsd[[1234]]*)
# Before FreeBSD 5, it didn't have -lpthread (or any library which
# merely adds pthread_* functions) but it does have a -pthread switch
# which is required at link-time to select -lc_r *instead* of -lc.
@@ -690,7 +699,7 @@ changequote([,])
THREADH=no-threads.h
;;
esac
-AC_LINK_FILES(include/$THREADH, include/java-threads.h)
+AC_CONFIG_LINKS(include/java-threads.h:include/$THREADH)
AC_SUBST(THREADLIBS)
AC_SUBST(THREADINCS)
AC_SUBST(THREADDEPS)
@@ -700,7 +709,7 @@ AC_SUBST(THREADLDFLAGS)
AC_SUBST(THREADCXXFLAGS)
if test -d sysdep; then true; else mkdir sysdep; fi
-AC_LINK_FILES(sysdep/$sysdeps_dir/locks.h, sysdep/locks.h)
+AC_CONFIG_LINKS(sysdep/locks.h:sysdep/$sysdeps_dir/locks.h)
HASH_SYNC_SPEC=
# Hash synchronization is only useful with posix threads right now.
@@ -717,12 +726,10 @@ AM_CONDITIONAL(USING_GCC, test "$GCC" = yes)
GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
# Figure out where generated headers like libgcj-config.h get installed.
-changequote(,)dnl
gcc_version_trigger=${libgcj_basedir}/../gcc/version.c
-gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
-gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
+gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^\"]]*\)\".*/\1/'`
+gcc_version=`echo ${gcc_version_full} | sed -e 's/\([[^ ]]*\) .*/\1/'`
tool_include_dir='$(libdir)/gcc/$(target_noncanonical)/'${gcc_version}/include
-changequote([,])dnl
AC_SUBST(tool_include_dir)
AC_SUBST(gcc_version)
@@ -740,12 +747,12 @@ if test "x${with_newlib}" = "xyes"; then
AC_DEFINE(HAVE_GMTIME_R, 1, [Define if you have the 'gmtime_r' function])
AC_DEFINE(HAVE_LOCALTIME_R, 1, [Define if you have the 'localtime_r' function.])
AC_DEFINE(HAVE_USLEEP_DECL, 1, [Define if usleep is declared in <unistd.h>.])
- dnl This is only for POSIX threads.
+ # This is only for POSIX threads.
AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT, 1, [Define if using POSIX threads that have the mutexattr functions.])
- dnl We also assume we are using gcc, which provides alloca.
+ # We also assume we are using gcc, which provides alloca.
AC_DEFINE(HAVE_ALLOCA)
- dnl Assume we do not have getuid and friends.
+ # Assume we do not have getuid and friends.
AC_DEFINE(NO_GETUID, 1, [Define if getuid() and friends are missing.])
PLATFORMNET=NoNet
else
@@ -1017,9 +1024,7 @@ fi
if test -z "${with_multisubdir}"; then
builddotdot=.
else
-changequote(<<,>>)
- builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
-changequote([,])
+ builddotdot=`echo ${with_multisubdir} | sed -e 's:[[^/]][[^/]]*:..:g'`
fi
NATIVE=yes
@@ -1180,19 +1185,17 @@ AC_SUBST(toolexecmainlibdir)
AC_SUBST(toolexeclibdir)
# Determine gcj version number.
-changequote(<<,>>)
-gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`
-changequote([,])
+gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([[^ ]]*\).*$/\1/p'`
GCJVERSION=$gcjversion
AC_SUBST(GCJVERSION)
AC_DEFINE_UNQUOTED(GCJVERSION, "$GCJVERSION", [Short GCJ version ID])
-dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
-dnl On that system, sys/ioctl.h will not include sys/filio.h unless
-dnl BSD_COMP is defined; just including sys/filio.h is simpler.
+# We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
+# On that system, sys/ioctl.h will not include sys/filio.h unless
+# BSD_COMP is defined; just including sys/filio.h is simpler.
AC_CHECK_HEADERS(unistd.h bstring.h sys/time.h sys/types.h fcntl.h sys/ioctl.h sys/filio.h sys/stat.h sys/select.h sys/socket.h netinet/in.h arpa/inet.h netdb.h net/if.h pwd.h sys/config.h stdint.h langinfo.h locale.h)
-dnl We avoid AC_HEADER_DIRENT since we really only care about dirent.h
-dnl for now. If you change this, you also must update natFile.cc.
+# We avoid AC_HEADER_DIRENT since we really only care about dirent.h
+# for now. If you change this, you also must update natFile.cc.
AC_CHECK_HEADERS(dirent.h)
AC_CHECK_HEADERS(inttypes.h, [
AC_DEFINE(HAVE_INTTYPES_H, 1, [Define if <inttypes.h> is available])
@@ -1346,8 +1349,8 @@ if test -z "$SIGNAL_HANDLER_AUX"; then
SIGNAL_HANDLER_AUX=$SIGNAL_HANDLER
fi
-AC_LINK_FILES($SIGNAL_HANDLER $SIGNAL_HANDLER_AUX,
- include/java-signal.h include/java-signal-aux.h)
+AC_CONFIG_LINKS(include/java-signal.h:$SIGNAL_HANDLER
+ include/java-signal-aux.h:$SIGNAL_HANDLER_AUX)
if test "${multilib}" = "yes"; then
multilib_arg="--enable-multilib"
@@ -1383,9 +1386,7 @@ h=`${PWDCMD-pwd}`
while read f; do
echo "include $f" >> deps.mk
test -f $f || {
-changequote(<<,>>)
- d=`echo $f | sed -e 's,/[^/]*$,,'`
-changequote([,])
+ d=`echo $f | sed -e 's,/[[^/]]*$,,'`
if test ! -d $d; then
$libgcj_basedir/../mkinstalldirs $d
fi;
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 287efec3665..bcca0d26c29 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,24 @@
+2004-08-07 Jonathan Wakely <redi@gcc.gnu.org>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * src/debug.cc (_Error_formatter::_M_print_string): In order
+ to print individual words from __string, _M_format_word can't
+ be called since may be just sprintf, thus ignoring completely
+ __n: instead, use memmove and append '\0' by hand.
+
+2004-08-07 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/generic/c_locale.h (__convert_from_v): Don't
+ use a default for __prec, assume __prec >= 0 and simplify.
+ * config/locale/gnu/c_locale.h (__convert_from_v): Likewise.
+ * include/bits/locale_facets.tcc (money_put<>::do_put(long double)):
+ Pass format "%.*Lf" + precision == 0, equivalent to "%.0Lf".
+
+2004-08-04 Phil Edwards <phil@codesourcery.com>
+
+ * docs/html/configopts.html: Emphasize that options change.
+ * docs/html/17_intro/configury.html: Update links.
+
2004-08-03 Paolo Carlini <pcarlini@suse.de>
* include/bits/list.tcc: Trivial formatting fixes.