public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Delete GCJ
@ 2016-09-05 15:29 Andrew Haley
  2016-09-05 15:31 ` Matthias Klose
                   ` (5 more replies)
  0 siblings, 6 replies; 86+ messages in thread
From: Andrew Haley @ 2016-09-05 15:29 UTC (permalink / raw)
  To: GCC Patches, GCJ-patches

As discussed.  I think I should ask a Global reviewer to approve this
one.  For obvious reasons I haven't included the diffs to the deleted
gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
if anyone would like to try it.

Andrew.


2016-09-05  Andrew Haley  <aph@redhat.com>

	* Makefile.def: Remove libjava.
	* Makefile.tpl: Likewise.
	* Makefile.in: Regenerate.
	* configure.ac: Likewise.
	* configure: Likewise.
	* gcc/java: Remove.
	* libjava: Likewise.

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 239988)
+++ Makefile.in	(working copy)
@@ -322,8 +322,6 @@
 HOST_LIBELFLIBS = @libelflibs@
 HOST_LIBELFINC = @libelfinc@

-EXTRA_CONFIGARGS_LIBJAVA = @EXTRA_CONFIGARGS_LIBJAVA@
-
 # ----------------------------------------------
 # Programs producing files for the BUILD machine
 # ----------------------------------------------
@@ -1007,7 +1005,6 @@
     maybe-configure-target-winsup \
     maybe-configure-target-libgloss \
     maybe-configure-target-libffi \
-    maybe-configure-target-libjava \
     maybe-configure-target-zlib \
     maybe-configure-target-boehm-gc \
     maybe-configure-target-rda \
@@ -1174,7 +1171,6 @@
 all-target: maybe-all-target-winsup
 all-target: maybe-all-target-libgloss
 all-target: maybe-all-target-libffi
-all-target: maybe-all-target-libjava
 all-target: maybe-all-target-zlib
 all-target: maybe-all-target-boehm-gc
 all-target: maybe-all-target-rda
@@ -1268,7 +1264,6 @@
 info-target: maybe-info-target-winsup
 info-target: maybe-info-target-libgloss
 info-target: maybe-info-target-libffi
-info-target: maybe-info-target-libjava
 info-target: maybe-info-target-zlib
 info-target: maybe-info-target-boehm-gc
 info-target: maybe-info-target-rda
@@ -1355,7 +1350,6 @@
 dvi-target: maybe-dvi-target-winsup
 dvi-target: maybe-dvi-target-libgloss
 dvi-target: maybe-dvi-target-libffi
-dvi-target: maybe-dvi-target-libjava
 dvi-target: maybe-dvi-target-zlib
 dvi-target: maybe-dvi-target-boehm-gc
 dvi-target: maybe-dvi-target-rda
@@ -1442,7 +1436,6 @@
 pdf-target: maybe-pdf-target-winsup
 pdf-target: maybe-pdf-target-libgloss
 pdf-target: maybe-pdf-target-libffi
-pdf-target: maybe-pdf-target-libjava
 pdf-target: maybe-pdf-target-zlib
 pdf-target: maybe-pdf-target-boehm-gc
 pdf-target: maybe-pdf-target-rda
@@ -1529,7 +1522,6 @@
 html-target: maybe-html-target-winsup
 html-target: maybe-html-target-libgloss
 html-target: maybe-html-target-libffi
-html-target: maybe-html-target-libjava
 html-target: maybe-html-target-zlib
 html-target: maybe-html-target-boehm-gc
 html-target: maybe-html-target-rda
@@ -1616,7 +1608,6 @@
 TAGS-target: maybe-TAGS-target-winsup
 TAGS-target: maybe-TAGS-target-libgloss
 TAGS-target: maybe-TAGS-target-libffi
-TAGS-target: maybe-TAGS-target-libjava
 TAGS-target: maybe-TAGS-target-zlib
 TAGS-target: maybe-TAGS-target-boehm-gc
 TAGS-target: maybe-TAGS-target-rda
@@ -1703,7 +1694,6 @@
 install-info-target: maybe-install-info-target-winsup
 install-info-target: maybe-install-info-target-libgloss
 install-info-target: maybe-install-info-target-libffi
-install-info-target: maybe-install-info-target-libjava
 install-info-target: maybe-install-info-target-zlib
 install-info-target: maybe-install-info-target-boehm-gc
 install-info-target: maybe-install-info-target-rda
@@ -1790,7 +1780,6 @@
 install-pdf-target: maybe-install-pdf-target-winsup
 install-pdf-target: maybe-install-pdf-target-libgloss
 install-pdf-target: maybe-install-pdf-target-libffi
-install-pdf-target: maybe-install-pdf-target-libjava
 install-pdf-target: maybe-install-pdf-target-zlib
 install-pdf-target: maybe-install-pdf-target-boehm-gc
 install-pdf-target: maybe-install-pdf-target-rda
@@ -1877,7 +1866,6 @@
 install-html-target: maybe-install-html-target-winsup
 install-html-target: maybe-install-html-target-libgloss
 install-html-target: maybe-install-html-target-libffi
-install-html-target: maybe-install-html-target-libjava
 install-html-target: maybe-install-html-target-zlib
 install-html-target: maybe-install-html-target-boehm-gc
 install-html-target: maybe-install-html-target-rda
@@ -1964,7 +1952,6 @@
 installcheck-target: maybe-installcheck-target-winsup
 installcheck-target: maybe-installcheck-target-libgloss
 installcheck-target: maybe-installcheck-target-libffi
-installcheck-target: maybe-installcheck-target-libjava
 installcheck-target: maybe-installcheck-target-zlib
 installcheck-target: maybe-installcheck-target-boehm-gc
 installcheck-target: maybe-installcheck-target-rda
@@ -2051,7 +2038,6 @@
 mostlyclean-target: maybe-mostlyclean-target-winsup
 mostlyclean-target: maybe-mostlyclean-target-libgloss
 mostlyclean-target: maybe-mostlyclean-target-libffi
-mostlyclean-target: maybe-mostlyclean-target-libjava
 mostlyclean-target: maybe-mostlyclean-target-zlib
 mostlyclean-target: maybe-mostlyclean-target-boehm-gc
 mostlyclean-target: maybe-mostlyclean-target-rda
@@ -2138,7 +2124,6 @@
 clean-target: maybe-clean-target-winsup
 clean-target: maybe-clean-target-libgloss
 clean-target: maybe-clean-target-libffi
-clean-target: maybe-clean-target-libjava
 clean-target: maybe-clean-target-zlib
 clean-target: maybe-clean-target-boehm-gc
 clean-target: maybe-clean-target-rda
@@ -2225,7 +2210,6 @@
 distclean-target: maybe-distclean-target-winsup
 distclean-target: maybe-distclean-target-libgloss
 distclean-target: maybe-distclean-target-libffi
-distclean-target: maybe-distclean-target-libjava
 distclean-target: maybe-distclean-target-zlib
 distclean-target: maybe-distclean-target-boehm-gc
 distclean-target: maybe-distclean-target-rda
@@ -2312,7 +2296,6 @@
 maintainer-clean-target: maybe-maintainer-clean-target-winsup
 maintainer-clean-target: maybe-maintainer-clean-target-libgloss
 maintainer-clean-target: maybe-maintainer-clean-target-libffi
-maintainer-clean-target: maybe-maintainer-clean-target-libjava
 maintainer-clean-target: maybe-maintainer-clean-target-zlib
 maintainer-clean-target: maybe-maintainer-clean-target-boehm-gc
 maintainer-clean-target: maybe-maintainer-clean-target-rda
@@ -2455,7 +2438,6 @@
     maybe-check-target-winsup \
     maybe-check-target-libgloss \
     maybe-check-target-libffi \
-    maybe-check-target-libjava \
     maybe-check-target-zlib \
     maybe-check-target-boehm-gc \
     maybe-check-target-rda \
@@ -2638,7 +2620,6 @@
     maybe-install-target-winsup \
     maybe-install-target-libgloss \
     maybe-install-target-libffi \
-    maybe-install-target-libjava \
     maybe-install-target-zlib \
     maybe-install-target-boehm-gc \
     maybe-install-target-rda \
@@ -2745,7 +2726,6 @@
     maybe-install-strip-target-winsup \
     maybe-install-strip-target-libgloss \
     maybe-install-strip-target-libffi \
-    maybe-install-strip-target-libjava \
     maybe-install-strip-target-zlib \
     maybe-install-strip-target-boehm-gc \
     maybe-install-strip-target-rda \
@@ -47894,464 +47874,6 @@



-.PHONY: configure-target-libjava maybe-configure-target-libjava
-maybe-configure-target-libjava:
-@if gcc-bootstrap
-configure-target-libjava: stage_current
-@endif gcc-bootstrap
-@if target-libjava
-maybe-configure-target-libjava: configure-target-libjava
-configure-target-libjava:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	echo "Checking multilib configuration for libjava..."; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava; \
-	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libjava/multilib.tmp 2> /dev/null; \
-	if test -r $(TARGET_SUBDIR)/libjava/multilib.out; then \
-	  if cmp -s $(TARGET_SUBDIR)/libjava/multilib.tmp $(TARGET_SUBDIR)/libjava/multilib.out; then \
-	    rm -f $(TARGET_SUBDIR)/libjava/multilib.tmp; \
-	  else \
-	    rm -f $(TARGET_SUBDIR)/libjava/Makefile; \
-	    mv $(TARGET_SUBDIR)/libjava/multilib.tmp $(TARGET_SUBDIR)/libjava/multilib.out; \
-	  fi; \
-	else \
-	  mv $(TARGET_SUBDIR)/libjava/multilib.tmp $(TARGET_SUBDIR)/libjava/multilib.out; \
-	fi; \
-	test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava; \
-	$(RAW_CXX_TARGET_EXPORTS)  \
-	echo Configuring in $(TARGET_SUBDIR)/libjava; \
-	cd "$(TARGET_SUBDIR)/libjava" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(TARGET_SUBDIR)/libjava/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	module_srcdir=libjava; \
-	rm -f no-such-file || : ; \
-	CONFIG_SITE=no-such-file $(SHELL) \
-	  $$s/$$module_srcdir/configure \
-	  --srcdir=$${topdir}/$$module_srcdir \
-	  $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
-	  --target=${target_alias} $(EXTRA_CONFIGARGS_LIBJAVA) \
-	  || exit 1
-@endif target-libjava
-
-
-
-
-
-.PHONY: all-target-libjava maybe-all-target-libjava
-maybe-all-target-libjava:
-@if gcc-bootstrap
-all-target-libjava: stage_current
-@endif gcc-bootstrap
-@if target-libjava
-TARGET-target-libjava=all
-maybe-all-target-libjava: all-target-libjava
-all-target-libjava: configure-target-libjava
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS)  \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'   \
-		$(TARGET-target-libjava))
-@endif target-libjava
-
-
-
-
-
-.PHONY: check-target-libjava maybe-check-target-libjava
-maybe-check-target-libjava:
-@if target-libjava
-maybe-check-target-libjava: check-target-libjava
-
-check-target-libjava:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'   check)
-
-@endif target-libjava
-
-.PHONY: install-target-libjava maybe-install-target-libjava
-maybe-install-target-libjava:
-@if target-libjava
-maybe-install-target-libjava: install-target-libjava
-
-install-target-libjava: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install)
-
-@endif target-libjava
-
-.PHONY: install-strip-target-libjava maybe-install-strip-target-libjava
-maybe-install-strip-target-libjava:
-@if target-libjava
-maybe-install-strip-target-libjava: install-strip-target-libjava
-
-install-strip-target-libjava: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
-
-@endif target-libjava
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-target-libjava info-target-libjava
-maybe-info-target-libjava:
-@if target-libjava
-maybe-info-target-libjava: info-target-libjava
-
-info-target-libjava: \
-    configure-target-libjava
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing info in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           info) \
-	  || exit 1
-
-@endif target-libjava
-
-.PHONY: maybe-dvi-target-libjava dvi-target-libjava
-maybe-dvi-target-libjava:
-@if target-libjava
-maybe-dvi-target-libjava: dvi-target-libjava
-
-dvi-target-libjava: \
-    configure-target-libjava
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing dvi in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           dvi) \
-	  || exit 1
-
-@endif target-libjava
-
-.PHONY: maybe-pdf-target-libjava pdf-target-libjava
-maybe-pdf-target-libjava:
-@if target-libjava
-maybe-pdf-target-libjava: pdf-target-libjava
-
-pdf-target-libjava: \
-    configure-target-libjava
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing pdf in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           pdf) \
-	  || exit 1
-
-@endif target-libjava
-
-.PHONY: maybe-html-target-libjava html-target-libjava
-maybe-html-target-libjava:
-@if target-libjava
-maybe-html-target-libjava: html-target-libjava
-
-html-target-libjava: \
-    configure-target-libjava
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing html in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           html) \
-	  || exit 1
-
-@endif target-libjava
-
-.PHONY: maybe-TAGS-target-libjava TAGS-target-libjava
-maybe-TAGS-target-libjava:
-@if target-libjava
-maybe-TAGS-target-libjava: TAGS-target-libjava
-
-TAGS-target-libjava: \
-    configure-target-libjava
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing TAGS in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           TAGS) \
-	  || exit 1
-
-@endif target-libjava
-
-.PHONY: maybe-install-info-target-libjava install-info-target-libjava
-maybe-install-info-target-libjava:
-@if target-libjava
-maybe-install-info-target-libjava: install-info-target-libjava
-
-install-info-target-libjava: \
-    configure-target-libjava \
-    info-target-libjava
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing install-info in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-info) \
-	  || exit 1
-
-@endif target-libjava
-
-.PHONY: maybe-install-pdf-target-libjava install-pdf-target-libjava
-maybe-install-pdf-target-libjava:
-@if target-libjava
-maybe-install-pdf-target-libjava: install-pdf-target-libjava
-
-install-pdf-target-libjava: \
-    configure-target-libjava \
-    pdf-target-libjava
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing install-pdf in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-pdf) \
-	  || exit 1
-
-@endif target-libjava
-
-.PHONY: maybe-install-html-target-libjava install-html-target-libjava
-maybe-install-html-target-libjava:
-@if target-libjava
-maybe-install-html-target-libjava: install-html-target-libjava
-
-install-html-target-libjava: \
-    configure-target-libjava \
-    html-target-libjava
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing install-html in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-html) \
-	  || exit 1
-
-@endif target-libjava
-
-.PHONY: maybe-installcheck-target-libjava installcheck-target-libjava
-maybe-installcheck-target-libjava:
-@if target-libjava
-maybe-installcheck-target-libjava: installcheck-target-libjava
-
-installcheck-target-libjava: \
-    configure-target-libjava
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing installcheck in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           installcheck) \
-	  || exit 1
-
-@endif target-libjava
-
-.PHONY: maybe-mostlyclean-target-libjava mostlyclean-target-libjava
-maybe-mostlyclean-target-libjava:
-@if target-libjava
-maybe-mostlyclean-target-libjava: mostlyclean-target-libjava
-
-mostlyclean-target-libjava:
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           mostlyclean) \
-	  || exit 1
-
-@endif target-libjava
-
-.PHONY: maybe-clean-target-libjava clean-target-libjava
-maybe-clean-target-libjava:
-@if target-libjava
-maybe-clean-target-libjava: clean-target-libjava
-
-clean-target-libjava:
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing clean in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           clean) \
-	  || exit 1
-
-@endif target-libjava
-
-.PHONY: maybe-distclean-target-libjava distclean-target-libjava
-maybe-distclean-target-libjava:
-@if target-libjava
-maybe-distclean-target-libjava: distclean-target-libjava
-
-distclean-target-libjava:
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing distclean in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           distclean) \
-	  || exit 1
-
-@endif target-libjava
-
-.PHONY: maybe-maintainer-clean-target-libjava maintainer-clean-target-libjava
-maybe-maintainer-clean-target-libjava:
-@if target-libjava
-maybe-maintainer-clean-target-libjava: maintainer-clean-target-libjava
-
-maintainer-clean-target-libjava:
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(RAW_CXX_TARGET_EXPORTS) \
-	echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libjava"; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libjava && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           maintainer-clean) \
-	  || exit 1
-
-@endif target-libjava
-
-
-
-
-
 .PHONY: configure-target-zlib maybe-configure-target-zlib
 maybe-configure-target-zlib:
 @if gcc-bootstrap
@@ -52312,14 +51834,6 @@
 	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-fortran);
 check-fortran: check-gcc-fortran check-target-libquadmath check-target-libgfortran

-.PHONY: check-gcc-java check-java
-check-gcc-java:
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-java);
-check-java: check-gcc-java check-target-libjava
-
 .PHONY: check-gcc-ada check-ada
 check-gcc-ada:
 	r=`${PWD_COMMAND}`; export r; \
@@ -55233,7 +54747,6 @@
 configure-target-winsup: stage_last
 configure-target-libgloss: stage_last
 configure-target-libffi: stage_last
-configure-target-libjava: stage_last
 configure-target-zlib: stage_last
 configure-target-boehm-gc: stage_last
 configure-target-rda: stage_last
@@ -55269,7 +54782,6 @@
 configure-target-winsup: maybe-all-gcc
 configure-target-libgloss: 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-rda: maybe-all-gcc
@@ -56294,13 +55806,6 @@
 all-target-libgo: maybe-all-target-libbacktrace
 all-target-libgo: maybe-all-target-libffi
 all-target-libgo: maybe-all-target-libatomic
-configure-target-libjava: maybe-configure-target-zlib
-configure-target-libjava: maybe-configure-target-boehm-gc
-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-libffi
 configure-target-libobjc: maybe-configure-target-boehm-gc
 all-target-libobjc: maybe-all-target-boehm-gc
 configure-target-libstdc++-v3: maybe-configure-target-libgomp
@@ -56356,7 +55861,6 @@
 install-target-libcilkrts: maybe-install-target-libgcc
 install-target-liboffloadmic: maybe-install-target-libstdc++-v3
 install-target-liboffloadmic: maybe-install-target-libgcc
-install-target-libjava: maybe-install-target-libgcc
 install-target-libitm: maybe-install-target-libgcc
 install-target-libobjc: maybe-install-target-libgcc
 install-target-libstdc++-v3: maybe-install-target-libgcc
@@ -56434,7 +55938,6 @@
 configure-target-winsup: maybe-all-target-libgcc
 configure-target-libgloss: maybe-all-target-libgcc
 configure-target-libffi: maybe-all-target-libgcc
-configure-target-libjava: maybe-all-target-libgcc
 configure-target-zlib: maybe-all-target-libgcc
 configure-target-boehm-gc: maybe-all-target-libgcc
 configure-target-rda: maybe-all-target-libgcc
@@ -56481,9 +55984,6 @@
 configure-target-libffi: maybe-all-target-newlib maybe-all-target-libgloss
 configure-target-libffi: maybe-all-target-libstdc++-v3

-configure-target-libjava: maybe-all-target-newlib maybe-all-target-libgloss
-configure-target-libjava: maybe-all-target-libstdc++-v3
-
 configure-target-zlib: maybe-all-target-newlib maybe-all-target-libgloss

 configure-target-boehm-gc: maybe-all-target-newlib maybe-all-target-libgloss
Index: configure.ac
===================================================================
--- configure.ac	(revision 239988)
+++ configure.ac	(working copy)
@@ -142,11 +142,6 @@
 # If --enable-gold is used, "gold" may replace "ld".
 host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools"

-# libgcj represents the runtime libraries only used by gcj.
-libgcj="target-libffi \
-	target-zlib \
-	target-libjava"
-
 # these libraries are built for the target environment, and are built after
 # the host libraries and the host tools (which may be a cross compiler)
 # Note that libiberty is not a target library.
@@ -166,8 +161,6 @@
 		target-libssp \
 		target-libquadmath \
 		target-libgfortran \
-		target-boehm-gc \
-		${libgcj} \
 		target-libobjc \
 		target-libada \
 		target-libgo"
@@ -507,41 +500,6 @@
 fi])
 AC_SUBST(extra_liboffloadmic_configure_flags)

-# Save it here so that, even in case of --enable-libgcj, if the Java
-# front-end isn't enabled, we still get libgcj disabled.
-libgcj_saved=$libgcj
-case $enable_libgcj in
-yes)
-  # If we reset it here, it won't get added to noconfigdirs in the
-  # target-specific build rules, so it will be forcibly enabled
-  # (unless the Java language itself isn't enabled).
-  libgcj=
-  ;;
-no)
-  # Make sure we get it printed in the list of not supported target libs.
-  # Don't disable libffi, though, other languages use it.
-  noconfigdirs="$noconfigdirs `echo ${libgcj} | sed -e 's/target-libffi//'`"
-  # Clear libgcj_saved so that even if java is enabled libffi won't be
-  # built.
-  libgcj_saved=
-  ;;
-esac
-
-AC_ARG_ENABLE(static-libjava,
-[AS_HELP_STRING([[--enable-static-libjava[=ARG]]],
-		[build static libjava @<:@default=no@:>@])],
-ENABLE_STATIC_LIBJAVA=$enableval,
-ENABLE_STATIC_LIBJAVA=no)
-enable_static_libjava=
-if test "${ENABLE_STATIC_LIBJAVA}" = "yes" ; then
-  enable_static_libjava=yes
-fi
-
-if test x$enable_static_libjava != xyes ; then
-  EXTRA_CONFIGARGS_LIBJAVA=--disable-static
-fi
-AC_SUBST(EXTRA_CONFIGARGS_LIBJAVA)
-
 # Enable libgomp by default on hosted POSIX systems, and a few others.
 if test x$enable_libgomp = x ; then
     case "${target}" in
@@ -738,166 +696,6 @@
     ;;
 esac

-# Disable Java if libffi is not supported.
-case "${target}" in
-  aarch64-*-*)
-    ;;
-  alpha*-*-*)
-    ;;
-  arm*-*-*)
-    ;;
-  cris-*-*)
-    ;;
-  frv-*-*)
-    ;;
-  hppa*-*-linux*)
-    ;;
-  hppa*-*-hpux*)
-    ;;
-  i?86-*-*)
-    ;;
-  ia64*-*-*)
-    ;;
-  m32r*-*-*)
-    ;;
-  m68k-*-*)
-    ;;
-  mips*-*-rtems*)
-    ;;
-  mips*-*-linux*)
-    ;;
-  powerpc*-*-linux*)
-    ;;
-  powerpc-*-darwin*)
-    ;;
-  powerpc-*-aix* | rs6000-*-aix*)
-    ;;
-  powerpc-*-freebsd*)
-    ;;
-  powerpc64-*-freebsd*)
-    ;;
-  powerpc*-*-rtems*)
-    ;;
-  s390-*-* | s390x-*-*)
-    ;;
-  sh-*-* | sh[[34]]*-*-*)
-    ;;
-  sparc*-*-*)
-    ;;
-  x86_64-*-*)
-    ;;
-  *-*-*)
-    unsupported_languages="$unsupported_languages java"
-    ;;
-esac
-
-# Disable Java, libgcj or related libraries for some systems.
-case "${target}" in
-  powerpc-*-darwin*)
-    ;;
-  i[[3456789]]86-*-darwin*)
-    ;;
-  x86_64-*-darwin[[912]]*)
-    ;;
-  *-*-darwin*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-netware*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-phoenix*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-rtems*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-tpf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-uclinux*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-vxworks*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  alpha*-*-*vms*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  arm*-*-freebsd*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  arm-wince-pe)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  arm*-*-symbianelf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  bfin-*-*)
-    noconfigdirs="$noconfigdirs target-boehm-gc"
-    ;;
-  cris-*-* | crisv32-*-*)
-    unsupported_languages="$unsupported_languages java"
-    case "${target}" in
-      *-*-linux*)
-	;;
-      *) # See PR46792 regarding target-libffi.
-	noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
-    esac
-    ;;
-  hppa*64*-*-linux*)
-    # In this case, it's because the hppa64-linux target is for
-    # the kernel only at this point and has no libc, and thus no
-    # headers, crt*.o, etc., all of which are needed by these.
-    unsupported_languages="$unsupported_languages java"
-    ;;
-  hppa*64*-*-hpux*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  hppa*-hp-hpux11*)
-    ;;
-  hppa*-*-hpux*)
-    # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
-    # build on HP-UX 10.20.
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  ia64*-*-*vms*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  i[[3456789]]86-w64-mingw*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  i[[3456789]]86-*-mingw*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  x86_64-*-mingw*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  mmix-*-*)
-    noconfigdirs="$noconfigdirs target-libffi target-boehm-gc"
-    ;;
-  powerpc-*-aix*)
-    # copied from rs6000-*-* entry
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  rs6000-*-aix*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  ft32-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-lynxos*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-esac
-
-# Disable the go frontend on systems where it is known to not work. Please keep
-# this in sync with contrib/config-list.mk.
-case "${target}" in
-*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
-    unsupported_languages="$unsupported_languages go"
-    ;;
-esac
-
 # Disable libgo for some systems where it is known to not work.
 # For testing, you can easily override this with --enable-libgo.
 if test x$enable_libgo = x; then
@@ -2152,30 +1950,6 @@
   fi
 done

-# Check for Boehm's garbage collector
-AC_ARG_ENABLE(objc-gc,
-[AS_HELP_STRING([--enable-objc-gc],
-		[enable use of Boehm's garbage collector with the
-		 GNU Objective-C runtime])],
-[case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
-  *,objc,*:*:yes:*target-boehm-gc*)
-    AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration])
-    ;;
-esac])
-
-# Make sure we only build Boehm's garbage collector if required.
-case ,${enable_languages},:${enable_objc_gc} in
-  *,objc,*:yes)
-    # Keep target-boehm-gc if requested for Objective-C.
-    ;;
-  *)
-    # Otherwise remove target-boehm-gc depending on target-libjava.
-    if echo " ${noconfigdirs} " | grep "target-libjava" >/dev/null 2>&1; then
-      noconfigdirs="$noconfigdirs target-boehm-gc"
-    fi
-    ;;
-esac
-
 # Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
 case ,${enable_languages}, in
   *,c++,*)
@@ -2260,15 +2034,6 @@
   fi
 done

-# Exclude target-zlib if target-libjava isn't built.
-case ${target_configdirs} in
-*target-libjava*)
-  ;;
-*)
-  target_configdirs="`echo ${target_configdirs} | sed -e 's/target-zlib//'`"
-  ;;
-esac
-
 # libiberty-linker-plugin is special: it doesn't have its own source directory,
 # so we have to add it after the preceding checks.
 if test x"$extra_linker_plugin_flags$extra_linker_plugin_configure_flags" != x
Index: configure
===================================================================
--- configure	(revision 239988)
+++ configure	(working copy)
@@ -674,7 +674,6 @@
 LDFLAGS
 CFLAGS
 CC
-EXTRA_CONFIGARGS_LIBJAVA
 extra_liboffloadmic_configure_flags
 target_subdir
 host_subdir
@@ -761,7 +760,6 @@
 enable_libssp
 enable_libstdcxx
 enable_liboffloadmic
-enable_static_libjava
 enable_bootstrap
 with_mpc
 with_mpc_include
@@ -786,7 +784,6 @@
 enable_linker_plugin_configure_flags
 enable_linker_plugin_flags
 enable_stage1_languages
-enable_objc_gc
 with_build_sysroot
 with_debug_prefix_map
 with_build_config
@@ -1489,8 +1486,6 @@
   --disable-libstdcxx     do not build libstdc++-v3 directory
   --enable-liboffloadmic=ARG
                           build liboffloadmic [ARG={no,host,target}]
-  --enable-static-libjava[=ARG]
-                          build static libjava [default=no]
   --enable-bootstrap      enable bootstrapping [yes if native build]
   --disable-isl-version-check
                           disable check for isl version
@@ -1504,8 +1499,6 @@
   --enable-stage1-languages[=all]
                           choose additional languages to build during stage1.
                           Mostly useful for compiler development
-  --enable-objc-gc        enable use of Boehm's garbage collector with the GNU
-                          Objective-C runtime
   --enable-vtable-verify  Enable vtable verification feature
   --enable-serial-[{host,target,build}-]configure
                           force sequential configuration of sub-packages for
@@ -2736,11 +2729,6 @@
 # If --enable-gold is used, "gold" may replace "ld".
 host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools"

-# libgcj represents the runtime libraries only used by gcj.
-libgcj="target-libffi \
-	target-zlib \
-	target-libjava"
-
 # these libraries are built for the target environment, and are built after
 # the host libraries and the host tools (which may be a cross compiler)
 # Note that libiberty is not a target library.
@@ -2760,8 +2748,6 @@
 		target-libssp \
 		target-libquadmath \
 		target-libgfortran \
-		target-boehm-gc \
-		${libgcj} \
 		target-libobjc \
 		target-libada \
 		target-libgo"
@@ -3148,43 +3134,6 @@



-# Save it here so that, even in case of --enable-libgcj, if the Java
-# front-end isn't enabled, we still get libgcj disabled.
-libgcj_saved=$libgcj
-case $enable_libgcj in
-yes)
-  # If we reset it here, it won't get added to noconfigdirs in the
-  # target-specific build rules, so it will be forcibly enabled
-  # (unless the Java language itself isn't enabled).
-  libgcj=
-  ;;
-no)
-  # Make sure we get it printed in the list of not supported target libs.
-  # Don't disable libffi, though, other languages use it.
-  noconfigdirs="$noconfigdirs `echo ${libgcj} | sed -e 's/target-libffi//'`"
-  # Clear libgcj_saved so that even if java is enabled libffi won't be
-  # built.
-  libgcj_saved=
-  ;;
-esac
-
-# Check whether --enable-static-libjava was given.
-if test "${enable_static_libjava+set}" = set; then :
-  enableval=$enable_static_libjava; ENABLE_STATIC_LIBJAVA=$enableval
-else
-  ENABLE_STATIC_LIBJAVA=no
-fi
-
-enable_static_libjava=
-if test "${ENABLE_STATIC_LIBJAVA}" = "yes" ; then
-  enable_static_libjava=yes
-fi
-
-if test x$enable_static_libjava != xyes ; then
-  EXTRA_CONFIGARGS_LIBJAVA=--disable-static
-fi
-
-
 # Enable libgomp by default on hosted POSIX systems, and a few others.
 if test x$enable_libgomp = x ; then
     case "${target}" in
@@ -3402,166 +3351,6 @@
     ;;
 esac

-# Disable Java if libffi is not supported.
-case "${target}" in
-  aarch64-*-*)
-    ;;
-  alpha*-*-*)
-    ;;
-  arm*-*-*)
-    ;;
-  cris-*-*)
-    ;;
-  frv-*-*)
-    ;;
-  hppa*-*-linux*)
-    ;;
-  hppa*-*-hpux*)
-    ;;
-  i?86-*-*)
-    ;;
-  ia64*-*-*)
-    ;;
-  m32r*-*-*)
-    ;;
-  m68k-*-*)
-    ;;
-  mips*-*-rtems*)
-    ;;
-  mips*-*-linux*)
-    ;;
-  powerpc*-*-linux*)
-    ;;
-  powerpc-*-darwin*)
-    ;;
-  powerpc-*-aix* | rs6000-*-aix*)
-    ;;
-  powerpc-*-freebsd*)
-    ;;
-  powerpc64-*-freebsd*)
-    ;;
-  powerpc*-*-rtems*)
-    ;;
-  s390-*-* | s390x-*-*)
-    ;;
-  sh-*-* | sh[34]*-*-*)
-    ;;
-  sparc*-*-*)
-    ;;
-  x86_64-*-*)
-    ;;
-  *-*-*)
-    unsupported_languages="$unsupported_languages java"
-    ;;
-esac
-
-# Disable Java, libgcj or related libraries for some systems.
-case "${target}" in
-  powerpc-*-darwin*)
-    ;;
-  i[3456789]86-*-darwin*)
-    ;;
-  x86_64-*-darwin[912]*)
-    ;;
-  *-*-darwin*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-netware*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-phoenix*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-rtems*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-tpf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-uclinux*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-vxworks*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  alpha*-*-*vms*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  arm*-*-freebsd*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  arm-wince-pe)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  arm*-*-symbianelf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  bfin-*-*)
-    noconfigdirs="$noconfigdirs target-boehm-gc"
-    ;;
-  cris-*-* | crisv32-*-*)
-    unsupported_languages="$unsupported_languages java"
-    case "${target}" in
-      *-*-linux*)
-	;;
-      *) # See PR46792 regarding target-libffi.
-	noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
-    esac
-    ;;
-  hppa*64*-*-linux*)
-    # In this case, it's because the hppa64-linux target is for
-    # the kernel only at this point and has no libc, and thus no
-    # headers, crt*.o, etc., all of which are needed by these.
-    unsupported_languages="$unsupported_languages java"
-    ;;
-  hppa*64*-*-hpux*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  hppa*-hp-hpux11*)
-    ;;
-  hppa*-*-hpux*)
-    # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
-    # build on HP-UX 10.20.
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  ia64*-*-*vms*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  i[3456789]86-w64-mingw*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  i[3456789]86-*-mingw*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  x86_64-*-mingw*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  mmix-*-*)
-    noconfigdirs="$noconfigdirs target-libffi target-boehm-gc"
-    ;;
-  powerpc-*-aix*)
-    # copied from rs6000-*-* entry
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  rs6000-*-aix*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  ft32-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  *-*-lynxos*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-esac
-
-# Disable the go frontend on systems where it is known to not work. Please keep
-# this in sync with contrib/config-list.mk.
-case "${target}" in
-*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
-    unsupported_languages="$unsupported_languages go"
-    ;;
-esac
-
 # Disable libgo for some systems where it is known to not work.
 # For testing, you can easily override this with --enable-libgo.
 if test x$enable_libgo = x; then
@@ -6497,30 +6286,6 @@
   fi
 done

-# Check for Boehm's garbage collector
-# Check whether --enable-objc-gc was given.
-if test "${enable_objc_gc+set}" = set; then :
-  enableval=$enable_objc_gc; case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
-  *,objc,*:*:yes:*target-boehm-gc*)
-    as_fn_error "Boehm's garbage collector was requested yet not supported in this configuration" "$LINENO" 5
-    ;;
-esac
-fi
-
-
-# Make sure we only build Boehm's garbage collector if required.
-case ,${enable_languages},:${enable_objc_gc} in
-  *,objc,*:yes)
-    # Keep target-boehm-gc if requested for Objective-C.
-    ;;
-  *)
-    # Otherwise remove target-boehm-gc depending on target-libjava.
-    if echo " ${noconfigdirs} " | grep "target-libjava" >/dev/null 2>&1; then
-      noconfigdirs="$noconfigdirs target-boehm-gc"
-    fi
-    ;;
-esac
-
 # Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
 case ,${enable_languages}, in
   *,c++,*)
@@ -6605,15 +6370,6 @@
   fi
 done

-# Exclude target-zlib if target-libjava isn't built.
-case ${target_configdirs} in
-*target-libjava*)
-  ;;
-*)
-  target_configdirs="`echo ${target_configdirs} | sed -e 's/target-zlib//'`"
-  ;;
-esac
-
 # libiberty-linker-plugin is special: it doesn't have its own source directory,
 # so we have to add it after the preceding checks.
 if test x"$extra_linker_plugin_flags$extra_linker_plugin_configure_flags" != x
Index: Makefile.def
===================================================================
--- Makefile.def	(revision 239988)
+++ Makefile.def	(working copy)
@@ -165,8 +165,6 @@
 target_modules = { module= winsup; };
 target_modules = { module= libgloss; no_check=true; };
 target_modules = { module= libffi; no_install=true; };
-target_modules = { module= libjava; raw_cxx=true;
-                   extra_configure_flags="$(EXTRA_CONFIGARGS_LIBJAVA)"; };
 target_modules = { module= zlib; };
 target_modules = { module= boehm-gc; };
 target_modules = { module= rda; };
@@ -534,7 +532,6 @@
 // Target modules.  These can also have dependencies on the language
 // environment (e.g. on libstdc++).  By default target modules depend
 // on libgcc and newlib/libgloss.
-lang_env_dependencies = { module=libjava; cxx=true; };
 lang_env_dependencies = { module=libitm; cxx=true; };
 lang_env_dependencies = { module=libffi; cxx=true; };
 lang_env_dependencies = { module=libcilkrts; cxx=true; };
@@ -555,13 +552,6 @@
 dependencies = { module=all-target-libgo; on=all-target-libbacktrace; };
 dependencies = { module=all-target-libgo; on=all-target-libffi; };
 dependencies = { module=all-target-libgo; on=all-target-libatomic; };
-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-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-libffi; };
 dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; };
 dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
 dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; };
@@ -585,7 +575,6 @@
 dependencies = { module=install-target-libcilkrts; on=install-target-libgcc; };
 dependencies = { module=install-target-liboffloadmic; on=install-target-libstdc++-v3; };
 dependencies = { module=install-target-liboffloadmic; on=install-target-libgcc; };
-dependencies = { module=install-target-libjava; on=install-target-libgcc; };
 dependencies = { module=install-target-libitm; on=install-target-libgcc; };
 dependencies = { module=install-target-libobjc; on=install-target-libgcc; };
 dependencies = { module=install-target-libstdc++-v3; on=install-target-libgcc; };
@@ -610,8 +599,6 @@
 languages = { language=fortran;	gcc-check-target=check-fortran;
 				lib-check-target=check-target-libquadmath;
 				lib-check-target=check-target-libgfortran; };
-languages = { language=java;	gcc-check-target=check-java;
-				lib-check-target=check-target-libjava; };
 languages = { language=ada;	gcc-check-target=check-ada;
 				lib-check-target=check-target-libada; };
 languages = { language=objc;	gcc-check-target=check-objc;
Index: Makefile.tpl
===================================================================
--- Makefile.tpl	(revision 239988)
+++ Makefile.tpl	(working copy)
@@ -325,8 +325,6 @@
 HOST_LIBELFLIBS = @libelflibs@
 HOST_LIBELFINC = @libelfinc@

-EXTRA_CONFIGARGS_LIBJAVA = @EXTRA_CONFIGARGS_LIBJAVA@
-
 # ----------------------------------------------
 # Programs producing files for the BUILD machine
 # ----------------------------------------------

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-05 15:29 [PATCH] Delete GCJ Andrew Haley
@ 2016-09-05 15:31 ` Matthias Klose
  2016-09-05 15:32   ` Andrew Haley
  2016-09-05 18:38   ` Eric Gallager
  2016-09-05 15:55 ` Matthew Fortune
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 86+ messages in thread
From: Matthias Klose @ 2016-09-05 15:31 UTC (permalink / raw)
  To: Andrew Haley, GCC Patches, GCJ-patches

On 05.09.2016 17:13, Andrew Haley wrote:
> As discussed.  I think I should ask a Global reviewer to approve this
> one.  For obvious reasons I haven't included the diffs to the deleted
> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
> if anyone would like to try it.
> 
> Andrew.
> 
> 
> 2016-09-05  Andrew Haley  <aph@redhat.com>
> 
> 	* Makefile.def: Remove libjava.
> 	* Makefile.tpl: Likewise.
> 	* Makefile.in: Regenerate.
> 	* configure.ac: Likewise.
> 	* configure: Likewise.
> 	* gcc/java: Remove.
> 	* libjava: Likewise.

Please consider removing boehm-gc as well.  The only other user is
--enable-objc-gc, which better should use an external boehm-gc.

Matthias

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-05 15:31 ` Matthias Klose
@ 2016-09-05 15:32   ` Andrew Haley
  2016-09-05 18:38   ` Eric Gallager
  1 sibling, 0 replies; 86+ messages in thread
From: Andrew Haley @ 2016-09-05 15:32 UTC (permalink / raw)
  To: Matthias Klose, GCC Patches, GCJ-patches

On 05/09/16 16:29, Matthias Klose wrote:
> Please consider removing boehm-gc as well.  The only other user is
> --enable-objc-gc, which better should use an external boehm-gc.

I can do that, but I do not want to do so with this patch.

Andrew.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* RE: [PATCH] Delete GCJ
  2016-09-05 15:29 [PATCH] Delete GCJ Andrew Haley
  2016-09-05 15:31 ` Matthias Klose
@ 2016-09-05 15:55 ` Matthew Fortune
       [not found] ` <FB08E20B-5ED1-45BA-BFA0-11E7807840D2@gmail.com>
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 86+ messages in thread
From: Matthew Fortune @ 2016-09-05 15:55 UTC (permalink / raw)
  To: Andrew Haley, GCC Patches, GCJ-patches

Andrew Haley <aph@redhat.com> writes:
> As discussed.  I think I should ask a Global reviewer to approve this
> one.  For obvious reasons I haven't included the diffs to the deleted
> gcc/java and libjava directories.  The whole tree, post GCJ-deletion, is
> at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
> if anyone would like to try it.

I hadn't realised libjava was earmarked for removal (and I have no
objection) but given I have an outstanding bug in libjava I wonder how
we will deal with bug fix backports when we can't commit to trunk first?

Matthew

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
       [not found] ` <FB08E20B-5ED1-45BA-BFA0-11E7807840D2@gmail.com>
@ 2016-09-05 16:26   ` Andrew Haley
  2016-09-06  9:08     ` Richard Biener
  0 siblings, 1 reply; 86+ messages in thread
From: Andrew Haley @ 2016-09-05 16:26 UTC (permalink / raw)
  To: Richard Biener, GCC Patches, GCJ-patches

On 05/09/16 17:15, Richard Biener wrote:
> On September 5, 2016 5:13:06 PM GMT+02:00, Andrew Haley <aph@redhat.com> wrote:
>> As discussed.  I think I should ask a Global reviewer to approve this
>> one.  For obvious reasons I haven't included the diffs to the deleted
>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>> if anyone would like to try it.
> 
> Isn't there also java specific C++ frontend parts?

There certainly are, but deleting them without breaking anything else
is going to be rather delicate.  I'm trying to do this one step at a
time, rather cautiously.

Andrew.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-05 15:29 [PATCH] Delete GCJ Andrew Haley
                   ` (2 preceding siblings ...)
       [not found] ` <FB08E20B-5ED1-45BA-BFA0-11E7807840D2@gmail.com>
@ 2016-09-05 16:35 ` Gerald Pfeifer
  2016-09-05 18:58   ` Eric Gallager
  2016-09-30 16:11   ` Andrew Haley
  2016-09-10 12:22 ` NightStrike
  2016-10-03 23:12 ` Matthias Klose
  5 siblings, 2 replies; 86+ messages in thread
From: Gerald Pfeifer @ 2016-09-05 16:35 UTC (permalink / raw)
  To: Andrew Haley; +Cc: GCC Patches, GCJ-patches

On Mon, 5 Sep 2016, Andrew Haley wrote:
> As discussed.  I think I should ask a Global reviewer to approve this
> one.  For obvious reasons I haven't included the diffs to the deleted
> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
> if anyone would like to try it.

And here is the patch for the web pages.

Note I did not include all the removed java/* contents.  Is there
anything particular you'd like to retain there?

Gerald

Index: index.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/index.html,v
retrieving revision 1.1026
diff -u -r1.1026 index.html
--- index.html	25 Aug 2016 10:55:41 -0000	1.1026
+++ index.html	5 Sep 2016 16:22:07 -0000
@@ -15,8 +15,7 @@
 <a href="c99status.html">C</a>,
 <a href="projects/cxx-status.html">C++</a>,
 Objective-C, <a href="fortran/">Fortran</a>,
-<a href="java/">Java</a>, Ada, and Go, as well as libraries for these
-languages (libstdc++, libgcj,...).
+Ada, and Go, as well as libraries for these languages (libstdc++,...).
 GCC was originally written as the compiler for the <a
 href="http://www.gnu.org/gnu/thegnuproject.html">GNU operating system</a>.
 The GNU system was developed to be 100% free software, free in the sense
Index: style.mhtml
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/style.mhtml,v
retrieving revision 1.131
diff -u -r1.131 style.mhtml
--- style.mhtml	23 Aug 2016 06:49:17 -0000	1.131
+++ style.mhtml	5 Sep 2016 16:22:08 -0000
@@ -10,15 +10,6 @@
   <unset-var XHTML>
 >
 
-;;; For the "java/" pages, we want the navigation bar.
-
-<if <match <get-var env::PREPROCESS_FILE> "java/[^/]*.html">
- <group 
-  <set-var navigation>
-  <set-var BACKPATH="../">
- >
->
-
 ;;; Note that the <?xml...> line really needs to start in the first column.
 
 <if <var-exists XHTML>
@@ -105,26 +96,6 @@
   <td valign="top" style="padding-left: 36px;">            <!-- nav frame -->
   <table border="0" cellspacing="0" cellpadding="2" width="10em">
 
-  <if <match <get-var env::PREPROCESS_FILE> "java/[^/]*.html">
-   <group
-    <tr><td><table class="navitem" cellspacing="0" width="100%">
-    <tr><td align="center" valign="middle">
-    <img src="gcj.jpg" alt="GCJ" width="136" height="98" />
-    </td></tr>
-    <tr><td>
-    <p>
-    <a href="index.html">GCJ Home</a><br />
-    <a href="../">GCC Home</a><br />
-    <a href="faq.html">FAQ</a><br />
-    <a href="docs.html">Documentation</a><br />
-    <a href="contrib.html">Contributing</a><br />
-    <a href="done.html">Done with GCJ</a><br />
-    </p>
-    </td></tr>
-    </table></td></tr>
-   >
-  >
-
   <tr><td><table class="navitem" cellspacing="0" width="100%">
   <tr><td>About GCC</td></tr>
   <tr><td>

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-05 15:31 ` Matthias Klose
  2016-09-05 15:32   ` Andrew Haley
@ 2016-09-05 18:38   ` Eric Gallager
  1 sibling, 0 replies; 86+ messages in thread
From: Eric Gallager @ 2016-09-05 18:38 UTC (permalink / raw)
  To: Matthias Klose; +Cc: Andrew Haley, GCC Patches, GCJ-patches

On 9/5/16, Matthias Klose <doko@ubuntu.com> wrote:
> On 05.09.2016 17:13, Andrew Haley wrote:
>> As discussed.  I think I should ask a Global reviewer to approve this
>> one.  For obvious reasons I haven't included the diffs to the deleted
>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>> if anyone would like to try it.
>>
>> Andrew.
>>
>>
>> 2016-09-05  Andrew Haley  <aph@redhat.com>
>>
>> 	* Makefile.def: Remove libjava.
>> 	* Makefile.tpl: Likewise.
>> 	* Makefile.in: Regenerate.
>> 	* configure.ac: Likewise.
>> 	* configure: Likewise.
>> 	* gcc/java: Remove.
>> 	* libjava: Likewise.
>
> Please consider removing boehm-gc as well.  The only other user is
> --enable-objc-gc, which better should use an external boehm-gc.
>
> Matthias
>
>


How about a compromise to have it be downloaded with the
contrib/download_prerequisites script, instead of entirely keeping it,
or entirely deleting it?

Eric

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-05 16:35 ` Gerald Pfeifer
@ 2016-09-05 18:58   ` Eric Gallager
  2016-09-30 16:11   ` Andrew Haley
  1 sibling, 0 replies; 86+ messages in thread
From: Eric Gallager @ 2016-09-05 18:58 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Andrew Haley, GCC Patches, GCJ-patches

On 9/5/16, Gerald Pfeifer <gerald@pfeifer.com> wrote:
> On Mon, 5 Sep 2016, Andrew Haley wrote:
>> As discussed.  I think I should ask a Global reviewer to approve this
>> one.  For obvious reasons I haven't included the diffs to the deleted
>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>> if anyone would like to try it.
>
> And here is the patch for the web pages.
>
> Note I did not include all the removed java/* contents.  Is there
> anything particular you'd like to retain there?
>
> Gerald
>
> Index: index.html
> ===================================================================
> RCS file: /cvs/gcc/wwwdocs/htdocs/index.html,v
> retrieving revision 1.1026
> diff -u -r1.1026 index.html
> --- index.html	25 Aug 2016 10:55:41 -0000	1.1026
> +++ index.html	5 Sep 2016 16:22:07 -0000
> @@ -15,8 +15,7 @@
>  <a href="c99status.html">C</a>,
>  <a href="projects/cxx-status.html">C++</a>,
>  Objective-C, <a href="fortran/">Fortran</a>,
> -<a href="java/">Java</a>, Ada, and Go, as well as libraries for these
> -languages (libstdc++, libgcj,...).
> +Ada, and Go, as well as libraries for these languages (libstdc++,...).
>  GCC was originally written as the compiler for the <a
>  href="http://www.gnu.org/gnu/thegnuproject.html">GNU operating system</a>.
>  The GNU system was developed to be 100% free software, free in the sense
> Index: style.mhtml
> ===================================================================
> RCS file: /cvs/gcc/wwwdocs/htdocs/style.mhtml,v
> retrieving revision 1.131
> diff -u -r1.131 style.mhtml
> --- style.mhtml	23 Aug 2016 06:49:17 -0000	1.131
> +++ style.mhtml	5 Sep 2016 16:22:08 -0000
> @@ -10,15 +10,6 @@
>    <unset-var XHTML>
>  >
>
> -;;; For the "java/" pages, we want the navigation bar.
> -
> -<if <match <get-var env::PREPROCESS_FILE> "java/[^/]*.html">
> - <group
> -  <set-var navigation>
> -  <set-var BACKPATH="../">
> - >
> ->
> -
>  ;;; Note that the <?xml...> line really needs to start in the first
> column.
>
>  <if <var-exists XHTML>
> @@ -105,26 +96,6 @@
>    <td valign="top" style="padding-left: 36px;">            <!-- nav frame
> -->
>    <table border="0" cellspacing="0" cellpadding="2" width="10em">
>
> -  <if <match <get-var env::PREPROCESS_FILE> "java/[^/]*.html">
> -   <group
> -    <tr><td><table class="navitem" cellspacing="0" width="100%">
> -    <tr><td align="center" valign="middle">
> -    <img src="gcj.jpg" alt="GCJ" width="136" height="98" />
> -    </td></tr>
> -    <tr><td>
> -    <p>
> -    <a href="index.html">GCJ Home</a><br />
> -    <a href="../">GCC Home</a><br />
> -    <a href="faq.html">FAQ</a><br />
> -    <a href="docs.html">Documentation</a><br />
> -    <a href="contrib.html">Contributing</a><br />
> -    <a href="done.html">Done with GCJ</a><br />
> -    </p>
> -    </td></tr>
> -    </table></td></tr>
> -   >
> -  >
> -
>    <tr><td><table class="navitem" cellspacing="0" width="100%">
>    <tr><td>About GCC</td></tr>
>    <tr><td>
>


I'd think something should go under the "Caveats" section of
https://gcc.gnu.org/gcc-7/changes.html
too, so people aren't surprised.
(There was never a deprecation notice in the equivalent page for GCC
6, by the way)

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-05 16:26   ` Andrew Haley
@ 2016-09-06  9:08     ` Richard Biener
  2016-09-06  9:11       ` Jakub Jelinek
  2016-09-09 11:47       ` Ian Lance Taylor
  0 siblings, 2 replies; 86+ messages in thread
From: Richard Biener @ 2016-09-06  9:08 UTC (permalink / raw)
  To: Andrew Haley; +Cc: GCC Patches, GCJ-patches

On Mon, Sep 5, 2016 at 6:17 PM, Andrew Haley <aph@redhat.com> wrote:
> On 05/09/16 17:15, Richard Biener wrote:
>> On September 5, 2016 5:13:06 PM GMT+02:00, Andrew Haley <aph@redhat.com> wrote:
>>> As discussed.  I think I should ask a Global reviewer to approve this
>>> one.  For obvious reasons I haven't included the diffs to the deleted
>>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>>> if anyone would like to try it.
>>
>> Isn't there also java specific C++ frontend parts?
>
> There certainly are, but deleting them without breaking anything else
> is going to be rather delicate.  I'm trying to do this one step at a
> time, rather cautiously.

Ok, that sounds reasonable.

You have my approval for this first part then.  Please wait until after the
GNU Cauldron to allow other global reviewers to object.

Thanks,
Richard.

> Andrew.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-06  9:08     ` Richard Biener
@ 2016-09-06  9:11       ` Jakub Jelinek
  2016-09-06 21:24         ` Jeff Law
  2016-09-09 11:47       ` Ian Lance Taylor
  1 sibling, 1 reply; 86+ messages in thread
From: Jakub Jelinek @ 2016-09-06  9:11 UTC (permalink / raw)
  To: Richard Biener; +Cc: Andrew Haley, GCC Patches, GCJ-patches

On Tue, Sep 06, 2016 at 11:06:36AM +0200, Richard Biener wrote:
> On Mon, Sep 5, 2016 at 6:17 PM, Andrew Haley <aph@redhat.com> wrote:
> > On 05/09/16 17:15, Richard Biener wrote:
> >> On September 5, 2016 5:13:06 PM GMT+02:00, Andrew Haley <aph@redhat.com> wrote:
> >>> As discussed.  I think I should ask a Global reviewer to approve this
> >>> one.  For obvious reasons I haven't included the diffs to the deleted
> >>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
> >>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
> >>> if anyone would like to try it.
> >>
> >> Isn't there also java specific C++ frontend parts?
> >
> > There certainly are, but deleting them without breaking anything else
> > is going to be rather delicate.  I'm trying to do this one step at a
> > time, rather cautiously.
> 
> Ok, that sounds reasonable.
> 
> You have my approval for this first part then.  Please wait until after the
> GNU Cauldron to allow other global reviewers to object.

No objection from me.

	Jakub

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-06  9:11       ` Jakub Jelinek
@ 2016-09-06 21:24         ` Jeff Law
  2016-09-07 11:52           ` Richard Earnshaw (lists)
  0 siblings, 1 reply; 86+ messages in thread
From: Jeff Law @ 2016-09-06 21:24 UTC (permalink / raw)
  To: Jakub Jelinek, Richard Biener; +Cc: Andrew Haley, GCC Patches, GCJ-patches

On 09/06/2016 03:08 AM, Jakub Jelinek wrote:
> On Tue, Sep 06, 2016 at 11:06:36AM +0200, Richard Biener wrote:
>> On Mon, Sep 5, 2016 at 6:17 PM, Andrew Haley <aph@redhat.com> wrote:
>>> On 05/09/16 17:15, Richard Biener wrote:
>>>> On September 5, 2016 5:13:06 PM GMT+02:00, Andrew Haley <aph@redhat.com> wrote:
>>>>> As discussed.  I think I should ask a Global reviewer to approve this
>>>>> one.  For obvious reasons I haven't included the diffs to the deleted
>>>>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>>>>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>>>>> if anyone would like to try it.
>>>>
>>>> Isn't there also java specific C++ frontend parts?
>>>
>>> There certainly are, but deleting them without breaking anything else
>>> is going to be rather delicate.  I'm trying to do this one step at a
>>> time, rather cautiously.
>>
>> Ok, that sounds reasonable.
>>
>> You have my approval for this first part then.  Please wait until after the
>> GNU Cauldron to allow other global reviewers to object.
>
> No objection from me.
No objection from me either (I'm guessing that's not a surprise).

jeff

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-06 21:24         ` Jeff Law
@ 2016-09-07 11:52           ` Richard Earnshaw (lists)
  0 siblings, 0 replies; 86+ messages in thread
From: Richard Earnshaw (lists) @ 2016-09-07 11:52 UTC (permalink / raw)
  To: Jeff Law, Jakub Jelinek, Richard Biener
  Cc: Andrew Haley, GCC Patches, GCJ-patches

On 06/09/16 22:17, Jeff Law wrote:
> On 09/06/2016 03:08 AM, Jakub Jelinek wrote:
>> On Tue, Sep 06, 2016 at 11:06:36AM +0200, Richard Biener wrote:
>>> On Mon, Sep 5, 2016 at 6:17 PM, Andrew Haley <aph@redhat.com> wrote:
>>>> On 05/09/16 17:15, Richard Biener wrote:
>>>>> On September 5, 2016 5:13:06 PM GMT+02:00, Andrew Haley
>>>>> <aph@redhat.com> wrote:
>>>>>> As discussed.  I think I should ask a Global reviewer to approve this
>>>>>> one.  For obvious reasons I haven't included the diffs to the deleted
>>>>>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>>>>>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>>>>>> if anyone would like to try it.
>>>>>
>>>>> Isn't there also java specific C++ frontend parts?
>>>>
>>>> There certainly are, but deleting them without breaking anything else
>>>> is going to be rather delicate.  I'm trying to do this one step at a
>>>> time, rather cautiously.
>>>
>>> Ok, that sounds reasonable.
>>>
>>> You have my approval for this first part then.  Please wait until
>>> after the
>>> GNU Cauldron to allow other global reviewers to object.
>>
>> No objection from me.
> No objection from me either (I'm guessing that's not a surprise).
> 

Nor from me.

R.

> jeff

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-06  9:08     ` Richard Biener
  2016-09-06  9:11       ` Jakub Jelinek
@ 2016-09-09 11:47       ` Ian Lance Taylor
  1 sibling, 0 replies; 86+ messages in thread
From: Ian Lance Taylor @ 2016-09-09 11:47 UTC (permalink / raw)
  To: Richard Biener; +Cc: Andrew Haley, GCC Patches, GCJ-patches

On Tue, Sep 6, 2016 at 2:06 AM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Mon, Sep 5, 2016 at 6:17 PM, Andrew Haley <aph@redhat.com> wrote:
>> On 05/09/16 17:15, Richard Biener wrote:
>>> On September 5, 2016 5:13:06 PM GMT+02:00, Andrew Haley <aph@redhat.com> wrote:
>>>> As discussed.  I think I should ask a Global reviewer to approve this
>>>> one.  For obvious reasons I haven't included the diffs to the deleted
>>>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>>>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>>>> if anyone would like to try it.
>>>
>>> Isn't there also java specific C++ frontend parts?
>>
>> There certainly are, but deleting them without breaking anything else
>> is going to be rather delicate.  I'm trying to do this one step at a
>> time, rather cautiously.
>
> Ok, that sounds reasonable.
>
> You have my approval for this first part then.  Please wait until after the
> GNU Cauldron to allow other global reviewers to object.

I am fine with this.  It seems like the right move, alas.

Ian

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-05 15:29 [PATCH] Delete GCJ Andrew Haley
                   ` (3 preceding siblings ...)
  2016-09-05 16:35 ` Gerald Pfeifer
@ 2016-09-10 12:22 ` NightStrike
  2016-09-11 13:03   ` Andrew Haley
  2016-10-03 23:12 ` Matthias Klose
  5 siblings, 1 reply; 86+ messages in thread
From: NightStrike @ 2016-09-10 12:22 UTC (permalink / raw)
  To: Andrew Haley; +Cc: GCC Patches, GCJ-patches

On Mon, Sep 5, 2016 at 11:13 AM, Andrew Haley <aph@redhat.com> wrote:
> As discussed.  I think I should ask a Global reviewer to approve this
> one.  For obvious reasons I haven't included the diffs to the deleted
> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
> if anyone would like to try it.
>
> Andrew.

For what little (to nothing) it's worth, I still use gcj, and I like
the ease of adding small bits of java to a project without involving
additional compilers.  It optimizes extremely well, is easy to use,
and adds to the completeness of the GNU Compiler *Collection*.

Could we at least reach out and see if there's someone else who could
be the maintainer?  I noticed gcj patches recently, so there's still
interest.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-10 12:22 ` NightStrike
@ 2016-09-11 13:03   ` Andrew Haley
  2016-09-30 10:42     ` Marek Polacek
  0 siblings, 1 reply; 86+ messages in thread
From: Andrew Haley @ 2016-09-11 13:03 UTC (permalink / raw)
  To: gcc-patches

On 10/09/16 12:59, NightStrike wrote:
> Could we at least reach out and see if there's someone else who could
> be the maintainer?  I noticed gcj patches recently, so there's still
> interest.

1.  It's too late.  We have been discussing this for a long time, and
we're now doing what we decided.

2.  Maintaining GCJ requires a lot of knowledge of both Java and GCC
internals.  There are very few people in the world with that
knowledge, and I'm fairly sure I know them by name.

3.  The Classpath library is very old and is unmaintained.  The only
practical way to update GCJ would be to use the OpenJDK class
libraries instead, but updating GCJ to use those class libraries is a
very substantial job.

So, I cannot prevent anyone from coming along to maintain GCJ, and
neither would I want to.  However, such a proposal would have to be
credible.  It is a multi-engineer-year commitment, and not just any
ordinary engineers.

Andrew.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-11 13:03   ` Andrew Haley
@ 2016-09-30 10:42     ` Marek Polacek
  2016-09-30 13:11       ` Andrew Haley
  0 siblings, 1 reply; 86+ messages in thread
From: Marek Polacek @ 2016-09-30 10:42 UTC (permalink / raw)
  To: Andrew Haley; +Cc: gcc-patches

On Sun, Sep 11, 2016 at 01:08:56PM +0100, Andrew Haley wrote:
> On 10/09/16 12:59, NightStrike wrote:
> > Could we at least reach out and see if there's someone else who could
> > be the maintainer?  I noticed gcj patches recently, so there's still
> > interest.
> 
> 1.  It's too late.  We have been discussing this for a long time, and
> we're now doing what we decided.
> 
> 2.  Maintaining GCJ requires a lot of knowledge of both Java and GCC
> internals.  There are very few people in the world with that
> knowledge, and I'm fairly sure I know them by name.
> 
> 3.  The Classpath library is very old and is unmaintained.  The only
> practical way to update GCJ would be to use the OpenJDK class
> libraries instead, but updating GCJ to use those class libraries is a
> very substantial job.
> 
> So, I cannot prevent anyone from coming along to maintain GCJ, and
> neither would I want to.  However, such a proposal would have to be
> credible.  It is a multi-engineer-year commitment, and not just any
> ordinary engineers.

Can we move forward with this patch, then?

	Marek

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-30 10:42     ` Marek Polacek
@ 2016-09-30 13:11       ` Andrew Haley
  2016-09-30 19:08         ` [PATCH] Fix bootstrap with --enable-languages=all,go Jakub Jelinek
  2016-10-02 13:27         ` [PATCH] Delete GCJ Andreas Schwab
  0 siblings, 2 replies; 86+ messages in thread
From: Andrew Haley @ 2016-09-30 13:11 UTC (permalink / raw)
  To: Marek Polacek; +Cc: gcc-patches

On 30/09/16 11:27, Marek Polacek wrote:
> Can we move forward with this patch, then?

I've been travelling for several weeks.  However, I'm back at my desk
now, so I can move this forward.  I have all the approvals and
everybody has had time to respond.  However, I'll need to pull some
more recent changes into my tree and merge again.

Andrew.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-05 16:35 ` Gerald Pfeifer
  2016-09-05 18:58   ` Eric Gallager
@ 2016-09-30 16:11   ` Andrew Haley
  2017-01-22 18:00     ` Gerald Pfeifer
  2017-01-22 18:41     ` Gerald Pfeifer
  1 sibling, 2 replies; 86+ messages in thread
From: Andrew Haley @ 2016-09-30 16:11 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: GCC Patches, GCJ-patches

On 05/09/16 17:25, Gerald Pfeifer wrote:
> And here is the patch for the web pages.
> 
> Note I did not include all the removed java/* contents.  Is there
> anything particular you'd like to retain there?

No, please delete it all.

Thanks,

Andrew.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-09-30 13:11       ` Andrew Haley
@ 2016-09-30 19:08         ` Jakub Jelinek
  2016-09-30 20:06           ` Eric Gallager
  2016-09-30 23:54           ` Ian Lance Taylor
  2016-10-02 13:27         ` [PATCH] Delete GCJ Andreas Schwab
  1 sibling, 2 replies; 86+ messages in thread
From: Jakub Jelinek @ 2016-09-30 19:08 UTC (permalink / raw)
  To: Andrew Haley, Ian Lance Taylor; +Cc: Marek Polacek, gcc-patches

Hi!

On Fri, Sep 30, 2016 at 01:48:12PM +0100, Andrew Haley wrote:
> On 30/09/16 11:27, Marek Polacek wrote:
> > Can we move forward with this patch, then?
> 
> I've been travelling for several weeks.  However, I'm back at my desk
> now, so I can move this forward.  I have all the approvals and
> everybody has had time to respond.  However, I'll need to pull some
> more recent changes into my tree and merge again.

Unfortunately this broke bootstrap, because libgo needs libffi (at least on
lots of targets) and target libffi is no longer built.

This patch restores what we had before for target-libffi, it can be
incrementally tweaked by individual target maintainers.

I haven't tried to readd the boehm-gc objc support that has also been
disabled, don't know about anybody using that.

Bootstrapped on i686-linux, bootstrap pending on x86_64-linux (both fail to
bootstrap without it), ok for trunk?

2016-09-30  Jakub Jelinek  <jakub@redhat.com>

	* configure.ac: Add target-libffi to target_libraries.
	Readd libgcj target disablings, modified to only target-libffi.
	Readd target addition of go to unsupported languages.
	* configure: Regenerated.

--- configure.ac.jj	2016-09-30 18:40:58.000000000 +0200
+++ configure.ac	2016-09-30 20:10:19.461760861 +0200
@@ -161,6 +161,7 @@ target_libraries="target-libgcc \
 		target-libssp \
 		target-libquadmath \
 		target-libgfortran \
+		target-libffi \
 		target-libobjc \
 		target-libada \
 		target-libgo"
@@ -696,6 +697,101 @@ case "${target}" in
     ;;
 esac
 
+# Disable libffi for some systems.
+case "${target}" in
+  powerpc-*-darwin*)
+    ;;
+  i[[3456789]]86-*-darwin*)
+    ;;
+  x86_64-*-darwin[[912]]*)
+    ;;
+  *-*-darwin*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-netware*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-phoenix*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-rtems*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-tpf*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-uclinux*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-vxworks*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  alpha*-*-*vms*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm*-*-freebsd*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm-wince-pe)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm*-*-symbianelf*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  cris-*-* | crisv32-*-*)
+    case "${target}" in
+      *-*-linux*)
+	;;
+      *) # See PR46792 regarding target-libffi.
+	noconfigdirs="$noconfigdirs target-libffi";;
+    esac
+    ;;
+  hppa*64*-*-hpux*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  hppa*-hp-hpux11*)
+    ;;
+  hppa*-*-hpux*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  ia64*-*-*vms*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  i[[3456789]]86-w64-mingw*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  i[[3456789]]86-*-mingw*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  x86_64-*-mingw*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  mmix-*-*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  powerpc-*-aix*)
+    # copied from rs6000-*-* entry
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  rs6000-*-aix*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  ft32-*-*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-lynxos*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+esac
+
+# Disable the go frontend on systems where it is known to not work. Please keep
+# this in sync with contrib/config-list.mk.
+case "${target}" in
+*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
+    unsupported_languages="$unsupported_languages go"
+    ;;
+esac
+
 # Disable libgo for some systems where it is known to not work.
 # For testing, you can easily override this with --enable-libgo.
 if test x$enable_libgo = x; then
--- configure.jj	2016-09-30 18:40:58.000000000 +0200
+++ configure	2016-09-30 20:11:16.063041690 +0200
@@ -2748,6 +2748,7 @@ target_libraries="target-libgcc \
 		target-libssp \
 		target-libquadmath \
 		target-libgfortran \
+		target-libffi \
 		target-libobjc \
 		target-libada \
 		target-libgo"
@@ -3351,6 +3352,101 @@ case "${target}" in
     ;;
 esac
 
+# Disable libffi for some systems.
+case "${target}" in
+  powerpc-*-darwin*)
+    ;;
+  i[3456789]86-*-darwin*)
+    ;;
+  x86_64-*-darwin[912]*)
+    ;;
+  *-*-darwin*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-netware*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-phoenix*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-rtems*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-tpf*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-uclinux*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-vxworks*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  alpha*-*-*vms*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm*-*-freebsd*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm-wince-pe)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm*-*-symbianelf*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  cris-*-* | crisv32-*-*)
+    case "${target}" in
+      *-*-linux*)
+	;;
+      *) # See PR46792 regarding target-libffi.
+	noconfigdirs="$noconfigdirs target-libffi";;
+    esac
+    ;;
+  hppa*64*-*-hpux*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  hppa*-hp-hpux11*)
+    ;;
+  hppa*-*-hpux*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  ia64*-*-*vms*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  i[3456789]86-w64-mingw*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  i[3456789]86-*-mingw*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  x86_64-*-mingw*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  mmix-*-*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  powerpc-*-aix*)
+    # copied from rs6000-*-* entry
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  rs6000-*-aix*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  ft32-*-*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-lynxos*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+esac
+
+# Disable the go frontend on systems where it is known to not work. Please keep
+# this in sync with contrib/config-list.mk.
+case "${target}" in
+*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
+    unsupported_languages="$unsupported_languages go"
+    ;;
+esac
+
 # Disable libgo for some systems where it is known to not work.
 # For testing, you can easily override this with --enable-libgo.
 if test x$enable_libgo = x; then
@@ -13977,51 +14073,6 @@ $as_echo "pre-installed in $ac_dir" >&6;
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
 $as_echo "host tool" >&6; }
   else
-    # We need a cross tool
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-$as_echo "pre-installed" >&6; }
-  fi
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gcj" >&5
-$as_echo_n "checking where to find the target gcj... " >&6; }
-if test "x${build}" != "x${host}" ; then
-  if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
-    # We already found the complete path
-    ac_dir=`dirname $GCJ_FOR_TARGET`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-$as_echo "pre-installed in $ac_dir" >&6; }
-  else
-    # Canadian cross, just use what we found
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-$as_echo "pre-installed" >&6; }
-  fi
-else
-  ok=yes
-  case " ${configdirs} " in
-    *" gcc "*) ;;
-    *) ok=no ;;
-  esac
-  case ,${enable_languages}, in
-    *,java,*) ;;
-    *) ok=no ;;
-  esac
-  if test $ok = yes; then
-    # An in-tree tool is available and we can use it
-    GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/'
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
-$as_echo "just compiled" >&6; }
-  elif expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
-    # We already found the complete path
-    ac_dir=`dirname $GCJ_FOR_TARGET`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-$as_echo "pre-installed in $ac_dir" >&6; }
-  elif test "x$target" = "x$host"; then
-    # We can use an host tool
-    GCJ_FOR_TARGET='$(GCJ)'
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
-$as_echo "host tool" >&6; }
-  else
     # We need a cross tool
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
 $as_echo "pre-installed" >&6; }


	Jakub

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-09-30 19:08         ` [PATCH] Fix bootstrap with --enable-languages=all,go Jakub Jelinek
@ 2016-09-30 20:06           ` Eric Gallager
  2016-09-30 23:52             ` Rainer Orth
  2016-09-30 23:54           ` Ian Lance Taylor
  1 sibling, 1 reply; 86+ messages in thread
From: Eric Gallager @ 2016-09-30 20:06 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Andrew Haley, Ian Lance Taylor, Marek Polacek, gcc-patches

On 9/30/16, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> On Fri, Sep 30, 2016 at 01:48:12PM +0100, Andrew Haley wrote:
>> On 30/09/16 11:27, Marek Polacek wrote:
>> > Can we move forward with this patch, then?
>>
>> I've been travelling for several weeks.  However, I'm back at my desk
>> now, so I can move this forward.  I have all the approvals and
>> everybody has had time to respond.  However, I'll need to pull some
>> more recent changes into my tree and merge again.
>
> Unfortunately this broke bootstrap, because libgo needs libffi (at least on
> lots of targets) and target libffi is no longer built.
>
> This patch restores what we had before for target-libffi, it can be
> incrementally tweaked by individual target maintainers.
>
> I haven't tried to readd the boehm-gc objc support that has also been
> disabled, don't know about anybody using that.
>


I always configure with --enable-objc-gc. The only reason Apple
deprecated garbage collection for Objective C is because they replaced
it with Automated Reference Counting in clang, which GCC doesn't
support yet. So, until GCC supports Automated Reference Counting,
please keep boehm-gc support for objc.

Thanks,
Eric

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-09-30 20:06           ` Eric Gallager
@ 2016-09-30 23:52             ` Rainer Orth
  2016-10-01  7:58               ` Andrew Haley
  2016-10-04  9:23               ` Jakub Jelinek
  0 siblings, 2 replies; 86+ messages in thread
From: Rainer Orth @ 2016-09-30 23:52 UTC (permalink / raw)
  To: Eric Gallager
  Cc: Jakub Jelinek, Andrew Haley, Ian Lance Taylor, Marek Polacek,
	gcc-patches

[-- Attachment #1: Type: text/plain, Size: 860 bytes --]

Hi Eric,

>> I haven't tried to readd the boehm-gc objc support that has also been
>> disabled, don't know about anybody using that.
>
> I always configure with --enable-objc-gc. The only reason Apple
> deprecated garbage collection for Objective C is because they replaced
> it with Automated Reference Counting in clang, which GCC doesn't
> support yet. So, until GCC supports Automated Reference Counting,
> please keep boehm-gc support for objc.

me too, though mostly to have maximum test coverage (primarily on
Solaris).  As expected, a x86_64-apple-darwin16 bootstrap with
--enable-objc-gc just failed for me.  I'm testing the following patch
(on top of Jakub's).

	Rainer


2016-10-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* configure.ac (target_libraries): Readd target-boehm-gc.
	Restore --enable-objc-gc handling.
	* configure: Regenerate.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: eog.patch --]
[-- Type: text/x-patch, Size: 1246 bytes --]

--- configure.ac.pre-bgc	2016-09-30 23:20:44.000000000 +0200
+++ configure.ac	2016-09-30 23:28:35.952184178 +0200
@@ -161,6 +161,7 @@ target_libraries="target-libgcc \
 		target-libssp \
 		target-libquadmath \
 		target-libgfortran \
+		target-boehm-gc \
 		target-libffi \
 		target-libobjc \
 		target-libada \
@@ -2054,6 +2055,28 @@ for dir in $configdirs $build_configdirs
   fi
 done
 
+# Check for Boehm's garbage collector
+AC_ARG_ENABLE(objc-gc,
+[AS_HELP_STRING([--enable-objc-gc],
+		[enable use of Boehm's garbage collector with the
+		 GNU Objective-C runtime])],
+[case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
+  *,objc,*:*:yes:*target-boehm-gc*)
+    AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration])
+    ;;
+esac])
+
+# Make sure we only build Boehm's garbage collector if required.
+case ,${enable_languages},:${enable_objc_gc} in
+  *,objc,*:yes)
+    # Keep target-boehm-gc if requested for Objective-C.
+    ;;
+  *)
+    # Otherwise remove target-boehm-gc.
+    noconfigdirs="$noconfigdirs target-boehm-gc"
+    ;;
+esac
+
 # Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
 case ,${enable_languages}, in
   *,c++,*)

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-09-30 19:08         ` [PATCH] Fix bootstrap with --enable-languages=all,go Jakub Jelinek
  2016-09-30 20:06           ` Eric Gallager
@ 2016-09-30 23:54           ` Ian Lance Taylor
  1 sibling, 0 replies; 86+ messages in thread
From: Ian Lance Taylor @ 2016-09-30 23:54 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Andrew Haley, Marek Polacek, gcc-patches

Jakub Jelinek <jakub@redhat.com> writes:

> 2016-09-30  Jakub Jelinek  <jakub@redhat.com>
>
> 	* configure.ac: Add target-libffi to target_libraries.
> 	Readd libgcj target disablings, modified to only target-libffi.
> 	Readd target addition of go to unsupported languages.
> 	* configure: Regenerated.

This is OK.  Thanks.

I saw that the discussion was clear that libffi was needed for libgo,
and the patch I saw did not remove the libffi configury.  I don't know
what happened.

Ian

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-09-30 23:52             ` Rainer Orth
@ 2016-10-01  7:58               ` Andrew Haley
  2016-10-03 12:53                 ` Rainer Orth
  2016-10-04  9:23               ` Jakub Jelinek
  1 sibling, 1 reply; 86+ messages in thread
From: Andrew Haley @ 2016-10-01  7:58 UTC (permalink / raw)
  To: Rainer Orth, Eric Gallager
  Cc: Jakub Jelinek, Ian Lance Taylor, Marek Polacek, gcc-patches

On 30/09/16 23:16, Rainer Orth wrote:
> me too, though mostly to have maximum test coverage (primarily on
> Solaris).  As expected, a x86_64-apple-darwin16 bootstrap with
> --enable-objc-gc just failed for me.  I'm testing the following patch
> (on top of Jakub's).
> 
> 	Rainer
> 
> 
> 2016-10-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	* configure.ac (target_libraries): Readd target-boehm-gc.
> 	Restore --enable-objc-gc handling.
> 	* configure: Regenerate.

Thanks everybody.  My apologies.

Andrew.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-30 13:11       ` Andrew Haley
  2016-09-30 19:08         ` [PATCH] Fix bootstrap with --enable-languages=all,go Jakub Jelinek
@ 2016-10-02 13:27         ` Andreas Schwab
  2016-10-02 16:51           ` Andrew Haley
                             ` (3 more replies)
  1 sibling, 4 replies; 86+ messages in thread
From: Andreas Schwab @ 2016-10-02 13:27 UTC (permalink / raw)
  To: Andrew Haley; +Cc: Marek Polacek, gcc-patches

Things we may want to remove:

- references to java in contrib (download_ecj, gcc_update,
  patch_tester.sh, update-copyright.py)
- GCJ, GCJ_FOR_BUILD, GCJ_FOR_TARGET in Makefiles.tpl and configure.ac
- LIBGCJ_SONAME in config/i386/{cygwin.h,mingw32.h}
- references to java in install.texi

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-02 13:27         ` [PATCH] Delete GCJ Andreas Schwab
@ 2016-10-02 16:51           ` Andrew Haley
  2016-10-02 19:59           ` [C++ PATCH] Delete GCJ - C++ part Jakub Jelinek
                             ` (2 subsequent siblings)
  3 siblings, 0 replies; 86+ messages in thread
From: Andrew Haley @ 2016-10-02 16:51 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Marek Polacek, gcc-patches

On 02/10/16 14:27, Andreas Schwab wrote:
> Things we may want to remove:
> 
> - references to java in contrib (download_ecj, gcc_update,
>   patch_tester.sh, update-copyright.py)
> - GCJ, GCJ_FOR_BUILD, GCJ_FOR_TARGET in Makefiles.tpl and configure.ac
> - LIBGCJ_SONAME in config/i386/{cygwin.h,mingw32.h}
> - references to java in install.texi

Yes, that's true.  Thanks for doing the search.

Andrew.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [C++ PATCH] Delete GCJ - C++ part
  2016-10-02 13:27         ` [PATCH] Delete GCJ Andreas Schwab
  2016-10-02 16:51           ` Andrew Haley
@ 2016-10-02 19:59           ` Jakub Jelinek
  2016-10-04 15:20             ` Jason Merrill
  2016-10-05  9:04             ` Andreas Schwab
  2016-10-28 20:57           ` [PATCH] Delete GCJ Eric Botcazou
  2017-01-22 23:06           ` Gerald Pfeifer
  3 siblings, 2 replies; 86+ messages in thread
From: Jakub Jelinek @ 2016-10-02 19:59 UTC (permalink / raw)
  To: Jason Merrill, Andreas Schwab; +Cc: Andrew Haley, Marek Polacek, gcc-patches

On Sun, Oct 02, 2016 at 03:27:09PM +0200, Andreas Schwab wrote:
> Things we may want to remove:
> 
> - references to java in contrib (download_ecj, gcc_update,
>   patch_tester.sh, update-copyright.py)
> - GCJ, GCJ_FOR_BUILD, GCJ_FOR_TARGET in Makefiles.tpl and configure.ac
> - LIBGCJ_SONAME in config/i386/{cygwin.h,mingw32.h}
> - references to java in install.texi

There is another thing, the Java extensions in the C++ FE, which are IMNSHO
no longer needed after GCJ removal.

Here is a C++ patch that removes that part, bootstrapped/regtested on
x86_64-linux and i686-linux, ok for trunk?

2016-10-02  Jakub Jelinek  <jakub@redhat.com>

	* doc/extend.texi (Java Exceptions): Remove.
	(java_interface): Remove.
cp/
	* cp-tree.h (enum cp_tree_index): Remove CPTI_JAVA_*,
	CPTI_LANG_NAME_JAVA and CPTI_JCLASS.
	(java_byte_type_node, java_short_type_node, java_int_type_node,
	java_long_type_node, java_float_type_node, java_double_type_node,
	java_char_type_node, java_boolean_type_node, lang_name_java,
	jclass_node): Remove.
	(enum languages): Remove lang_java.
	(TYPE_FOR_JAVA): Remove.
	(struct lang_type_class): Remove java_interface bit-field.
	(TYPE_JAVA_INTERFACE): Remove.
	(pragma_java_exceptions): Remove.
	(check_java_method, build_java_class_ref): Remove prototypes.
	* name-lookup.c (pushtag_1): Don't set TYPE_FOR_JAVA.
	* decl2.c (acceptable_java_type, check_java_method): Remove.
	(import_export_decl): Remove TYPE_FOR_JAVA handling.
	(build_java_method_aliases): Remove.
	(c_parse_final_cleanups): Don't call build_java_method_aliases.
	(possibly_inlined_p): Don't test pragma_java_exceptions.
	* init.c (build_new_1): Remove TYPE_FOR_JAVA handling.
	(build_java_class_ref): Remove.
	* pt.c (maybe_new_partial_specialization, lookup_template_class_1,
	instantiate_class_template_1): Don't copy TYPE_FOR_JAVA.
	* except.c (eh_type_info): Remove java type handling.
	(decl_is_java_type, choose_personality_routine): Remove.
	(initialize_handler_parm): Don't call choose_personality_routine.
	(expand_start_catch_block): Don't handle java types.
	(build_throw): Likewise.
	* cp-lang.c (cp_eh_personality): Don't handle pragma_java_exceptions.
	* typeck.c (structural_comptypes): Don't compare TYPE_FOR_JAVA.
	* call.c (build_over_call): Don't handle TYPE_JAVA_INTERFACE.
	(java_iface_lookup_fn): Remove.
	(build_java_interface_fn_ref): Remove.
	* tree.c (cxx_attribute_table): Remove java_interface.
	(handle_java_interface_attribute): Remove.
	* lex.c (pragma_java_exceptions): Remove.
	(init_cp_pragma): Don't register GCC java_exceptions pragma.
	(handle_pragma_java_exceptions): Remove.
	(retrofit_lang_decl): Don't handle lang_name_java.
	* method.c (implicitly_declare_fn): Don't handle TYPE_FOR_JAVA.
	* error.c (language_to_string): Don't handle lang_java.
	* decl.c (record_builtin_java_type): Remove.
	(initialize_predefined_identifiers): Remove Java.
	(cxx_init_decl_processing): Remove java_*_type_node.
	(cp_finish_decl): Don't handle TYPE_FOR_JAVA.
	(grokfndecl): Likewise.
	(check_special_function_return_type): Likewise.
	(grokdeclarator): Don't set TYPE_FOR_JAVA.
	(grokparms): Don't handle TYPE_FOR_JAVA.
	(xref_basetypes): Likewise.
	(check_function_type): Likewise.
	(finish_constructor_body): Likewise.
	* mangle.c (write_builtin_type): Don't handle TYPE_FOR_JAVA
	and java_*_type_node.
	(write_bare_function_type): Don't handle TYPE_FOR_JAVA.
	(write_java_integer_type_codes): Remove.
	* class.c (add_method): Don't handle TYPE_FOR_JAVA.
	(add_implicitly_declared_members, determine_key_method,
	finish_struct_1): Likewise.
	(push_lang_context): Don't handle lang_name_java.
testsuite/
	* g++.dg/other/java3.C: Remove.
	* g++.dg/other/java1.C: Remove.
	* g++.dg/other/error12.C: Remove.
	* g++.dg/other/java2.C: Remove.
	* g++.dg/warn/Wnvdtor.C: Remove.
	* g++.dg/lookup/java1.C: Remove.
	* g++.dg/lookup/java2.C: Remove.
	* g++.dg/ext/pr34829.C: Remove.
	* g++.dg/ext/java-3.C: Remove.
	* g++.dg/ext/java-1.C: Remove.
	* g++.dg/ext/java-2.C: Remove.
	* g++.old-deja/g++.oliva/dwarf2.C: Remove.

--- gcc/doc/extend.texi.jj	2016-09-29 22:53:11.000000000 +0200
+++ gcc/doc/extend.texi	2016-10-02 19:27:25.315410894 +0200
@@ -21392,7 +21392,6 @@ Predefined Macros,cpp,The GNU C Preproce
 * Namespace Association:: Strong using-directives for namespace association.
 * Type Traits::         Compiler support for type traits.
 * C++ Concepts::        Improved support for generic programming.
-* Java Exceptions::     Tweaking exception handling to work with Java.
 * Deprecated Features:: Things will disappear from G++.
 * Backwards Compatibility:: Compatibilities with earlier definitions of C++.
 @end menu
@@ -21937,14 +21936,6 @@ Some_Class  B  __attribute__ ((init_prio
 Note that the particular values of @var{priority} do not matter; only their
 relative ordering.
 
-@item java_interface
-@cindex @code{java_interface} type attribute
-
-This type attribute informs C++ that the class is a Java interface.  It may
-only be applied to classes declared within an @code{extern "Java"} block.
-Calls to methods declared in this interface are dispatched using GCJ's
-interface table mechanism, instead of regular virtual table dispatch.
-
 @item warn_unused
 @cindex @code{warn_unused} type attribute
 
@@ -22252,41 +22243,6 @@ A binary type trait: true whenever the t
 @end table
 
 
-@node Java Exceptions
-@section Java Exceptions
-
-The Java language uses a slightly different exception handling model
-from C++.  Normally, GNU C++ automatically detects when you are
-writing C++ code that uses Java exceptions, and handle them
-appropriately.  However, if C++ code only needs to execute destructors
-when Java exceptions are thrown through it, GCC guesses incorrectly.
-Sample problematic code is:
-
-@smallexample
-  struct S @{ ~S(); @};
-  extern void bar();    // @r{is written in Java, and may throw exceptions}
-  void foo()
-  @{
-    S s;
-    bar();
-  @}
-@end smallexample
-
-@noindent
-The usual effect of an incorrect guess is a link failure, complaining of
-a missing routine called @samp{__gxx_personality_v0}.
-
-You can inform the compiler that Java exceptions are to be used in a
-translation unit, irrespective of what it might think, by writing
-@samp{@w{#pragma GCC java_exceptions}} at the head of the file.  This
-@samp{#pragma} must appear before any functions that throw or catch
-exceptions, or run destructors when exceptions are thrown through them.
-
-You cannot mix Java and C++ exceptions in the same translation unit.  It
-is believed to be safe to throw a C++ exception from one file through
-another file compiled for the Java exception model, or vice versa, but
-there may be bugs in this area.
-
 @node Deprecated Features
 @section Deprecated Features
 
--- gcc/cp/cp-tree.h.jj	2016-09-23 19:37:41.000000000 +0200
+++ gcc/cp/cp-tree.h	2016-10-02 19:02:25.132842143 +0200
@@ -201,7 +201,6 @@ operator == (const cp_expr &lhs, tree rh
    1: TYPE_HAS_USER_CONSTRUCTOR.
    2: TYPE_HAS_LATE_RETURN_TYPE (in FUNCTION_TYPE, METHOD_TYPE)
       TYPE_PTRMEMFUNC_FLAG (in RECORD_TYPE)
-   3: TYPE_FOR_JAVA.
    4: TYPE_HAS_NONTRIVIAL_DESTRUCTOR
    5: CLASS_TYPE_P (in RECORD_TYPE and UNION_TYPE)
       ENUM_FIXED_UNDERLYING_TYPE_P (in ENUMERAL_TYPE)
@@ -1083,15 +1082,6 @@ union GTY((desc ("cp_tree_node_structure
 \f
 enum cp_tree_index
 {
-    CPTI_JAVA_BYTE_TYPE,
-    CPTI_JAVA_SHORT_TYPE,
-    CPTI_JAVA_INT_TYPE,
-    CPTI_JAVA_LONG_TYPE,
-    CPTI_JAVA_FLOAT_TYPE,
-    CPTI_JAVA_DOUBLE_TYPE,
-    CPTI_JAVA_CHAR_TYPE,
-    CPTI_JAVA_BOOLEAN_TYPE,
-
     CPTI_WCHAR_DECL,
     CPTI_VTABLE_ENTRY_TYPE,
     CPTI_DELTA_TYPE,
@@ -1129,12 +1119,10 @@ enum cp_tree_index
 
     CPTI_LANG_NAME_C,
     CPTI_LANG_NAME_CPLUSPLUS,
-    CPTI_LANG_NAME_JAVA,
 
     CPTI_EMPTY_EXCEPT_SPEC,
     CPTI_NOEXCEPT_TRUE_SPEC,
     CPTI_NOEXCEPT_FALSE_SPEC,
-    CPTI_JCLASS,
     CPTI_TERMINATE,
     CPTI_CALL_UNEXPECTED,
     CPTI_ATEXIT_FN_PTR_TYPE,
@@ -1154,15 +1142,6 @@ enum cp_tree_index
 
 extern GTY(()) tree cp_global_trees[CPTI_MAX];
 
-#define java_byte_type_node		cp_global_trees[CPTI_JAVA_BYTE_TYPE]
-#define java_short_type_node		cp_global_trees[CPTI_JAVA_SHORT_TYPE]
-#define java_int_type_node		cp_global_trees[CPTI_JAVA_INT_TYPE]
-#define java_long_type_node		cp_global_trees[CPTI_JAVA_LONG_TYPE]
-#define java_float_type_node		cp_global_trees[CPTI_JAVA_FLOAT_TYPE]
-#define java_double_type_node		cp_global_trees[CPTI_JAVA_DOUBLE_TYPE]
-#define java_char_type_node		cp_global_trees[CPTI_JAVA_CHAR_TYPE]
-#define java_boolean_type_node		cp_global_trees[CPTI_JAVA_BOOLEAN_TYPE]
-
 #define wchar_decl_node			cp_global_trees[CPTI_WCHAR_DECL]
 #define vtable_entry_type		cp_global_trees[CPTI_VTABLE_ENTRY_TYPE]
 /* The type used to represent an offset by which to adjust the `this'
@@ -1222,16 +1201,12 @@ extern GTY(()) tree cp_global_trees[CPTI
 #define std_identifier			cp_global_trees[CPTI_STD_IDENTIFIER]
 #define lang_name_c			cp_global_trees[CPTI_LANG_NAME_C]
 #define lang_name_cplusplus		cp_global_trees[CPTI_LANG_NAME_CPLUSPLUS]
-#define lang_name_java			cp_global_trees[CPTI_LANG_NAME_JAVA]
 
 /* Exception specifier used for throw().  */
 #define empty_except_spec		cp_global_trees[CPTI_EMPTY_EXCEPT_SPEC]
 #define noexcept_true_spec		cp_global_trees[CPTI_NOEXCEPT_TRUE_SPEC]
 #define noexcept_false_spec		cp_global_trees[CPTI_NOEXCEPT_FALSE_SPEC]
 
-/* If non-NULL, a POINTER_TYPE equivalent to (java::lang::Class*).  */
-#define jclass_node			cp_global_trees[CPTI_JCLASS]
-
 /* The declaration for `std::terminate'.  */
 #define terminate_node			cp_global_trees[CPTI_TERMINATE]
 
@@ -1549,7 +1524,7 @@ extern bool statement_code_p[MAX_TREE_CO
 
 #define STATEMENT_CODE_P(CODE) statement_code_p[(int) (CODE)]
 
-enum languages { lang_c, lang_cplusplus, lang_java };
+enum languages { lang_c, lang_cplusplus };
 
 /* Macros to make error reporting functions' lives easier.  */
 #define TYPE_LINKAGE_IDENTIFIER(NODE) \
@@ -1599,9 +1574,6 @@ enum languages { lang_c, lang_cplusplus,
 #define OVERLOAD_TYPE_P(T) \
   (CLASS_TYPE_P (T) || TREE_CODE (T) == ENUMERAL_TYPE)
 
-/* True if this a "Java" type, defined in 'extern "Java"'.  */
-#define TYPE_FOR_JAVA(NODE) TYPE_LANG_FLAG_3 (NODE)
-
 /* True if this type is dependent.  This predicate is only valid if
    TYPE_DEPENDENT_P_VALID is true.  */
 #define TYPE_DEPENDENT_P(NODE) TYPE_LANG_FLAG_0 (NODE)
@@ -1715,19 +1687,18 @@ struct GTY(()) lang_type_class {
   unsigned diamond_shaped : 1;
   unsigned repeated_base : 1;
   unsigned being_defined : 1;
-  unsigned java_interface : 1;
   unsigned debug_requested : 1;
   unsigned fields_readonly : 1;
+  unsigned ptrmemfunc_flag : 1;
 
   unsigned use_template : 2;
-  unsigned ptrmemfunc_flag : 1;
   unsigned was_anonymous : 1;
   unsigned lazy_default_ctor : 1;
   unsigned lazy_copy_ctor : 1;
   unsigned lazy_copy_assign : 1;
   unsigned lazy_destructor : 1;
-
   unsigned has_const_copy_ctor : 1;
+
   unsigned has_complex_copy_ctor : 1;
   unsigned has_complex_copy_assign : 1;
   unsigned non_aggregate : 1;
@@ -1735,8 +1706,8 @@ struct GTY(()) lang_type_class {
   unsigned has_list_ctor : 1;
   unsigned non_std_layout : 1;
   unsigned is_literal : 1;
-
   unsigned lazy_move_ctor : 1;
+
   unsigned lazy_move_assign : 1;
   unsigned has_complex_move_ctor : 1;
   unsigned has_complex_move_assign : 1;
@@ -1749,7 +1720,7 @@ struct GTY(()) lang_type_class {
   /* There are some bits left to fill out a 32-bit word.  Keep track
      of this by updating the size of this bitfield whenever you add or
      remove a flag.  */
-  unsigned dummy : 3;
+  unsigned dummy : 4;
 
   tree primary_base;
   vec<tree_pair_s, va_gc> *vcall_indices;
@@ -2011,11 +1982,6 @@ struct GTY(()) lang_type {
 #define CLASSTYPE_ALIGN_UNIT(NODE) \
   (CLASSTYPE_ALIGN (NODE) / BITS_PER_UNIT)
 
-/* True if this a Java interface type, declared with
-   '__attribute__ ((java_interface))'.  */
-#define TYPE_JAVA_INTERFACE(NODE) \
-  (LANG_TYPE_CLASS_CHECK (NODE)->java_interface)
-
 /* A vec<tree> of virtual functions which cannot be inherited by
    derived classes.  When deriving from this type, the derived
    class must provide its own definition for each of these functions.  */
@@ -5542,9 +5508,6 @@ concept_template_p (tree t)
    e.g  "int f(void)".  */
 extern cp_parameter_declarator *no_parameters;
 
-/* True if we saw "#pragma GCC java_exceptions".  */
-extern bool pragma_java_exceptions;
-
 /* in call.c */
 extern bool check_dtor_name			(tree, tree);
 int magic_varargs_p				(tree);
@@ -5844,7 +5807,6 @@ extern tree cxx_maybe_build_cleanup		(tr
 /* in decl2.c */
 extern void note_mangling_alias			(tree, tree);
 extern void generate_mangling_aliases		(void);
-extern bool check_java_method			(tree);
 extern tree build_memfn_type			(tree, tree, cp_cv_quals, cp_ref_qualifier);
 extern tree build_pointer_ptrmemfn_type	(tree);
 extern tree change_return_type			(tree, tree);
@@ -5988,7 +5950,6 @@ extern tree build_vec_delete			(tree, tr
 						 tsubst_flags_t);
 extern tree create_temporary_var		(tree);
 extern void initialize_vtbl_ptrs		(tree);
-extern tree build_java_class_ref		(tree);
 extern tree scalar_constant_value		(tree);
 extern tree decl_really_constant_value		(tree);
 extern int diagnose_uninitialized_cst_or_ref_member (tree, bool, bool);
--- gcc/cp/name-lookup.c.jj	2016-09-23 11:42:40.000000000 +0200
+++ gcc/cp/name-lookup.c	2016-10-02 19:22:27.009077079 +0200
@@ -6054,9 +6054,6 @@ pushtag_1 (tree name, tree type, tag_sco
 	      && b->level_chain->kind == sk_class))
 	in_class = 1;
 
-      if (current_lang_name == lang_name_java)
-	TYPE_FOR_JAVA (type) = 1;
-
       tdef = create_implicit_typedef (name, type);
       DECL_CONTEXT (tdef) = FROB_CONTEXT (context);
       if (scope == ts_within_enclosing_non_class)
--- gcc/cp/decl2.c.jj	2016-09-14 23:49:03.000000000 +0200
+++ gcc/cp/decl2.c	2016-10-02 19:08:41.422219936 +0200
@@ -63,7 +63,6 @@ typedef struct priority_info_s {
 
 static void mark_vtable_entries (tree);
 static bool maybe_emit_vtables (tree);
-static bool acceptable_java_type (tree);
 static tree start_objects (int, int);
 static void finish_objects (int, int, tree);
 static tree start_static_storage_duration_function (unsigned);
@@ -541,80 +540,6 @@ check_member_template (tree tmpl)
     error ("template declaration of %q#D", decl);
 }
 
-/* Return true iff TYPE is a valid Java parameter or return type.  */
-
-static bool
-acceptable_java_type (tree type)
-{
-  if (type == error_mark_node)
-    return false;
-
-  if (VOID_TYPE_P (type) || TYPE_FOR_JAVA (type))
-    return true;
-  if (TYPE_PTR_P (type) || TREE_CODE (type) == REFERENCE_TYPE)
-    {
-      type = TREE_TYPE (type);
-      if (TREE_CODE (type) == RECORD_TYPE)
-	{
-	  tree args;  int i;
-	  if (! TYPE_FOR_JAVA (type))
-	    return false;
-	  if (! CLASSTYPE_TEMPLATE_INFO (type))
-	    return true;
-	  args = CLASSTYPE_TI_ARGS (type);
-	  i = TREE_VEC_LENGTH (args);
-	  while (--i >= 0)
-	    {
-	      type = TREE_VEC_ELT (args, i);
-	      if (TYPE_PTR_P (type))
-		type = TREE_TYPE (type);
-	      if (! TYPE_FOR_JAVA (type))
-		return false;
-	    }
-	  return true;
-	}
-    }
-  return false;
-}
-
-/* For a METHOD in a Java class CTYPE, return true if
-   the parameter and return types are valid Java types.
-   Otherwise, print appropriate error messages, and return false.  */
-
-bool
-check_java_method (tree method)
-{
-  bool jerr = false;
-  tree arg_types = TYPE_ARG_TYPES (TREE_TYPE (method));
-  tree ret_type = TREE_TYPE (TREE_TYPE (method));
-
-  if (!acceptable_java_type (ret_type))
-    {
-      error ("Java method %qD has non-Java return type %qT",
-	     method, ret_type);
-      jerr = true;
-    }
-
-  arg_types = TREE_CHAIN (arg_types);
-  if (DECL_HAS_IN_CHARGE_PARM_P (method))
-    arg_types = TREE_CHAIN (arg_types);
-  if (DECL_HAS_VTT_PARM_P (method))
-    arg_types = TREE_CHAIN (arg_types);
-
-  for (; arg_types != NULL_TREE; arg_types = TREE_CHAIN (arg_types))
-    {
-      tree type = TREE_VALUE (arg_types);
-      if (!acceptable_java_type (type))
-	{
-          if (type != error_mark_node)
-	    error ("Java method %qD has non-Java parameter type %qT",
-		   method, type);
-	  jerr = true;
-	}
-    }
-  return !jerr;
-}
-
 /* Sanity check: report error if this function FUNCTION is not
    really a member of the class (CTYPE) it is supposed to belong to.
    TEMPLATE_PARMS is used to specify the template parameters of a member
@@ -2873,10 +2798,8 @@ import_export_decl (tree decl)
     {
       class_type = DECL_CONTEXT (decl);
       import_export_class (class_type);
-      if (TYPE_FOR_JAVA (class_type))
-	import_p = true;
-      else if (CLASSTYPE_INTERFACE_KNOWN (class_type)
-	       && CLASSTYPE_INTERFACE_ONLY (class_type))
+      if (CLASSTYPE_INTERFACE_KNOWN (class_type)
+	  && CLASSTYPE_INTERFACE_ONLY (class_type))
 	import_p = true;
       else if ((!flag_weak || TARGET_WEAK_NOT_IN_ARCHIVE_TOC)
 	       && !CLASSTYPE_USE_TEMPLATE (class_type)
@@ -4080,42 +4003,6 @@ generate_ctor_and_dtor_functions_for_pri
   return 0;
 }
 
-/* Java requires that we be able to reference a local address for a
-   method, and not be confused by PLT entries.  If supported, create a
-   hidden alias for all such methods.  */
-
-static void
-build_java_method_aliases (void)
-{
-#ifndef HAVE_GAS_HIDDEN
-  return;
-#endif
-
-  struct cgraph_node *node;
-  FOR_EACH_FUNCTION (node)
-    {
-      tree fndecl = node->decl;
-
-      if (DECL_CLASS_SCOPE_P (fndecl)
-	  && TYPE_FOR_JAVA (DECL_CONTEXT (fndecl))
-	  && TARGET_USE_LOCAL_THUNK_ALIAS_P (fndecl))
-	{
-	  /* Mangle the name in a predictable way; we need to reference
-	     this from a java compiled object file.  */
-	  tree oid = DECL_ASSEMBLER_NAME (fndecl);
-	  const char *oname = IDENTIFIER_POINTER (oid);
-	  gcc_assert (oname[0] == '_' && oname[1] == 'Z');
-	  char *nname = ACONCAT (("_ZGA", oname + 2, NULL));
-
-	  tree alias = make_alias_for (fndecl, get_identifier (nname));
-	  TREE_PUBLIC (alias) = 1;
-	  DECL_VISIBILITY (alias) = VISIBILITY_HIDDEN;
-
-	  cgraph_node::create_same_body_alias (alias, fndecl);
-	}
-    }
-}
-
 /* Return C++ property of T, based on given operation OP.  */
 
 static int
@@ -4908,9 +4795,6 @@ c_parse_final_cleanups (void)
      linkage now.  */
   pop_lang_context ();
 
-  /* Generate Java hidden aliases.  */
-  build_java_method_aliases ();
-
   if (flag_vtable_verify)
     {
       vtv_recover_class_info ();
@@ -5066,7 +4950,7 @@ possibly_inlined_p (tree decl)
   gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
   if (DECL_UNINLINABLE (decl))
     return false;
-  if (!optimize || pragma_java_exceptions)
+  if (!optimize)
     return DECL_DECLARED_INLINE_P (decl);
   /* When optimizing, we might inline everything when flatten
      attribute or heuristics inlining for size or autoinlining
--- gcc/cp/init.c.jj	2016-09-27 09:46:10.000000000 +0200
+++ gcc/cp/init.c	2016-10-02 19:19:59.709887386 +0200
@@ -2622,7 +2622,6 @@ build_new_1 (vec<tree, va_gc> **placemen
   tree alloc_fn;
   tree cookie_expr, init_expr;
   int nothrow, check_new;
-  int use_java_new = 0;
   /* If non-NULL, the number of extra bytes to allocate at the
      beginning of the storage allocated for an array-new expression in
      order to store the number of elements.  */
@@ -2866,149 +2865,97 @@ build_new_1 (vec<tree, va_gc> **placemen
   bool member_new_p = false;
 
   /* Allocate the object.  */
-  if (vec_safe_is_empty (*placement) && TYPE_FOR_JAVA (elt_type))
-    {
-      tree class_addr;
-      tree class_decl;
-      static const char alloc_name[] = "_Jv_AllocObject";
+  tree fnname;
+  tree fns;
 
-      if (!MAYBE_CLASS_TYPE_P (elt_type))
-	{
-	  error ("%qT isn%'t a valid Java class type", elt_type);
-	  return error_mark_node;
-	}
+  fnname = ansi_opname (array_p ? VEC_NEW_EXPR : NEW_EXPR);
 
-      class_decl = build_java_class_ref (elt_type);
-      if (class_decl == error_mark_node)
-	return error_mark_node;
-
-      use_java_new = 1;
-      if (!get_global_value_if_present (get_identifier (alloc_name),
-					&alloc_fn))
+  member_new_p = !globally_qualified_p
+		 && CLASS_TYPE_P (elt_type)
+		 && (array_p
+		     ? TYPE_HAS_ARRAY_NEW_OPERATOR (elt_type)
+		     : TYPE_HAS_NEW_OPERATOR (elt_type));
+
+  if (member_new_p)
+    {
+      /* Use a class-specific operator new.  */
+      /* If a cookie is required, add some extra space.  */
+      if (array_p && TYPE_VEC_NEW_USES_COOKIE (elt_type))
+	size = size_binop (PLUS_EXPR, size, cookie_size);
+      else
 	{
-          if (complain & tf_error)
-            error ("call to Java constructor with %qs undefined", alloc_name);
-	  return error_mark_node;
-	}
-      else if (really_overloaded_fn (alloc_fn))
+	  cookie_size = NULL_TREE;
+	  /* No size arithmetic necessary, so the size check is
+	     not needed. */
+	  if (outer_nelts_check != NULL && inner_size == 1)
+	    outer_nelts_check = NULL_TREE;
+	}
+      /* Perform the overflow check.  */
+      tree errval = TYPE_MAX_VALUE (sizetype);
+      if (cxx_dialect >= cxx11 && flag_exceptions)
+	errval = throw_bad_array_new_length ();
+      if (outer_nelts_check != NULL_TREE)
+	size = fold_build3 (COND_EXPR, sizetype, outer_nelts_check,
+			    size, errval);
+      /* Create the argument list.  */
+      vec_safe_insert (*placement, 0, size);
+      /* Do name-lookup to find the appropriate operator.  */
+      fns = lookup_fnfields (elt_type, fnname, /*protect=*/2);
+      if (fns == NULL_TREE)
 	{
-          if (complain & tf_error)
-            error ("%qD should never be overloaded", alloc_fn);
+	  if (complain & tf_error)
+	    error ("no suitable %qD found in class %qT", fnname, elt_type);
 	  return error_mark_node;
 	}
-      alloc_fn = OVL_CURRENT (alloc_fn);
-      if (TREE_CODE (alloc_fn) != FUNCTION_DECL
-	  || TREE_CODE (TREE_TYPE (alloc_fn)) != FUNCTION_TYPE
-	  || !POINTER_TYPE_P (TREE_TYPE (TREE_TYPE (alloc_fn))))
+      if (TREE_CODE (fns) == TREE_LIST)
 	{
 	  if (complain & tf_error)
-	    error ("%qD is not a function returning a pointer", alloc_fn);
+	    {
+	      error ("request for member %qD is ambiguous", fnname);
+	      print_candidates (fns);
+	    }
 	  return error_mark_node;
 	}
-      class_addr = build1 (ADDR_EXPR, jclass_node, class_decl);
-      alloc_call = cp_build_function_call_nary (alloc_fn, complain,
-						class_addr, NULL_TREE);
-    }
-  else if (TYPE_FOR_JAVA (elt_type) && MAYBE_CLASS_TYPE_P (elt_type))
-    {
-      error ("Java class %q#T object allocated using placement new", elt_type);
-      return error_mark_node;
+      tree dummy = build_dummy_object (elt_type);
+      alloc_call = NULL_TREE;
+      if (align_arg)
+	{
+	  vec<tree, va_gc> *align_args
+	    = vec_copy_and_insert (*placement, align_arg, 1);
+	  alloc_call
+	    = build_new_method_call (dummy, fns, &align_args,
+				     /*conversion_path=*/NULL_TREE,
+				     LOOKUP_NORMAL, &alloc_fn, tf_none);
+	  /* If no matching function is found and the allocated object type
+	     has new-extended alignment, the alignment argument is removed
+	     from the argument list, and overload resolution is performed
+	     again.  */
+	  if (alloc_call == error_mark_node)
+	    alloc_call = NULL_TREE;
+	}
+      if (!alloc_call)
+	alloc_call = build_new_method_call (dummy, fns, placement,
+					    /*conversion_path=*/NULL_TREE,
+					    LOOKUP_NORMAL,
+					    &alloc_fn, complain);
     }
   else
     {
-      tree fnname;
-      tree fns;
-
-      fnname = ansi_opname (array_p ? VEC_NEW_EXPR : NEW_EXPR);
-
-      member_new_p = !globally_qualified_p
-	  && CLASS_TYPE_P (elt_type)
-	  && (array_p
-	      ? TYPE_HAS_ARRAY_NEW_OPERATOR (elt_type)
-	    : TYPE_HAS_NEW_OPERATOR (elt_type));
-
-      if (member_new_p)
-	{
-	  /* Use a class-specific operator new.  */
-	  /* If a cookie is required, add some extra space.  */
-	  if (array_p && TYPE_VEC_NEW_USES_COOKIE (elt_type))
-	    size = size_binop (PLUS_EXPR, size, cookie_size);
-	  else
-	    {
-	      cookie_size = NULL_TREE;
-	      /* No size arithmetic necessary, so the size check is
-		 not needed. */
-	      if (outer_nelts_check != NULL && inner_size == 1)
-		outer_nelts_check = NULL_TREE;
-	    }
-	  /* Perform the overflow check.  */
-	  tree errval = TYPE_MAX_VALUE (sizetype);
-	  if (cxx_dialect >= cxx11 && flag_exceptions)
-	    errval = throw_bad_array_new_length ();
-	  if (outer_nelts_check != NULL_TREE)
-            size = fold_build3 (COND_EXPR, sizetype, outer_nelts_check,
-                                size, errval);
-	  /* Create the argument list.  */
-	  vec_safe_insert (*placement, 0, size);
-	  /* Do name-lookup to find the appropriate operator.  */
-	  fns = lookup_fnfields (elt_type, fnname, /*protect=*/2);
-	  if (fns == NULL_TREE)
-	    {
-              if (complain & tf_error)
-                error ("no suitable %qD found in class %qT", fnname, elt_type);
-	      return error_mark_node;
-	    }
-	  if (TREE_CODE (fns) == TREE_LIST)
-	    {
-              if (complain & tf_error)
-                {
-                  error ("request for member %qD is ambiguous", fnname);
-                  print_candidates (fns);
-                }
-	      return error_mark_node;
-	    }
-	  tree dummy = build_dummy_object (elt_type);
-	  alloc_call = NULL_TREE;
-	  if (align_arg)
-	    {
-	      vec<tree, va_gc> *align_args
-		= vec_copy_and_insert (*placement, align_arg, 1);
-	      alloc_call
-		= build_new_method_call (dummy, fns, &align_args,
-					 /*conversion_path=*/NULL_TREE,
-					 LOOKUP_NORMAL, &alloc_fn, tf_none);
-	      /* If no matching function is found and the allocated object type
-		 has new-extended alignment, the alignment argument is removed
-		 from the argument list, and overload resolution is performed
-		 again.  */
-	      if (alloc_call == error_mark_node)
-		alloc_call = NULL_TREE;
-	    }
-	  if (!alloc_call)
-	    alloc_call = build_new_method_call (dummy, fns, placement,
-						/*conversion_path=*/NULL_TREE,
-						LOOKUP_NORMAL,
-						&alloc_fn, complain);
+      /* Use a global operator new.  */
+      /* See if a cookie might be required.  */
+      if (!(array_p && TYPE_VEC_NEW_USES_COOKIE (elt_type)))
+	{
+	  cookie_size = NULL_TREE;
+	  /* No size arithmetic necessary, so the size check is
+	     not needed. */
+	  if (outer_nelts_check != NULL && inner_size == 1)
+	    outer_nelts_check = NULL_TREE;
 	}
-      else
-	{
-	  /* Use a global operator new.  */
-	  /* See if a cookie might be required.  */
-	  if (!(array_p && TYPE_VEC_NEW_USES_COOKIE (elt_type)))
-	    {
-	      cookie_size = NULL_TREE;
-	      /* No size arithmetic necessary, so the size check is
-		 not needed. */
-	      if (outer_nelts_check != NULL && inner_size == 1)
-		outer_nelts_check = NULL_TREE;
-	    }
 
-	  alloc_call = build_operator_new_call (fnname, placement,
-						&size, &cookie_size,
-						align_arg,
-						outer_nelts_check,
-						&alloc_fn, complain);
-	}
+      alloc_call = build_operator_new_call (fnname, placement,
+					    &size, &cookie_size,
+					    align_arg, outer_nelts_check,
+					    &alloc_fn, complain);
     }
 
   if (alloc_call == error_mark_node)
@@ -3111,7 +3058,7 @@ build_new_1 (vec<tree, va_gc> **placemen
      So check for a null exception spec on the op new we just called.  */
 
   nothrow = TYPE_NOTHROW_P (TREE_TYPE (alloc_fn));
-  check_new = (flag_check_new || nothrow) && ! use_java_new;
+  check_new = (flag_check_new || nothrow);
 
   if (cookie_size)
     {
@@ -3290,7 +3237,7 @@ build_new_1 (vec<tree, va_gc> **placemen
 	 unambiguous matching deallocation function can be found,
 	 propagating the exception does not cause the object's memory to be
 	 freed.  */
-      if (flag_exceptions && ! use_java_new)
+      if (flag_exceptions)
 	{
 	  enum tree_code dcode = array_p ? VEC_DELETE_EXPR : DELETE_EXPR;
 	  tree cleanup;
@@ -3531,59 +3478,6 @@ build_new (vec<tree, va_gc> **placement,
 
   return rval;
 }
-
-/* Given a Java class, return a decl for the corresponding java.lang.Class.  */
-
-tree
-build_java_class_ref (tree type)
-{
-  tree name = NULL_TREE, class_decl;
-  static tree CL_suffix = NULL_TREE;
-  if (CL_suffix == NULL_TREE)
-    CL_suffix = get_identifier("class$");
-  if (jclass_node == NULL_TREE)
-    {
-      jclass_node = IDENTIFIER_GLOBAL_VALUE (get_identifier ("jclass"));
-      if (jclass_node == NULL_TREE)
-	{
-	  error ("call to Java constructor, while %<jclass%> undefined");
-	  return error_mark_node;
-	}
-      jclass_node = TREE_TYPE (jclass_node);
-    }
-
-  /* Mangle the class$ field.  */
-  {
-    tree field;
-    for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field))
-      if (DECL_NAME (field) == CL_suffix)
-	{
-	  mangle_decl (field);
-	  name = DECL_ASSEMBLER_NAME (field);
-	  break;
-	}
-    if (!field)
-      {
-	error ("can%'t find %<class$%> in %qT", type);
-	return error_mark_node;
-      }
-  }
-
-  class_decl = IDENTIFIER_GLOBAL_VALUE (name);
-  if (class_decl == NULL_TREE)
-    {
-      class_decl = build_decl (input_location,
-			       VAR_DECL, name, TREE_TYPE (jclass_node));
-      TREE_STATIC (class_decl) = 1;
-      DECL_EXTERNAL (class_decl) = 1;
-      TREE_PUBLIC (class_decl) = 1;
-      DECL_ARTIFICIAL (class_decl) = 1;
-      DECL_IGNORED_P (class_decl) = 1;
-      pushdecl_top_level (class_decl);
-      make_decl_rtl (class_decl);
-    }
-  return class_decl;
-}
 \f
 static tree
 build_vec_delete_1 (tree base, tree maxindex, tree type,
--- gcc/cp/pt.c.jj	2016-09-26 12:06:41.000000000 +0200
+++ gcc/cp/pt.c	2016-10-02 19:22:54.431740054 +0200
@@ -893,7 +893,6 @@ maybe_new_partial_specialization (tree t
       // for the newly declared specialization.
       tree t = make_class_type (TREE_CODE (type));
       CLASSTYPE_DECLARED_CLASS (t) = CLASSTYPE_DECLARED_CLASS (type);
-      TYPE_FOR_JAVA (t) = TYPE_FOR_JAVA (type);
       SET_TYPE_TEMPLATE_INFO (t, build_template_info (tmpl, args));
 
       /* We only need a separate type node for storing the definition of this
@@ -8453,7 +8452,6 @@ lookup_template_class_1 (tree d1, tree a
 	  CLASSTYPE_DECLARED_CLASS (t)
 	    = CLASSTYPE_DECLARED_CLASS (template_type);
 	  SET_CLASSTYPE_IMPLICIT_INSTANTIATION (t);
-	  TYPE_FOR_JAVA (t) = TYPE_FOR_JAVA (template_type);
 
 	  /* A local class.  Make sure the decl gets registered properly.  */
 	  if (context == current_function_decl)
@@ -9918,7 +9916,6 @@ instantiate_class_template_1 (tree type)
   TYPE_PACKED (type) = TYPE_PACKED (pattern);
   SET_TYPE_ALIGN (type, TYPE_ALIGN (pattern));
   TYPE_USER_ALIGN (type) = TYPE_USER_ALIGN (pattern);
-  TYPE_FOR_JAVA (type) = TYPE_FOR_JAVA (pattern); /* For libjava's JArray<T> */
   if (ANON_AGGR_TYPE_P (pattern))
     SET_ANON_AGGR_TYPE_P (type);
   if (CLASSTYPE_VISIBILITY_SPECIFIED (pattern))
--- gcc/cp/except.c.jj	2016-09-29 22:53:53.000000000 +0200
+++ gcc/cp/except.c	2016-10-02 19:12:42.476258912 +0200
@@ -35,7 +35,6 @@ static tree prepare_eh_type (tree);
 static tree do_begin_catch (void);
 static int dtor_nothrow (tree);
 static tree do_end_catch (tree);
-static bool decl_is_java_type (tree decl, int err);
 static void initialize_handler_parm (tree, tree);
 static tree do_allocate_exception (tree);
 static tree wrap_cleanups_r (tree *, int *, void *);
@@ -103,17 +102,10 @@ prepare_eh_type (tree type)
 tree
 eh_type_info (tree type)
 {
-  tree exp;
-
   if (type == NULL_TREE || type == error_mark_node)
     return type;
 
-  if (decl_is_java_type (type, 0))
-    exp = build_java_class_ref (TREE_TYPE (type));
-  else
-    exp = get_tinfo_decl (type);
-
-  return exp;
+  return get_tinfo_decl (type);
 }
 
 /* Build the address of a typeinfo decl for use in the runtime
@@ -262,107 +254,6 @@ push_eh_cleanup (tree type)
   finish_decl_cleanup (NULL_TREE, do_end_catch (type));
 }
 
-/* Return nonzero value if DECL is a Java type suitable for catch or
-   throw.  */
-
-static bool
-decl_is_java_type (tree decl, int err)
-{
-  bool r = (TYPE_PTR_P (decl)
-	    && TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE
-	    && TYPE_FOR_JAVA (TREE_TYPE (decl)));
-
-  if (err)
-    {
-      if (TREE_CODE (decl) == REFERENCE_TYPE
-	  && TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE
-	  && TYPE_FOR_JAVA (TREE_TYPE (decl)))
-	{
-	  /* Can't throw a reference.  */
-	  error ("type %qT is disallowed in Java %<throw%> or %<catch%>",
-		 decl);
-	}
-
-      if (r)
-	{
-	  tree jthrow_node
-	    = IDENTIFIER_GLOBAL_VALUE (get_identifier ("jthrowable"));
-
-	  if (jthrow_node == NULL_TREE)
-	    fatal_error
-	      (input_location,
-	       "call to Java %<catch%> or %<throw%> with %<jthrowable%> undefined");
-
-	  jthrow_node = TREE_TYPE (TREE_TYPE (jthrow_node));
-
-	  if (! DERIVED_FROM_P (jthrow_node, TREE_TYPE (decl)))
-	    {
-	      /* Thrown object must be a Throwable.  */
-	      error ("type %qT is not derived from %<java::lang::Throwable%>",
-		     TREE_TYPE (decl));
-	    }
-	}
-    }
-
-  return r;
-}
-
-/* Select the personality routine to be used for exception handling,
-   or issue an error if we need two different ones in the same
-   translation unit.
-   ??? At present DECL_FUNCTION_PERSONALITY is set via
-   LANG_HOOKS_EH_PERSONALITY.  Should it be done here instead?  */
-void
-choose_personality_routine (enum languages lang)
-{
-  static enum {
-    chose_none,
-    chose_cpp,
-    chose_java,
-    gave_error
-  } state;
-
-  switch (state)
-    {
-    case gave_error:
-      return;
-
-    case chose_cpp:
-      if (lang != lang_cplusplus)
-	goto give_error;
-      return;
-
-    case chose_java:
-      if (lang != lang_java)
-	goto give_error;
-      return;
-
-    case chose_none:
-      ; /* Proceed to language selection.  */
-    }
-
-  switch (lang)
-    {
-    case lang_cplusplus:
-      state = chose_cpp;
-      break;
-
-    case lang_java:
-      state = chose_java;
-      terminate_node = builtin_decl_explicit (BUILT_IN_ABORT);
-      pragma_java_exceptions = true;
-      break;
-
-    default:
-      gcc_unreachable ();
-    }
-  return;
-
- give_error:
-  error ("mixing C++ and Java catches in a single translation unit");
-  state = gave_error;
-}
-
 /* Wrap EXPR in a MUST_NOT_THROW_EXPR expressing that EXPR must
    not throw any exceptions if COND is true.  A condition of
    NULL_TREE is treated as 'true'.  */
@@ -408,9 +299,6 @@ initialize_handler_parm (tree decl, tree
   if (!POINTER_TYPE_P (init_type))
     init_type = build_reference_type (init_type);
 
-  choose_personality_routine (decl_is_java_type (init_type, 0)
-			      ? lang_java : lang_cplusplus);
-
   /* Since pointers are passed by value, initialize a reference to
      pointer catch parm with the address of the temporary.  */
   if (TREE_CODE (init_type) == REFERENCE_TYPE
@@ -490,22 +378,6 @@ expand_start_catch_block (tree decl)
   else
     type = NULL_TREE;
 
-  if (decl && decl_is_java_type (type, 1))
-    {
-      /* Java only passes object via pointer and doesn't require
-	 adjusting.  The java object is immediately before the
-	 generic exception header.  */
-      exp = build_exc_ptr ();
-      exp = build1 (NOP_EXPR, build_pointer_type (type), exp);
-      exp = fold_build_pointer_plus (exp,
-		    fold_build1_loc (input_location,
-				     NEGATE_EXPR, sizetype,
-				     TYPE_SIZE_UNIT (TREE_TYPE (exp))));
-      exp = cp_build_indirect_ref (exp, RO_NULL, tf_warning_or_error);
-      initialize_handler_parm (decl, exp);
-      return type;
-    }
-
   /* Call __cxa_end_catch at the end of processing the exception.  */
   push_eh_cleanup (type);
 
@@ -738,27 +610,7 @@ build_throw (tree exp)
   if (! doing_eh ())
     return error_mark_node;
 
-  if (exp && decl_is_java_type (TREE_TYPE (exp), 1))
-    {
-      tree fn = get_identifier ("_Jv_Throw");
-      if (!get_global_value_if_present (fn, &fn))
-	{
-	  /* Declare void _Jv_Throw (void *).  */
-	  tree tmp;
-	  tmp = build_function_type_list (ptr_type_node,
-					  ptr_type_node, NULL_TREE);
-	  fn = push_throw_library_fn (fn, tmp);
-	}
-      else if (really_overloaded_fn (fn))
-	{
-	  error ("%qD should never be overloaded", fn);
-	  return error_mark_node;
-	}
-      fn = OVL_CURRENT (fn);
-      exp = cp_build_function_call_nary (fn, tf_warning_or_error,
-					 exp, NULL_TREE);
-    }
-  else if (exp)
+  if (exp)
     {
       tree throw_type;
       tree temp_type;
--- gcc/cp/cp-lang.c.jj	2016-01-04 14:55:57.000000000 +0100
+++ gcc/cp/cp-lang.c	2016-10-02 19:25:15.506006252 +0200
@@ -137,10 +137,7 @@ static tree
 cp_eh_personality (void)
 {
   if (!cp_eh_personality_decl)
-    {
-      const char *lang = (pragma_java_exceptions ? "gcj" : "gxx");
-      cp_eh_personality_decl = build_personality_function (lang);
-    }
+    cp_eh_personality_decl = build_personality_function ("gxx");
 
   return cp_eh_personality_decl;
 }
--- gcc/cp/typeck.c.jj	2016-09-26 12:06:41.000000000 +0200
+++ gcc/cp/typeck.c	2016-10-02 19:23:59.429941226 +0200
@@ -1226,8 +1226,6 @@ structural_comptypes (tree t1, tree t2,
        || TREE_CODE (t1) == METHOD_TYPE)
       && type_memfn_rqual (t1) != type_memfn_rqual (t2))
     return false;
-  if (TYPE_FOR_JAVA (t1) != TYPE_FOR_JAVA (t2))
-    return false;
 
   /* Allow for two different type nodes which have essentially the same
      definition.  Note that we already checked for equality of the type
--- gcc/cp/call.c.jj	2016-09-23 09:32:09.000000000 +0200
+++ gcc/cp/call.c	2016-10-02 19:03:40.001922477 +0200
@@ -146,7 +146,6 @@ static int joust (struct z_candidate *,
 		  tsubst_flags_t);
 static int compare_ics (conversion *, conversion *);
 static tree build_over_call (struct z_candidate *, int, tsubst_flags_t);
-static tree build_java_interface_fn_ref (tree, tree);
 #define convert_like(CONV, EXPR, COMPLAIN)			\
   convert_like_real ((CONV), (EXPR), NULL_TREE, 0, 0,		\
 		     /*issue_conversion_warnings=*/true,	\
@@ -7935,10 +7934,7 @@ build_over_call (struct z_candidate *can
       if (TREE_SIDE_EFFECTS (argarray[0]))
 	argarray[0] = save_expr (argarray[0]);
       t = build_pointer_type (TREE_TYPE (fn));
-      if (DECL_CONTEXT (fn) && TYPE_JAVA_INTERFACE (DECL_CONTEXT (fn)))
-	fn = build_java_interface_fn_ref (fn, argarray[0]);
-      else
-	fn = build_vfn_ref (argarray[0], DECL_VINDEX (fn));
+      fn = build_vfn_ref (argarray[0], DECL_VINDEX (fn));
       TREE_TYPE (fn) = t;
     }
   else
@@ -8045,67 +8041,6 @@ build_cxx_call (tree fn, int nargs, tree
   return convert_from_reference (fn);
 }
 
-static GTY(()) tree java_iface_lookup_fn;
-
-/* Make an expression which yields the address of the Java interface
-   method FN.  This is achieved by generating a call to libjava's
-   _Jv_LookupInterfaceMethodIdx().  */
-
-static tree
-build_java_interface_fn_ref (tree fn, tree instance)
-{
-  tree lookup_fn, method, idx;
-  tree klass_ref, iface, iface_ref;
-  int i;
-
-  if (!java_iface_lookup_fn)
-    {
-      tree ftype = build_function_type_list (ptr_type_node,
-					     ptr_type_node, ptr_type_node,
-					     java_int_type_node, NULL_TREE);
-      java_iface_lookup_fn
-	= add_builtin_function ("_Jv_LookupInterfaceMethodIdx", ftype,
-				0, NOT_BUILT_IN, NULL, NULL_TREE);
-    }
-
-  /* Look up the pointer to the runtime java.lang.Class object for `instance'.
-     This is the first entry in the vtable.  */
-  klass_ref = build_vtbl_ref (cp_build_indirect_ref (instance, RO_NULL, 
-                                                     tf_warning_or_error),
-			      integer_zero_node);
-
-  /* Get the java.lang.Class pointer for the interface being called.  */
-  iface = DECL_CONTEXT (fn);
-  iface_ref = lookup_field (iface, get_identifier ("class$"), 0, false);
-  if (!iface_ref || !VAR_P (iface_ref)
-      || DECL_CONTEXT (iface_ref) != iface)
-    {
-      error ("could not find class$ field in java interface type %qT",
-		iface);
-      return error_mark_node;
-    }
-  iface_ref = build_address (iface_ref);
-  iface_ref = convert (build_pointer_type (iface), iface_ref);
-
-  /* Determine the itable index of FN.  */
-  i = 1;
-  for (method = TYPE_METHODS (iface); method; method = DECL_CHAIN (method))
-    {
-      if (!DECL_VIRTUAL_P (method))
-	continue;
-      if (fn == method)
-	break;
-      i++;
-    }
-  idx = build_int_cst (NULL_TREE, i);
-
-  lookup_fn = build1 (ADDR_EXPR,
-		      build_pointer_type (TREE_TYPE (java_iface_lookup_fn)),
-		      java_iface_lookup_fn);
-  return build_call_nary (ptr_type_node, lookup_fn,
-			  3, klass_ref, iface_ref, idx);
-}
-
 /* Returns the value to use for the in-charge parameter when making a
    call to a function with the indicated NAME.
 
--- gcc/cp/tree.c.jj	2016-09-13 10:43:56.000000000 +0200
+++ gcc/cp/tree.c	2016-10-02 19:23:37.150215044 +0200
@@ -42,7 +42,6 @@ static tree count_trees_r (tree *, int *
 static tree verify_stmt_tree_r (tree *, int *, void *);
 static tree build_local_temp (tree);
 
-static tree handle_java_interface_attribute (tree *, tree, tree, int, bool *);
 static tree handle_init_priority_attribute (tree *, tree, tree, int, bool *);
 static tree handle_abi_tag_attribute (tree *, tree, tree, int, bool *);
 
@@ -3638,8 +3637,6 @@ const struct attribute_spec cxx_attribut
 {
   /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
        affects_type_identity } */
-  { "java_interface", 0, 0, false, false, false,
-    handle_java_interface_attribute, false },
   { "init_priority",  1, 1, true,  false, false,
     handle_init_priority_attribute, false },
   { "abi_tag", 1, -1, false, false, false,
@@ -3659,31 +3656,6 @@ const struct attribute_spec std_attribut
   { NULL,	      0, 0, false, false, false, NULL, false }
 };
 
-/* Handle a "java_interface" attribute; arguments as in
-   struct attribute_spec.handler.  */
-static tree
-handle_java_interface_attribute (tree* node,
-				 tree name,
-				 tree /*args*/,
-				 int flags,
-				 bool* no_add_attrs)
-{
-  if (DECL_P (*node)
-      || !CLASS_TYPE_P (*node)
-      || !TYPE_FOR_JAVA (*node))
-    {
-      error ("%qE attribute can only be applied to Java class definitions",
-	     name);
-      *no_add_attrs = true;
-      return NULL_TREE;
-    }
-  if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE))
-    *node = build_variant_type_copy (*node);
-  TYPE_JAVA_INTERFACE (*node) = 1;
-
-  return NULL_TREE;
-}
-
 /* Handle an "init_priority" attribute; arguments as in
    struct attribute_spec.handler.  */
 static tree
--- gcc/cp/lex.c.jj	2016-05-30 23:22:56.000000000 +0200
+++ gcc/cp/lex.c	2016-10-02 19:24:43.372401174 +0200
@@ -37,7 +37,6 @@ static void handle_pragma_vtable (cpp_re
 static void handle_pragma_unit (cpp_reader *);
 static void handle_pragma_interface (cpp_reader *);
 static void handle_pragma_implementation (cpp_reader *);
-static void handle_pragma_java_exceptions (cpp_reader *);
 
 static void init_operators (void);
 static void copy_lang_type (tree);
@@ -71,9 +70,6 @@ struct impl_files
 };
 
 static struct impl_files *impl_file_chain;
-
-/* True if we saw "#pragma GCC java_exceptions".  */
-bool pragma_java_exceptions;
 \f
 void
 cxx_finish (void)
@@ -210,7 +206,6 @@ init_cp_pragma (void)
   c_register_pragma (0, "implementation", handle_pragma_implementation);
   c_register_pragma ("GCC", "interface", handle_pragma_interface);
   c_register_pragma ("GCC", "implementation", handle_pragma_implementation);
-  c_register_pragma ("GCC", "java_exceptions", handle_pragma_java_exceptions);
 }
 \f
 /* TRUE if a code represents a statement.  */
@@ -427,18 +422,6 @@ handle_pragma_implementation (cpp_reader
     }
 }
 
-/* Indicate that this file uses Java-personality exception handling.  */
-static void
-handle_pragma_java_exceptions (cpp_reader* /*dfile*/)
-{
-  tree x;
-  if (pragma_lex (&x) != CPP_EOF)
-    warning (0, "junk at end of #pragma GCC java_exceptions");
-
-  choose_personality_routine (lang_java);
-  pragma_java_exceptions = true;
-}
-
 /* Issue an error message indicating that the lookup of NAME (an
    IDENTIFIER_NODE) failed.  Returns the ERROR_MARK_NODE.  */
 
@@ -580,8 +563,6 @@ retrofit_lang_decl (tree t)
     SET_DECL_LANGUAGE (t, lang_cplusplus);
   else if (current_lang_name == lang_name_c)
     SET_DECL_LANGUAGE (t, lang_c);
-  else if (current_lang_name == lang_name_java)
-    SET_DECL_LANGUAGE (t, lang_java);
   else
     gcc_unreachable ();
 
--- gcc/cp/method.c.jj	2016-09-27 09:46:10.000000000 +0200
+++ gcc/cp/method.c	2016-10-02 19:22:08.738301627 +0200
@@ -1765,7 +1765,7 @@ implicitly_declare_fn (special_function_
 
   type = TYPE_MAIN_VARIANT (type);
 
-  if (targetm.cxx.cdtor_returns_this () && !TYPE_FOR_JAVA (type))
+  if (targetm.cxx.cdtor_returns_this ())
     {
       if (kind == sfk_destructor)
 	/* See comment in check_special_function_return_type.  */
--- gcc/cp/error.c.jj	2016-09-16 22:24:49.000000000 +0200
+++ gcc/cp/error.c	2016-10-02 19:25:32.467797791 +0200
@@ -3019,9 +3019,6 @@ language_to_string (enum languages c)
     case lang_cplusplus:
       return "C++";
 
-    case lang_java:
-      return "Java";
-
     default:
       gcc_unreachable ();
     }
--- gcc/cp/decl.c.jj	2016-09-29 22:53:53.000000000 +0200
+++ gcc/cp/decl.c	2016-10-02 19:07:00.439460373 +0200
@@ -77,7 +77,6 @@ static void bad_specifiers (tree, enum b
 			    int);
 static void check_for_uninitialized_const_var (tree);
 static tree local_variable_p_walkfn (tree *, int *, void *);
-static tree record_builtin_java_type (const char *, int);
 static const char *tag_name (enum tag_types);
 static tree lookup_and_check_tag (enum tag_types, tree, tag_scope, bool);
 static int walk_namespaces_r (tree, walk_namespaces_fn, void *);
@@ -3892,53 +3891,6 @@ record_builtin_type (enum rid rid_index,
     debug_hooks->type_decl (tdecl, 0);
 }
 
-/* Record one of the standard Java types.
- * Declare it as having the given NAME.
- * If SIZE > 0, it is the size of one of the integral types;
- * otherwise it is the negative of the size of one of the other types.  */
-
-static tree
-record_builtin_java_type (const char* name, int size)
-{
-  tree type, decl;
-  if (size > 0)
-    {
-      type = build_nonstandard_integer_type (size, 0);
-      type = build_distinct_type_copy (type);
-    }
-  else if (size > -32)
-    {
-      tree stype;
-      /* "__java_char" or ""__java_boolean".  */
-      type = build_nonstandard_integer_type (-size, 1);
-      type = build_distinct_type_copy (type);
-      /* Get the signed type cached and attached to the unsigned type,
-	 so it doesn't get garbage-collected at "random" times,
-	 causing potential codegen differences out of different UIDs
-	 and different alias set numbers.  */
-      stype = build_nonstandard_integer_type (-size, 0);
-      stype = build_distinct_type_copy (stype);
-      TREE_CHAIN (type) = stype;
-      /*if (size == -1)	TREE_SET_CODE (type, BOOLEAN_TYPE);*/
-    }
-  else
-    { /* "__java_float" or ""__java_double".  */
-      type = make_node (REAL_TYPE);
-      TYPE_PRECISION (type) = - size;
-      layout_type (type);
-    }
-  record_builtin_type (RID_MAX, name, type);
-  decl = TYPE_NAME (type);
-
-  /* Suppress generate debug symbol entries for these types,
-     since for normal C++ they are just clutter.
-     However, push_lang_context undoes this if extern "Java" is seen.  */
-  DECL_IGNORED_P (decl) = 1;
-
-  TYPE_FOR_JAVA (type) = 1;
-  return type;
-}
-
 /* Push a type into the namespace so that the back ends ignore it.  */
 
 static void
@@ -3979,7 +3931,6 @@ initialize_predefined_identifiers (void)
   static const predefined_identifier predefined_identifiers[] = {
     { "C++", &lang_name_cplusplus, 0 },
     { "C", &lang_name_c, 0 },
-    { "Java", &lang_name_java, 0 },
     /* Some of these names have a trailing space so that it is
        impossible for them to conflict with names written by users.  */
     { "__ct ", &ctor_identifier, 1 },
@@ -4051,15 +4002,6 @@ cxx_init_decl_processing (void)
 
   c_common_nodes_and_builtins ();
 
-  java_byte_type_node = record_builtin_java_type ("__java_byte", 8);
-  java_short_type_node = record_builtin_java_type ("__java_short", 16);
-  java_int_type_node = record_builtin_java_type ("__java_int", 32);
-  java_long_type_node = record_builtin_java_type ("__java_long", 64);
-  java_float_type_node = record_builtin_java_type ("__java_float", -32);
-  java_double_type_node = record_builtin_java_type ("__java_double", -64);
-  java_char_type_node = record_builtin_java_type ("__java_char", -16);
-  java_boolean_type_node = record_builtin_java_type ("__java_boolean", -1);
-
   integer_two_node = build_int_cst (NULL_TREE, 2);
 
   record_builtin_type (RID_BOOL, "bool", boolean_type_node);
@@ -6962,20 +6904,6 @@ cp_finish_decl (tree decl, tree init, bo
 	     is *not* defined.  */
 	  && (!DECL_EXTERNAL (decl) || init))
 	{
-	  if (TYPE_FOR_JAVA (type) && MAYBE_CLASS_TYPE_P (type))
-	    {
-	      tree jclass
-		= IDENTIFIER_GLOBAL_VALUE (get_identifier ("jclass"));
-	      /* Allow libjava/prims.cc define primitive classes.  */
-	      if (init != NULL_TREE
-		  || jclass == NULL_TREE
-		  || TREE_CODE (jclass) != TYPE_DECL
-		  || !POINTER_TYPE_P (TREE_TYPE (jclass))
-		  || !same_type_ignoring_top_level_qualifiers_p
-					(type, TREE_TYPE (TREE_TYPE (jclass))))
-		error ("Java object %qD not allocated with %<new%>", decl);
-	      init = NULL_TREE;
-	    }
 	  cleanups = make_tree_vector ();
 	  init = check_initializer (decl, init, flags, &cleanups);
 
@@ -7019,9 +6947,6 @@ cp_finish_decl (tree decl, tree init, bo
 	   so that we can decide later to emit debug info for them.  */
 	record_types_used_by_current_var_decl (decl);
     }
-  else if (TREE_CODE (decl) == FIELD_DECL
-	   && TYPE_FOR_JAVA (type) && MAYBE_CLASS_TYPE_P (type))
-    error ("non-static data member %qD has Java class type", decl);
 
   /* Add this declaration to the statement-tree.  This needs to happen
      after the call to check_initializer so that the DECL_EXPR for a
@@ -8384,9 +8309,7 @@ grokfndecl (tree ctype,
 	check_main_parameter_types (decl);
     }
 
-  if (ctype != NULL_TREE
-      && (! TYPE_FOR_JAVA (ctype) || check_java_method (decl))
-      && check)
+  if (ctype != NULL_TREE && check)
     {
       tree old_decl = check_classfn (ctype, decl,
 				     (processing_template_decl
@@ -9236,7 +9159,7 @@ check_special_function_return_type (spec
 	error_at (smallest_type_quals_location (type_quals, locations),
 		  "qualifiers are not allowed on constructor declaration");
 
-      if (targetm.cxx.cdtor_returns_this () && !TYPE_FOR_JAVA (optype))
+      if (targetm.cxx.cdtor_returns_this ())
 	type = build_pointer_type (optype);
       else
 	type = void_type_node;
@@ -9250,10 +9173,8 @@ check_special_function_return_type (spec
 		  "qualifiers are not allowed on destructor declaration");
 
       /* We can't use the proper return type here because we run into
-	 problems with ambiguous bases and covariant returns.
-	 Java classes are left unchanged because (void *) isn't a valid
-	 Java type, and we don't want to change the Java ABI.  */
-      if (targetm.cxx.cdtor_returns_this () && !TYPE_FOR_JAVA (optype))
+	 problems with ambiguous bases and covariant returns.  */
+      if (targetm.cxx.cdtor_returns_this ())
 	type = build_pointer_type (void_type_node);
       else
 	type = void_type_node;
@@ -10826,11 +10747,6 @@ grokdeclarator (const cp_declarator *dec
     {
       tree decl;
 
-      /* Note that the grammar rejects storage classes
-	 in typenames, fields or parameters.  */
-      if (current_lang_name == lang_name_java)
-	TYPE_FOR_JAVA (type) = 1;
-
       /* This declaration:
 
 	   typedef void f(int) const;
@@ -11898,16 +11814,6 @@ grokparms (tree parmlist, tree *parms)
 	  TREE_TYPE (decl) = error_mark_node;
 	}
 
-      if (type != error_mark_node
-	  && TYPE_FOR_JAVA (type)
-	  && MAYBE_CLASS_TYPE_P (type))
-	{
-	  error ("parameter %qD has Java class type", decl);
-	  type = error_mark_node;
-	  TREE_TYPE (decl) = error_mark_node;
-	  init = NULL_TREE;
-	}
-
       if (type != error_mark_node)
 	{
 	  if (deprecated_state != DEPRECATED_SUPPRESS)
@@ -13108,21 +13014,14 @@ xref_basetypes (tree ref, tree base_list
     }
 
   if (max_bases > 1)
-    {
-      if (TYPE_FOR_JAVA (ref))
-	error ("Java class %qT cannot have multiple bases", ref);
-      else
-	warning (OPT_Wmultiple_inheritance,
-		 "%qT defined with multiple direct bases", ref);
-    }
+    warning (OPT_Wmultiple_inheritance,
+	     "%qT defined with multiple direct bases", ref);
 
   if (max_vbases)
     {
       vec_alloc (CLASSTYPE_VBASECLASSES (ref), max_vbases);
 
-      if (TYPE_FOR_JAVA (ref))
-	error ("Java class %qT cannot have virtual bases", ref);
-      else if (max_dvbases)
+      if (max_dvbases)
 	warning (OPT_Wvirtual_inheritance,
 		 "%qT defined with direct virtual base", ref);
     }
@@ -13147,9 +13046,6 @@ xref_basetypes (tree ref, tree base_list
 	  goto dropped_base;
 	}
 
-      if (TYPE_FOR_JAVA (basetype) && (current_lang_depth () == 0))
-	TYPE_FOR_JAVA (ref) = 1;
-
       base_binfo = NULL_TREE;
       if (CLASS_TYPE_P (basetype) && !dependent_scope_p (basetype))
 	{
@@ -13924,15 +13820,11 @@ check_function_type (tree decl, tree cur
   if (dependent_type_p (return_type)
       || type_uses_auto (return_type))
     return;
-  if (!COMPLETE_OR_VOID_TYPE_P (return_type)
-      || (TYPE_FOR_JAVA (return_type) && MAYBE_CLASS_TYPE_P (return_type)))
+  if (!COMPLETE_OR_VOID_TYPE_P (return_type))
     {
       tree args = TYPE_ARG_TYPES (fntype);
 
-      if (!COMPLETE_OR_VOID_TYPE_P (return_type))
-	error ("return type %q#T is incomplete", return_type);
-      else
-	error ("return type has Java class type %q#T", return_type);
+      error ("return type %q#T is incomplete", return_type);
 
       /* Make it return void instead.  */
       if (TREE_CODE (fntype) == METHOD_TYPE)
@@ -14587,8 +14479,7 @@ finish_constructor_body (void)
   tree val;
   tree exprstmt;
 
-  if (targetm.cxx.cdtor_returns_this ()
-      && (! TYPE_FOR_JAVA (current_class_type)))
+  if (targetm.cxx.cdtor_returns_this ())
     {
       /* Any return from a constructor will end up here.  */
       add_stmt (build_stmt (input_location, LABEL_EXPR, cdtor_label));
--- gcc/cp/mangle.c.jj	2016-09-05 19:27:03.000000000 +0200
+++ gcc/cp/mangle.c	2016-10-02 19:21:45.576586284 +0200
@@ -239,10 +239,6 @@ static bool equal_abi_tags (tree, tree);
 static inline void start_mangling (const tree);
 static tree mangle_special_for_type (const tree, const char *);
 
-/* Foreign language functions.  */
-
-static void write_java_integer_type_codes (const tree);
-
 /* Append a single character to the end of the mangled
    representation.  */
 #define write_char(CHAR)						\
@@ -2436,8 +2432,6 @@ write_builtin_type (tree type)
 	write_string ("Ds");
       else if (type == char32_type_node)
 	write_string ("Di");
-      else if (TYPE_FOR_JAVA (type))
-	write_java_integer_type_codes (type);
       else
 	{
 	  size_t itk;
@@ -2492,11 +2486,9 @@ write_builtin_type (tree type)
       break;
 
     case REAL_TYPE:
-      if (type == float_type_node
-	  || type == java_float_type_node)
+      if (type == float_type_node)
 	write_char ('f');
-      else if (type == double_type_node
-	       || type == java_double_type_node)
+      else if (type == double_type_node)
 	write_char ('d');
       else if (type == long_double_type_node)
 	write_char ('e');
@@ -2621,40 +2613,16 @@ write_function_type (const tree type)
 /* Non-terminal <bare-function-type>.  TYPE is a FUNCTION_TYPE or
    METHOD_TYPE.  If INCLUDE_RETURN_TYPE is nonzero, the return value
    is mangled before the parameter types.  If non-NULL, DECL is
-   FUNCTION_DECL for the function whose type is being emitted.
-
-   If DECL is a member of a Java type, then a literal 'J'
-   is output and the return type is mangled as if INCLUDE_RETURN_TYPE
-   were nonzero.
-
-     <bare-function-type> ::= [J]</signature/ type>+  */
+   FUNCTION_DECL for the function whose type is being emitted.  */
 
 static void
 write_bare_function_type (const tree type, const int include_return_type_p,
 			  const tree decl)
 {
-  int java_method_p;
-
   MANGLE_TRACE_TREE ("bare-function-type", type);
 
-  /* Detect Java methods and emit special encoding.  */
-  if (decl != NULL
-      && DECL_FUNCTION_MEMBER_P (decl)
-      && TYPE_FOR_JAVA (DECL_CONTEXT (decl))
-      && !DECL_CONSTRUCTOR_P (decl)
-      && !DECL_DESTRUCTOR_P (decl)
-      && !DECL_CONV_FN_P (decl))
-    {
-      java_method_p = 1;
-      write_char ('J');
-    }
-  else
-    {
-      java_method_p = 0;
-    }
-
   /* Mangle the return type, if requested.  */
-  if (include_return_type_p || java_method_p)
+  if (include_return_type_p)
     write_type (TREE_TYPE (type));
 
   /* Now mangle the types of the arguments.  */
@@ -4264,30 +4232,6 @@ mangle_ref_init_variable (const tree var
   return finish_mangling_get_identifier ();
 }
 \f
-
-/* Foreign language type mangling section.  */
-
-/* How to write the type codes for the integer Java type.  */
-
-static void
-write_java_integer_type_codes (const tree type)
-{
-  if (type == java_int_type_node)
-    write_char ('i');
-  else if (type == java_short_type_node)
-    write_char ('s');
-  else if (type == java_byte_type_node)
-    write_char ('c');
-  else if (type == java_char_type_node)
-    write_char ('w');
-  else if (type == java_long_type_node)
-    write_char ('x');
-  else if (type == java_boolean_type_node)
-    write_char ('b');
-  else
-    gcc_unreachable ();
-}
-
 /* Given a CLASS_TYPE, such as a record for std::bad_exception this
    function generates a mangled name for the vtable map variable of
    the class type.  For example, if the class type is
--- gcc/cp/class.c.jj	2016-09-23 09:32:13.000000000 +0200
+++ gcc/cp/class.c	2016-10-02 19:14:49.350700430 +0200
@@ -1047,19 +1047,7 @@ add_method (tree type, tree method, tree
   if (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (method))
     slot = CLASSTYPE_CONSTRUCTOR_SLOT;
   else if (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (method))
-    {
-      slot = CLASSTYPE_DESTRUCTOR_SLOT;
-
-      if (TYPE_FOR_JAVA (type))
-	{
-	  if (!DECL_ARTIFICIAL (method))
-	    error ("Java class %qT cannot have a destructor", type);
-	  else if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type))
-	    error ("Java class %qT cannot have an implicit non-trivial "
-		   "destructor",
-		   type);
-	}
-    }
+    slot = CLASSTYPE_DESTRUCTOR_SLOT;
   else
     {
       tree m;
@@ -3349,17 +3337,8 @@ add_implicitly_declared_members (tree t,
 
   /* Destructor.  */
   if (!CLASSTYPE_DESTRUCTORS (t))
-    {
-      /* In general, we create destructors lazily.  */
-      CLASSTYPE_LAZY_DESTRUCTOR (t) = 1;
-
-      if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)
-	  && TYPE_FOR_JAVA (t))
-	/* But if this is a Java class, any non-trivial destructor is
-	   invalid, even if compiler-generated.  Therefore, if the
-	   destructor is non-trivial we create it now.  */
-	lazily_declare_fn (sfk_destructor, t);
-    }
+    /* In general, we create destructors lazily.  */
+    CLASSTYPE_LAZY_DESTRUCTOR (t) = 1;
 
   /* [class.ctor]
 
@@ -3382,7 +3361,7 @@ add_implicitly_declared_members (tree t,
 
      If a class definition does not explicitly declare a copy
      constructor, one is declared implicitly.  */
-  if (! TYPE_HAS_COPY_CTOR (t) && ! TYPE_FOR_JAVA (t))
+  if (! TYPE_HAS_COPY_CTOR (t))
     {
       TYPE_HAS_COPY_CTOR (t) = 1;
       TYPE_HAS_CONST_COPY_CTOR (t) = !cant_have_const_cctor;
@@ -3395,7 +3374,7 @@ add_implicitly_declared_members (tree t,
      when it is needed.  For now, just record whether or not the type
      of the parameter to the assignment operator will be a const or
      non-const reference.  */
-  if (!TYPE_HAS_COPY_ASSIGN (t) && !TYPE_FOR_JAVA (t))
+  if (!TYPE_HAS_COPY_ASSIGN (t))
     {
       TYPE_HAS_COPY_ASSIGN (t) = 1;
       TYPE_HAS_CONST_COPY_ASSIGN (t) = !cant_have_const_assignment;
@@ -6653,8 +6632,7 @@ determine_key_method (tree type)
 {
   tree method;
 
-  if (TYPE_FOR_JAVA (type)
-      || processing_template_decl
+  if (processing_template_decl
       || CLASSTYPE_TEMPLATE_INSTANTIATION (type)
       || CLASSTYPE_INTERFACE_KNOWN (type))
     return;
@@ -7095,9 +7073,7 @@ finish_struct_1 (tree t)
   /* Build the VTT for T.  */
   build_vtt (t);
 
-  /* This warning does not make sense for Java classes, since they
-     cannot have destructors.  */
-  if (!TYPE_FOR_JAVA (t) && warn_nonvdtor
+  if (warn_nonvdtor
       && TYPE_POLYMORPHIC_P (t) && accessible_nvdtor_p (t)
       && !CLASSTYPE_FINAL (t))
     warning (OPT_Wnon_virtual_dtor,
@@ -7832,29 +7808,9 @@ push_lang_context (tree name)
   vec_safe_push (current_lang_base, current_lang_name);
 
   if (name == lang_name_cplusplus)
-    {
-      current_lang_name = name;
-    }
-  else if (name == lang_name_java)
-    {
-      current_lang_name = name;
-      /* DECL_IGNORED_P is initially set for these types, to avoid clutter.
-	 (See record_builtin_java_type in decl.c.)  However, that causes
-	 incorrect debug entries if these types are actually used.
-	 So we re-enable debug output after extern "Java".  */
-      DECL_IGNORED_P (TYPE_NAME (java_byte_type_node)) = 0;
-      DECL_IGNORED_P (TYPE_NAME (java_short_type_node)) = 0;
-      DECL_IGNORED_P (TYPE_NAME (java_int_type_node)) = 0;
-      DECL_IGNORED_P (TYPE_NAME (java_long_type_node)) = 0;
-      DECL_IGNORED_P (TYPE_NAME (java_float_type_node)) = 0;
-      DECL_IGNORED_P (TYPE_NAME (java_double_type_node)) = 0;
-      DECL_IGNORED_P (TYPE_NAME (java_char_type_node)) = 0;
-      DECL_IGNORED_P (TYPE_NAME (java_boolean_type_node)) = 0;
-    }
+    current_lang_name = name;
   else if (name == lang_name_c)
-    {
-      current_lang_name = name;
-    }
+    current_lang_name = name;
   else
     error ("language string %<\"%E\"%> not recognized", name);
 }
--- gcc/testsuite/g++.dg/other/java3.C.jj	2013-11-12 11:31:20.430635087 +0100
+++ gcc/testsuite/g++.dg/other/java3.C	2016-10-02 19:31:12.607617473 +0200
@@ -1,7 +0,0 @@
-// PR c++/11006
-
-typedef int* jclass;
-
-void foo () {
-  new __java_boolean;  // { dg-error "valid" }
-}
--- gcc/testsuite/g++.dg/other/java1.C.jj	2008-09-05 12:55:02.000000000 +0200
+++ gcc/testsuite/g++.dg/other/java1.C	2016-10-02 19:31:07.941674817 +0200
@@ -1,22 +0,0 @@
-// { dg-options "-w -ansi -pedantic" }
-
-// Copyright (C) 2003 Free Software Foundation, Inc.
-// Contributed by Nathan Sidwell 23 Oct 2003 <nathan@codesourcery.com>
-
-extern "Java" {
-  class One 
-  {
-    ~One (); // { dg-error "cannot have a destructor" "" }
-    One ();
-  };
-
-  class Two {};
-
-  class Three : One {}; // { dg-error "cannot have an implicit" "" }
-
-  class Four : Two {};
-
-  class Five : Two, Four {}; //  { dg-error "cannot have multiple bases" "" }
-
-  class Six : virtual Two {}; // { dg-error "cannot have virtual base" "" }
-}
--- gcc/testsuite/g++.dg/other/error12.C.jj	2008-09-05 12:55:01.000000000 +0200
+++ gcc/testsuite/g++.dg/other/error12.C	2016-10-02 19:31:30.747394535 +0200
@@ -1,9 +0,0 @@
-//PR c++/28292
-
-extern "Java"
-{
-  struct A
-  {
-    void foo(void; // { dg-error "before|incomplete type|invalid use" }
-  };
-}
--- gcc/testsuite/g++.dg/other/java2.C.jj	2008-09-05 12:55:01.000000000 +0200
+++ gcc/testsuite/g++.dg/other/java2.C	2016-10-02 19:31:10.433644191 +0200
@@ -1,11 +0,0 @@
-// PR c++/???
-// { dg-do compile }
-
-extern "Java"
-{
-  struct A {};
-}
-
-typedef void* jclass;
-
-A* p = new A;  // { dg-error "class\\$" }
--- gcc/testsuite/g++.dg/warn/Wnvdtor.C.jj	2014-04-08 08:59:40.257428209 +0200
+++ gcc/testsuite/g++.dg/warn/Wnvdtor.C	2016-10-02 19:32:10.994899893 +0200
@@ -1,11 +0,0 @@
-// { dg-options "-Wnon-virtual-dtor" }
-
-extern "Java"
-{
-  class Foo
-  {
-  public:
-    virtual void bar( void);
-  };
-}
-
--- gcc/testsuite/g++.dg/lookup/java1.C.jj	2008-09-05 12:55:04.000000000 +0200
+++ gcc/testsuite/g++.dg/lookup/java1.C	2016-10-02 19:30:30.783131496 +0200
@@ -1,68 +0,0 @@
-// { dg-do compile }
-// { dg-options "-fdollars-in-identifiers" }
-// Origin: Giovanni Bajo <giovannibajo at libero dot it>
-// Make sure that Java special functions can be called correctly.
-
-extern "Java"
-{
-  typedef __java_int jint;
-  namespace java
-  {
-    namespace lang
-    {
-      class Class;
-      class Object;
-      class Throwable {};
-      class Foo;
-    }
-  }
-}
-
-typedef struct java::lang::Object* jobject;
-typedef struct java::lang::Throwable* jthrowable;
-typedef class java::lang::Class* jclass;
-using java::lang::Foo;
-
-class Foo : public java::lang::Throwable
-{
-public:
-  static ::java::lang::Class class$;
-};
-
-
-/*
- * Step 1: no declarations. A declaration for _Jv_Throw is created.
- */
-
-void Bar1(void)
-{
-  Foo* f = new java::lang::Foo;   // { dg-error "call to Java constructor" }
-  throw (f);
-}
-
-
-/*
- * Step 2: constructor declaration
- */
-
-extern "C" jobject _Jv_AllocObject (jclass) __attribute__((__malloc__));
-
-void Bar2(void)
-{
-  Foo* f = new java::lang::Foo; 
-  throw (f);  
-}
-
-
-/*
- * Step 3: overloads
- */
-
-jobject _Jv_AllocObject (jclass, jint, float) __attribute__((__malloc__));
-void _Jv_Throw (int, float) __attribute__ ((__noreturn__));
-
-void Bar3(void)
-{
-  Foo* f = new java::lang::Foo;	  // { dg-error "should never be overloaded" }
-  throw (f);			  // { dg-error "should never be overloaded" }
-}
--- gcc/testsuite/g++.dg/lookup/java2.C.jj	2008-09-05 12:55:04.000000000 +0200
+++ gcc/testsuite/g++.dg/lookup/java2.C	2016-10-02 19:30:32.245113528 +0200
@@ -1,47 +0,0 @@
-// { dg-do compile }
-// { dg-options "-fdollars-in-identifiers" }
-// Origin: Giovanni Bajo <giovannibajo at libero dot it>
-// Make sure that Java special functions can be called correctly.
-// (continue from java1.C)
-
-extern "Java"
-{
-  typedef __java_int jint;
-  namespace java
-  {
-    namespace lang
-    {
-      class Class;
-      class Object;
-      class Throwable {};
-      class Foo;
-    }
-  }
-}
-
-typedef struct java::lang::Object* jobject;
-typedef struct java::lang::Throwable* jthrowable;
-typedef class java::lang::Class* jclass;
-using java::lang::Foo;
-
-class Foo : public java::lang::Throwable
-{
-public:
-  static ::java::lang::Class class$;
-};
-
-/*
- * Step 4: Manual declaration of _Jv_Throw
- *  This is the last case we need to test. In the other file we're testing
- *  the compiler is able to generate an artifical declaration for this 
- *  function, so we need to test here if it works with a normal declaration.
- */
-
-extern "C" jobject _Jv_AllocObject (jclass) __attribute__((__malloc__));
-extern "C" void _Jv_Throw (jthrowable) __attribute__ ((__noreturn__));
-
-void Bar4(void)
-{
-  Foo* f = new java::lang::Foo;
-  throw (f);
-}
--- gcc/testsuite/g++.dg/ext/pr34829.C.jj	2008-09-05 12:55:02.000000000 +0200
+++ gcc/testsuite/g++.dg/ext/pr34829.C	2016-10-02 19:30:04.517454301 +0200
@@ -1,22 +0,0 @@
-// Test for PR c++/34829
-// Placement new should be ok for non-aggregate Java types.
-
-// { dg-do compile }
-// { dg-options "" }
-
-extern "Java"
-{
-  typedef __java_byte jbyte;
-}
-
-typedef __SIZE_TYPE__ size_t;
-
-void *operator new (size_t, void *m)
-{
-  return m;
-}
-
-jbyte *f(void *memory)
-{
-  return new (memory) jbyte;
-}
--- gcc/testsuite/g++.dg/ext/java-3.C.jj	2016-03-23 10:41:12.442279851 +0100
+++ gcc/testsuite/g++.dg/ext/java-3.C	2016-10-02 19:29:33.887830739 +0200
@@ -1,39 +0,0 @@
-// PR c++/70267
-// { dg-do compile { target { ! { powerpc-ibm-aix* } } } }
-// { dg-options "-O2" }
-
-extern "Java"
-{
-  typedef __java_int jint;
-  namespace java
-  {
-    namespace lang
-    {
-      class Class;
-      class Object;
-      class Throwable {};
-      class Foo;
-    }
-  }
-} 
-
-typedef struct java::lang::Object * jobject;
-typedef struct java::lang::Throwable * jthrowable;
-typedef class  java::lang::Class * jclass;
-
-using java::lang::Foo;
-
-class Foo: public java::lang::Throwable
-{
-  public:static::java::lang::Class class$;
-};
-
-extern "C" Foo _Jv_AllocObject (jclass);
-extern "C" void _Jv_Throw (jthrowable) __attribute__ ((__noreturn__));
-
-void 
-Bar4 (void)
-{
-  Foo * f = new java::lang::Foo;	// { dg-error "is not a function returning a pointer" }
-  throw (f);
-}
--- gcc/testsuite/g++.dg/ext/java-1.C.jj	2008-09-05 12:55:02.000000000 +0200
+++ gcc/testsuite/g++.dg/ext/java-1.C	2016-10-02 19:29:29.645882873 +0200
@@ -1,26 +0,0 @@
-// { dg-do compile { target { ! { powerpc-ibm-aix* } } } }
-// { dg-options "" }
-// Test extern "java" and some throwing of the objects.
-
-extern "Java"
-  namespace java
-  {
-    namespace lang
-    {
-      class Throwable;
-      class Class;
-  }
-}
-typedef class java::lang::Throwable* jthrowable;
-typedef class java::lang::Class* jclass;
-class java::lang::Throwable {
-public:
-  static jclass class$;
-};
-int
-_Jv_FindClassFromSignature ( )
-  try 
-    {
-    }
-  catch (java::lang::Throwable *ncdfe) {} 
-
--- gcc/testsuite/g++.dg/ext/java-2.C.jj	2008-10-23 13:21:04.000000000 +0200
+++ gcc/testsuite/g++.dg/ext/java-2.C	2016-10-02 19:29:31.942854643 +0200
@@ -1,79 +0,0 @@
-// PR c++/30293
-// PR c++/30294
-// { dg-do compile { target { ! { powerpc-ibm-aix* } } } }
-// { dg-options "" }
-
-extern "Java" {
-typedef __java_byte jbyte;
-namespace java {
-namespace lang {
-  class Object {};
-  class Class {};
-}
-}
-typedef struct java::lang::Object* jobject;
-typedef java::lang::Class *jclass;
-}
-extern "C" jobject _Jv_AllocObject (jclass);
-
-extern "Java" {
-  struct A { static java::lang::Class class$; };
-}
-
-struct B {
-  A a;		// { dg-error "has Java class type" }
-};
-
-void* operator new (__SIZE_TYPE__, void*) throw();
-char buf[1024];
-
-A a;		// { dg-error "not allocated with" }
-A b = A ();	// { dg-error "not allocated with" }
-A *c = new ((void *) buf) A ();	// { dg-error "using placement new" }
-A *d = new A ();
-jbyte e = 6;
-
-const A fn1 ()	// { dg-error "return type has Java class type" }
-{
-  A a;		// { dg-error "not allocated with" }
-  return a;
-}
-
-A fn2 ()	// { dg-error "return type has Java class type" }
-{
-  A a;		// { dg-error "not allocated with" }
-  return a;
-}
-
-A *fn3 ()
-{
-  return new A ();
-}
-
-A &fn4 ()
-{
-  return *c;
-}
-
-jbyte fn5 ()
-{
-  return 7;
-}
-
-void fn6 (A x)	// { dg-error "has Java class type" }
-{
-}
-
-void fn7 (const A x)	// { dg-error "has Java class type" }
-{
-}
-
-void fn8 (A *x)
-{
-  (void) x;
-}
-
-void fn9 (jbyte x)
-{
-  (void) x;
-}
--- gcc/testsuite/g++.old-deja/g++.oliva/dwarf2.C.jj	2010-06-10 19:32:03.000000000 +0200
+++ gcc/testsuite/g++.old-deja/g++.oliva/dwarf2.C	2016-05-06 19:07:57.544936929 +0200
@@ -1,10 +0,0 @@
-// { dg-do assemble }
-
-// Copyright (C) 1999 Free Software Foundation
-
-// by Alexandre Oliva <oliva@dcc.unicamp.br>
-
-// Fails with dwarf debugging.
-
-typedef __java_boolean jboolean;
-void foo() {}


	Jakub

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-10-01  7:58               ` Andrew Haley
@ 2016-10-03 12:53                 ` Rainer Orth
  2016-10-04 15:28                   ` Jeff Law
  0 siblings, 1 reply; 86+ messages in thread
From: Rainer Orth @ 2016-10-03 12:53 UTC (permalink / raw)
  To: Andrew Haley
  Cc: Eric Gallager, Jakub Jelinek, Ian Lance Taylor, Marek Polacek,
	gcc-patches

Andrew Haley <aph@redhat.com> writes:

> On 30/09/16 23:16, Rainer Orth wrote:
>> me too, though mostly to have maximum test coverage (primarily on
>> Solaris).  As expected, a x86_64-apple-darwin16 bootstrap with
>> --enable-objc-gc just failed for me.  I'm testing the following patch
>> (on top of Jakub's).
>> 
>> 	Rainer
>> 
>> 
>> 2016-10-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>> 
>> 	* configure.ac (target_libraries): Readd target-boehm-gc.
>> 	Restore --enable-objc-gc handling.
>> 	* configure: Regenerate.
>
> Thanks everybody.  My apologies.

The bootstrap completed successfully now.  Ok for mainline?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-05 15:29 [PATCH] Delete GCJ Andrew Haley
                   ` (4 preceding siblings ...)
  2016-09-10 12:22 ` NightStrike
@ 2016-10-03 23:12 ` Matthias Klose
  2016-10-04  8:40   ` Rainer Orth
  5 siblings, 1 reply; 86+ messages in thread
From: Matthias Klose @ 2016-10-03 23:12 UTC (permalink / raw)
  To: Andrew Haley, GCC Patches, GCJ-patches

On 05.09.2016 17:13, Andrew Haley wrote:
> As discussed.  I think I should ask a Global reviewer to approve this
> one.  For obvious reasons I haven't included the diffs to the deleted
> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
> if anyone would like to try it.
> 
> Andrew.
> 

still breaks bootstraps when configured with --enable-objc-gc.

the immediate step should be to fix the bootstrap failure, as an additional step
to remove boehm-gc from the gcc sources and be able to use an external boehm-gc.

Thanks, Matthias

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-03 23:12 ` Matthias Klose
@ 2016-10-04  8:40   ` Rainer Orth
  2016-10-04  8:41     ` Andrew Haley
  0 siblings, 1 reply; 86+ messages in thread
From: Rainer Orth @ 2016-10-04  8:40 UTC (permalink / raw)
  To: Matthias Klose; +Cc: Andrew Haley, GCC Patches, GCJ-patches

Hi Matthias,

> On 05.09.2016 17:13, Andrew Haley wrote:
>> As discussed.  I think I should ask a Global reviewer to approve this
>> one.  For obvious reasons I haven't included the diffs to the deleted
>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>> if anyone would like to try it.
>
> still breaks bootstraps when configured with --enable-objc-gc.
>
> the immediate step should be to fix the bootstrap failure, as an additional step
> to remove boehm-gc from the gcc sources and be able to use an external boehm-gc.

the first part is handled by my unreviewed patch

	https://gcc.gnu.org/ml/gcc-patches/2016-09/msg02437.html

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-04  8:40   ` Rainer Orth
@ 2016-10-04  8:41     ` Andrew Haley
  2016-10-04 17:23       ` Mike Stump
  0 siblings, 1 reply; 86+ messages in thread
From: Andrew Haley @ 2016-10-04  8:41 UTC (permalink / raw)
  To: Rainer Orth, Matthias Klose; +Cc: GCC Patches, GCJ-patches

On 04/10/16 09:39, Rainer Orth wrote:
> Hi Matthias,
> 
>> On 05.09.2016 17:13, Andrew Haley wrote:
>>> As discussed.  I think I should ask a Global reviewer to approve this
>>> one.  For obvious reasons I haven't included the diffs to the deleted
>>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>>> if anyone would like to try it.
>>
>> still breaks bootstraps when configured with --enable-objc-gc.
>>
>> the immediate step should be to fix the bootstrap failure, as an additional step
>> to remove boehm-gc from the gcc sources and be able to use an external boehm-gc.
> 
> the first part is handled by my unreviewed patch
> 
> 	https://gcc.gnu.org/ml/gcc-patches/2016-09/msg02437.html

Looks obvious to me, fixes bootstrap.  I think no-one will complain
if you check it in.

Andrew.


^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-09-30 23:52             ` Rainer Orth
  2016-10-01  7:58               ` Andrew Haley
@ 2016-10-04  9:23               ` Jakub Jelinek
  2016-10-19 12:14                 ` Rainer Orth
  1 sibling, 1 reply; 86+ messages in thread
From: Jakub Jelinek @ 2016-10-04  9:23 UTC (permalink / raw)
  To: Rainer Orth
  Cc: Eric Gallager, Andrew Haley, Ian Lance Taylor, Marek Polacek,
	gcc-patches

On Sat, Oct 01, 2016 at 12:16:20AM +0200, Rainer Orth wrote:
> Hi Eric,
> 
> >> I haven't tried to readd the boehm-gc objc support that has also been
> >> disabled, don't know about anybody using that.
> >
> > I always configure with --enable-objc-gc. The only reason Apple
> > deprecated garbage collection for Objective C is because they replaced
> > it with Automated Reference Counting in clang, which GCC doesn't
> > support yet. So, until GCC supports Automated Reference Counting,
> > please keep boehm-gc support for objc.
> 
> me too, though mostly to have maximum test coverage (primarily on
> Solaris).  As expected, a x86_64-apple-darwin16 bootstrap with
> --enable-objc-gc just failed for me.  I'm testing the following patch
> (on top of Jakub's).
> 
> 	Rainer
> 
> 
> 2016-10-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	* configure.ac (target_libraries): Readd target-boehm-gc.
> 	Restore --enable-objc-gc handling.
> 	* configure: Regenerate.

This is incomplete.  I guess it can be committed as is, but should be
followed by re-addition of:
  bfin-*-*)
    noconfigdirs="$noconfigdirs target-boehm-gc"
    ;;
  cris-*-* | crisv32-*-*)
    case "${target}" in
      *-*-linux*)
        ;;
      *) # See PR46792 regarding target-libffi.
        noconfigdirs="$noconfigdirs target-boehm-gc";;
    esac
    ;;
  mmix-*-*)
    noconfigdirs="$noconfigdirs target-boehm-gc"
    ;;
(perhaps in the same case as target-libffi handling).

	Jakub

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [C++ PATCH] Delete GCJ - C++ part
  2016-10-02 19:59           ` [C++ PATCH] Delete GCJ - C++ part Jakub Jelinek
@ 2016-10-04 15:20             ` Jason Merrill
  2016-10-05  9:04             ` Andreas Schwab
  1 sibling, 0 replies; 86+ messages in thread
From: Jason Merrill @ 2016-10-04 15:20 UTC (permalink / raw)
  To: Jakub Jelinek
  Cc: Andreas Schwab, Andrew Haley, Marek Polacek, gcc-patches List

OK.

On Sun, Oct 2, 2016 at 3:58 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Sun, Oct 02, 2016 at 03:27:09PM +0200, Andreas Schwab wrote:
>> Things we may want to remove:
>>
>> - references to java in contrib (download_ecj, gcc_update,
>>   patch_tester.sh, update-copyright.py)
>> - GCJ, GCJ_FOR_BUILD, GCJ_FOR_TARGET in Makefiles.tpl and configure.ac
>> - LIBGCJ_SONAME in config/i386/{cygwin.h,mingw32.h}
>> - references to java in install.texi
>
> There is another thing, the Java extensions in the C++ FE, which are IMNSHO
> no longer needed after GCJ removal.
>
> Here is a C++ patch that removes that part, bootstrapped/regtested on
> x86_64-linux and i686-linux, ok for trunk?
>
> 2016-10-02  Jakub Jelinek  <jakub@redhat.com>
>
>         * doc/extend.texi (Java Exceptions): Remove.
>         (java_interface): Remove.
> cp/
>         * cp-tree.h (enum cp_tree_index): Remove CPTI_JAVA_*,
>         CPTI_LANG_NAME_JAVA and CPTI_JCLASS.
>         (java_byte_type_node, java_short_type_node, java_int_type_node,
>         java_long_type_node, java_float_type_node, java_double_type_node,
>         java_char_type_node, java_boolean_type_node, lang_name_java,
>         jclass_node): Remove.
>         (enum languages): Remove lang_java.
>         (TYPE_FOR_JAVA): Remove.
>         (struct lang_type_class): Remove java_interface bit-field.
>         (TYPE_JAVA_INTERFACE): Remove.
>         (pragma_java_exceptions): Remove.
>         (check_java_method, build_java_class_ref): Remove prototypes.
>         * name-lookup.c (pushtag_1): Don't set TYPE_FOR_JAVA.
>         * decl2.c (acceptable_java_type, check_java_method): Remove.
>         (import_export_decl): Remove TYPE_FOR_JAVA handling.
>         (build_java_method_aliases): Remove.
>         (c_parse_final_cleanups): Don't call build_java_method_aliases.
>         (possibly_inlined_p): Don't test pragma_java_exceptions.
>         * init.c (build_new_1): Remove TYPE_FOR_JAVA handling.
>         (build_java_class_ref): Remove.
>         * pt.c (maybe_new_partial_specialization, lookup_template_class_1,
>         instantiate_class_template_1): Don't copy TYPE_FOR_JAVA.
>         * except.c (eh_type_info): Remove java type handling.
>         (decl_is_java_type, choose_personality_routine): Remove.
>         (initialize_handler_parm): Don't call choose_personality_routine.
>         (expand_start_catch_block): Don't handle java types.
>         (build_throw): Likewise.
>         * cp-lang.c (cp_eh_personality): Don't handle pragma_java_exceptions.
>         * typeck.c (structural_comptypes): Don't compare TYPE_FOR_JAVA.
>         * call.c (build_over_call): Don't handle TYPE_JAVA_INTERFACE.
>         (java_iface_lookup_fn): Remove.
>         (build_java_interface_fn_ref): Remove.
>         * tree.c (cxx_attribute_table): Remove java_interface.
>         (handle_java_interface_attribute): Remove.
>         * lex.c (pragma_java_exceptions): Remove.
>         (init_cp_pragma): Don't register GCC java_exceptions pragma.
>         (handle_pragma_java_exceptions): Remove.
>         (retrofit_lang_decl): Don't handle lang_name_java.
>         * method.c (implicitly_declare_fn): Don't handle TYPE_FOR_JAVA.
>         * error.c (language_to_string): Don't handle lang_java.
>         * decl.c (record_builtin_java_type): Remove.
>         (initialize_predefined_identifiers): Remove Java.
>         (cxx_init_decl_processing): Remove java_*_type_node.
>         (cp_finish_decl): Don't handle TYPE_FOR_JAVA.
>         (grokfndecl): Likewise.
>         (check_special_function_return_type): Likewise.
>         (grokdeclarator): Don't set TYPE_FOR_JAVA.
>         (grokparms): Don't handle TYPE_FOR_JAVA.
>         (xref_basetypes): Likewise.
>         (check_function_type): Likewise.
>         (finish_constructor_body): Likewise.
>         * mangle.c (write_builtin_type): Don't handle TYPE_FOR_JAVA
>         and java_*_type_node.
>         (write_bare_function_type): Don't handle TYPE_FOR_JAVA.
>         (write_java_integer_type_codes): Remove.
>         * class.c (add_method): Don't handle TYPE_FOR_JAVA.
>         (add_implicitly_declared_members, determine_key_method,
>         finish_struct_1): Likewise.
>         (push_lang_context): Don't handle lang_name_java.
> testsuite/
>         * g++.dg/other/java3.C: Remove.
>         * g++.dg/other/java1.C: Remove.
>         * g++.dg/other/error12.C: Remove.
>         * g++.dg/other/java2.C: Remove.
>         * g++.dg/warn/Wnvdtor.C: Remove.
>         * g++.dg/lookup/java1.C: Remove.
>         * g++.dg/lookup/java2.C: Remove.
>         * g++.dg/ext/pr34829.C: Remove.
>         * g++.dg/ext/java-3.C: Remove.
>         * g++.dg/ext/java-1.C: Remove.
>         * g++.dg/ext/java-2.C: Remove.
>         * g++.old-deja/g++.oliva/dwarf2.C: Remove.
>
> --- gcc/doc/extend.texi.jj      2016-09-29 22:53:11.000000000 +0200
> +++ gcc/doc/extend.texi 2016-10-02 19:27:25.315410894 +0200
> @@ -21392,7 +21392,6 @@ Predefined Macros,cpp,The GNU C Preproce
>  * Namespace Association:: Strong using-directives for namespace association.
>  * Type Traits::         Compiler support for type traits.
>  * C++ Concepts::        Improved support for generic programming.
> -* Java Exceptions::     Tweaking exception handling to work with Java.
>  * Deprecated Features:: Things will disappear from G++.
>  * Backwards Compatibility:: Compatibilities with earlier definitions of C++.
>  @end menu
> @@ -21937,14 +21936,6 @@ Some_Class  B  __attribute__ ((init_prio
>  Note that the particular values of @var{priority} do not matter; only their
>  relative ordering.
>
> -@item java_interface
> -@cindex @code{java_interface} type attribute
> -
> -This type attribute informs C++ that the class is a Java interface.  It may
> -only be applied to classes declared within an @code{extern "Java"} block.
> -Calls to methods declared in this interface are dispatched using GCJ's
> -interface table mechanism, instead of regular virtual table dispatch.
> -
>  @item warn_unused
>  @cindex @code{warn_unused} type attribute
>
> @@ -22252,41 +22243,6 @@ A binary type trait: true whenever the t
>  @end table
>
>
> -@node Java Exceptions
> -@section Java Exceptions
> -
> -The Java language uses a slightly different exception handling model
> -from C++.  Normally, GNU C++ automatically detects when you are
> -writing C++ code that uses Java exceptions, and handle them
> -appropriately.  However, if C++ code only needs to execute destructors
> -when Java exceptions are thrown through it, GCC guesses incorrectly.
> -Sample problematic code is:
> -
> -@smallexample
> -  struct S @{ ~S(); @};
> -  extern void bar();    // @r{is written in Java, and may throw exceptions}
> -  void foo()
> -  @{
> -    S s;
> -    bar();
> -  @}
> -@end smallexample
> -
> -@noindent
> -The usual effect of an incorrect guess is a link failure, complaining of
> -a missing routine called @samp{__gxx_personality_v0}.
> -
> -You can inform the compiler that Java exceptions are to be used in a
> -translation unit, irrespective of what it might think, by writing
> -@samp{@w{#pragma GCC java_exceptions}} at the head of the file.  This
> -@samp{#pragma} must appear before any functions that throw or catch
> -exceptions, or run destructors when exceptions are thrown through them.
> -
> -You cannot mix Java and C++ exceptions in the same translation unit.  It
> -is believed to be safe to throw a C++ exception from one file through
> -another file compiled for the Java exception model, or vice versa, but
> -there may be bugs in this area.
> -
>  @node Deprecated Features
>  @section Deprecated Features
>
> --- gcc/cp/cp-tree.h.jj 2016-09-23 19:37:41.000000000 +0200
> +++ gcc/cp/cp-tree.h    2016-10-02 19:02:25.132842143 +0200
> @@ -201,7 +201,6 @@ operator == (const cp_expr &lhs, tree rh
>     1: TYPE_HAS_USER_CONSTRUCTOR.
>     2: TYPE_HAS_LATE_RETURN_TYPE (in FUNCTION_TYPE, METHOD_TYPE)
>        TYPE_PTRMEMFUNC_FLAG (in RECORD_TYPE)
> -   3: TYPE_FOR_JAVA.
>     4: TYPE_HAS_NONTRIVIAL_DESTRUCTOR
>     5: CLASS_TYPE_P (in RECORD_TYPE and UNION_TYPE)
>        ENUM_FIXED_UNDERLYING_TYPE_P (in ENUMERAL_TYPE)
> @@ -1083,15 +1082,6 @@ union GTY((desc ("cp_tree_node_structure
>
>  enum cp_tree_index
>  {
> -    CPTI_JAVA_BYTE_TYPE,
> -    CPTI_JAVA_SHORT_TYPE,
> -    CPTI_JAVA_INT_TYPE,
> -    CPTI_JAVA_LONG_TYPE,
> -    CPTI_JAVA_FLOAT_TYPE,
> -    CPTI_JAVA_DOUBLE_TYPE,
> -    CPTI_JAVA_CHAR_TYPE,
> -    CPTI_JAVA_BOOLEAN_TYPE,
> -
>      CPTI_WCHAR_DECL,
>      CPTI_VTABLE_ENTRY_TYPE,
>      CPTI_DELTA_TYPE,
> @@ -1129,12 +1119,10 @@ enum cp_tree_index
>
>      CPTI_LANG_NAME_C,
>      CPTI_LANG_NAME_CPLUSPLUS,
> -    CPTI_LANG_NAME_JAVA,
>
>      CPTI_EMPTY_EXCEPT_SPEC,
>      CPTI_NOEXCEPT_TRUE_SPEC,
>      CPTI_NOEXCEPT_FALSE_SPEC,
> -    CPTI_JCLASS,
>      CPTI_TERMINATE,
>      CPTI_CALL_UNEXPECTED,
>      CPTI_ATEXIT_FN_PTR_TYPE,
> @@ -1154,15 +1142,6 @@ enum cp_tree_index
>
>  extern GTY(()) tree cp_global_trees[CPTI_MAX];
>
> -#define java_byte_type_node            cp_global_trees[CPTI_JAVA_BYTE_TYPE]
> -#define java_short_type_node           cp_global_trees[CPTI_JAVA_SHORT_TYPE]
> -#define java_int_type_node             cp_global_trees[CPTI_JAVA_INT_TYPE]
> -#define java_long_type_node            cp_global_trees[CPTI_JAVA_LONG_TYPE]
> -#define java_float_type_node           cp_global_trees[CPTI_JAVA_FLOAT_TYPE]
> -#define java_double_type_node          cp_global_trees[CPTI_JAVA_DOUBLE_TYPE]
> -#define java_char_type_node            cp_global_trees[CPTI_JAVA_CHAR_TYPE]
> -#define java_boolean_type_node         cp_global_trees[CPTI_JAVA_BOOLEAN_TYPE]
> -
>  #define wchar_decl_node                        cp_global_trees[CPTI_WCHAR_DECL]
>  #define vtable_entry_type              cp_global_trees[CPTI_VTABLE_ENTRY_TYPE]
>  /* The type used to represent an offset by which to adjust the `this'
> @@ -1222,16 +1201,12 @@ extern GTY(()) tree cp_global_trees[CPTI
>  #define std_identifier                 cp_global_trees[CPTI_STD_IDENTIFIER]
>  #define lang_name_c                    cp_global_trees[CPTI_LANG_NAME_C]
>  #define lang_name_cplusplus            cp_global_trees[CPTI_LANG_NAME_CPLUSPLUS]
> -#define lang_name_java                 cp_global_trees[CPTI_LANG_NAME_JAVA]
>
>  /* Exception specifier used for throw().  */
>  #define empty_except_spec              cp_global_trees[CPTI_EMPTY_EXCEPT_SPEC]
>  #define noexcept_true_spec             cp_global_trees[CPTI_NOEXCEPT_TRUE_SPEC]
>  #define noexcept_false_spec            cp_global_trees[CPTI_NOEXCEPT_FALSE_SPEC]
>
> -/* If non-NULL, a POINTER_TYPE equivalent to (java::lang::Class*).  */
> -#define jclass_node                    cp_global_trees[CPTI_JCLASS]
> -
>  /* The declaration for `std::terminate'.  */
>  #define terminate_node                 cp_global_trees[CPTI_TERMINATE]
>
> @@ -1549,7 +1524,7 @@ extern bool statement_code_p[MAX_TREE_CO
>
>  #define STATEMENT_CODE_P(CODE) statement_code_p[(int) (CODE)]
>
> -enum languages { lang_c, lang_cplusplus, lang_java };
> +enum languages { lang_c, lang_cplusplus };
>
>  /* Macros to make error reporting functions' lives easier.  */
>  #define TYPE_LINKAGE_IDENTIFIER(NODE) \
> @@ -1599,9 +1574,6 @@ enum languages { lang_c, lang_cplusplus,
>  #define OVERLOAD_TYPE_P(T) \
>    (CLASS_TYPE_P (T) || TREE_CODE (T) == ENUMERAL_TYPE)
>
> -/* True if this a "Java" type, defined in 'extern "Java"'.  */
> -#define TYPE_FOR_JAVA(NODE) TYPE_LANG_FLAG_3 (NODE)
> -
>  /* True if this type is dependent.  This predicate is only valid if
>     TYPE_DEPENDENT_P_VALID is true.  */
>  #define TYPE_DEPENDENT_P(NODE) TYPE_LANG_FLAG_0 (NODE)
> @@ -1715,19 +1687,18 @@ struct GTY(()) lang_type_class {
>    unsigned diamond_shaped : 1;
>    unsigned repeated_base : 1;
>    unsigned being_defined : 1;
> -  unsigned java_interface : 1;
>    unsigned debug_requested : 1;
>    unsigned fields_readonly : 1;
> +  unsigned ptrmemfunc_flag : 1;
>
>    unsigned use_template : 2;
> -  unsigned ptrmemfunc_flag : 1;
>    unsigned was_anonymous : 1;
>    unsigned lazy_default_ctor : 1;
>    unsigned lazy_copy_ctor : 1;
>    unsigned lazy_copy_assign : 1;
>    unsigned lazy_destructor : 1;
> -
>    unsigned has_const_copy_ctor : 1;
> +
>    unsigned has_complex_copy_ctor : 1;
>    unsigned has_complex_copy_assign : 1;
>    unsigned non_aggregate : 1;
> @@ -1735,8 +1706,8 @@ struct GTY(()) lang_type_class {
>    unsigned has_list_ctor : 1;
>    unsigned non_std_layout : 1;
>    unsigned is_literal : 1;
> -
>    unsigned lazy_move_ctor : 1;
> +
>    unsigned lazy_move_assign : 1;
>    unsigned has_complex_move_ctor : 1;
>    unsigned has_complex_move_assign : 1;
> @@ -1749,7 +1720,7 @@ struct GTY(()) lang_type_class {
>    /* There are some bits left to fill out a 32-bit word.  Keep track
>       of this by updating the size of this bitfield whenever you add or
>       remove a flag.  */
> -  unsigned dummy : 3;
> +  unsigned dummy : 4;
>
>    tree primary_base;
>    vec<tree_pair_s, va_gc> *vcall_indices;
> @@ -2011,11 +1982,6 @@ struct GTY(()) lang_type {
>  #define CLASSTYPE_ALIGN_UNIT(NODE) \
>    (CLASSTYPE_ALIGN (NODE) / BITS_PER_UNIT)
>
> -/* True if this a Java interface type, declared with
> -   '__attribute__ ((java_interface))'.  */
> -#define TYPE_JAVA_INTERFACE(NODE) \
> -  (LANG_TYPE_CLASS_CHECK (NODE)->java_interface)
> -
>  /* A vec<tree> of virtual functions which cannot be inherited by
>     derived classes.  When deriving from this type, the derived
>     class must provide its own definition for each of these functions.  */
> @@ -5542,9 +5508,6 @@ concept_template_p (tree t)
>     e.g  "int f(void)".  */
>  extern cp_parameter_declarator *no_parameters;
>
> -/* True if we saw "#pragma GCC java_exceptions".  */
> -extern bool pragma_java_exceptions;
> -
>  /* in call.c */
>  extern bool check_dtor_name                    (tree, tree);
>  int magic_varargs_p                            (tree);
> @@ -5844,7 +5807,6 @@ extern tree cxx_maybe_build_cleanup               (tr
>  /* in decl2.c */
>  extern void note_mangling_alias                        (tree, tree);
>  extern void generate_mangling_aliases          (void);
> -extern bool check_java_method                  (tree);
>  extern tree build_memfn_type                   (tree, tree, cp_cv_quals, cp_ref_qualifier);
>  extern tree build_pointer_ptrmemfn_type        (tree);
>  extern tree change_return_type                 (tree, tree);
> @@ -5988,7 +5950,6 @@ extern tree build_vec_delete                      (tree, tr
>                                                  tsubst_flags_t);
>  extern tree create_temporary_var               (tree);
>  extern void initialize_vtbl_ptrs               (tree);
> -extern tree build_java_class_ref               (tree);
>  extern tree scalar_constant_value              (tree);
>  extern tree decl_really_constant_value         (tree);
>  extern int diagnose_uninitialized_cst_or_ref_member (tree, bool, bool);
> --- gcc/cp/name-lookup.c.jj     2016-09-23 11:42:40.000000000 +0200
> +++ gcc/cp/name-lookup.c        2016-10-02 19:22:27.009077079 +0200
> @@ -6054,9 +6054,6 @@ pushtag_1 (tree name, tree type, tag_sco
>               && b->level_chain->kind == sk_class))
>         in_class = 1;
>
> -      if (current_lang_name == lang_name_java)
> -       TYPE_FOR_JAVA (type) = 1;
> -
>        tdef = create_implicit_typedef (name, type);
>        DECL_CONTEXT (tdef) = FROB_CONTEXT (context);
>        if (scope == ts_within_enclosing_non_class)
> --- gcc/cp/decl2.c.jj   2016-09-14 23:49:03.000000000 +0200
> +++ gcc/cp/decl2.c      2016-10-02 19:08:41.422219936 +0200
> @@ -63,7 +63,6 @@ typedef struct priority_info_s {
>
>  static void mark_vtable_entries (tree);
>  static bool maybe_emit_vtables (tree);
> -static bool acceptable_java_type (tree);
>  static tree start_objects (int, int);
>  static void finish_objects (int, int, tree);
>  static tree start_static_storage_duration_function (unsigned);
> @@ -541,80 +540,6 @@ check_member_template (tree tmpl)
>      error ("template declaration of %q#D", decl);
>  }
>
> -/* Return true iff TYPE is a valid Java parameter or return type.  */
> -
> -static bool
> -acceptable_java_type (tree type)
> -{
> -  if (type == error_mark_node)
> -    return false;
> -
> -  if (VOID_TYPE_P (type) || TYPE_FOR_JAVA (type))
> -    return true;
> -  if (TYPE_PTR_P (type) || TREE_CODE (type) == REFERENCE_TYPE)
> -    {
> -      type = TREE_TYPE (type);
> -      if (TREE_CODE (type) == RECORD_TYPE)
> -       {
> -         tree args;  int i;
> -         if (! TYPE_FOR_JAVA (type))
> -           return false;
> -         if (! CLASSTYPE_TEMPLATE_INFO (type))
> -           return true;
> -         args = CLASSTYPE_TI_ARGS (type);
> -         i = TREE_VEC_LENGTH (args);
> -         while (--i >= 0)
> -           {
> -             type = TREE_VEC_ELT (args, i);
> -             if (TYPE_PTR_P (type))
> -               type = TREE_TYPE (type);
> -             if (! TYPE_FOR_JAVA (type))
> -               return false;
> -           }
> -         return true;
> -       }
> -    }
> -  return false;
> -}
> -
> -/* For a METHOD in a Java class CTYPE, return true if
> -   the parameter and return types are valid Java types.
> -   Otherwise, print appropriate error messages, and return false.  */
> -
> -bool
> -check_java_method (tree method)
> -{
> -  bool jerr = false;
> -  tree arg_types = TYPE_ARG_TYPES (TREE_TYPE (method));
> -  tree ret_type = TREE_TYPE (TREE_TYPE (method));
> -
> -  if (!acceptable_java_type (ret_type))
> -    {
> -      error ("Java method %qD has non-Java return type %qT",
> -            method, ret_type);
> -      jerr = true;
> -    }
> -
> -  arg_types = TREE_CHAIN (arg_types);
> -  if (DECL_HAS_IN_CHARGE_PARM_P (method))
> -    arg_types = TREE_CHAIN (arg_types);
> -  if (DECL_HAS_VTT_PARM_P (method))
> -    arg_types = TREE_CHAIN (arg_types);
> -
> -  for (; arg_types != NULL_TREE; arg_types = TREE_CHAIN (arg_types))
> -    {
> -      tree type = TREE_VALUE (arg_types);
> -      if (!acceptable_java_type (type))
> -       {
> -          if (type != error_mark_node)
> -           error ("Java method %qD has non-Java parameter type %qT",
> -                  method, type);
> -         jerr = true;
> -       }
> -    }
> -  return !jerr;
> -}
> -
>  /* Sanity check: report error if this function FUNCTION is not
>     really a member of the class (CTYPE) it is supposed to belong to.
>     TEMPLATE_PARMS is used to specify the template parameters of a member
> @@ -2873,10 +2798,8 @@ import_export_decl (tree decl)
>      {
>        class_type = DECL_CONTEXT (decl);
>        import_export_class (class_type);
> -      if (TYPE_FOR_JAVA (class_type))
> -       import_p = true;
> -      else if (CLASSTYPE_INTERFACE_KNOWN (class_type)
> -              && CLASSTYPE_INTERFACE_ONLY (class_type))
> +      if (CLASSTYPE_INTERFACE_KNOWN (class_type)
> +         && CLASSTYPE_INTERFACE_ONLY (class_type))
>         import_p = true;
>        else if ((!flag_weak || TARGET_WEAK_NOT_IN_ARCHIVE_TOC)
>                && !CLASSTYPE_USE_TEMPLATE (class_type)
> @@ -4080,42 +4003,6 @@ generate_ctor_and_dtor_functions_for_pri
>    return 0;
>  }
>
> -/* Java requires that we be able to reference a local address for a
> -   method, and not be confused by PLT entries.  If supported, create a
> -   hidden alias for all such methods.  */
> -
> -static void
> -build_java_method_aliases (void)
> -{
> -#ifndef HAVE_GAS_HIDDEN
> -  return;
> -#endif
> -
> -  struct cgraph_node *node;
> -  FOR_EACH_FUNCTION (node)
> -    {
> -      tree fndecl = node->decl;
> -
> -      if (DECL_CLASS_SCOPE_P (fndecl)
> -         && TYPE_FOR_JAVA (DECL_CONTEXT (fndecl))
> -         && TARGET_USE_LOCAL_THUNK_ALIAS_P (fndecl))
> -       {
> -         /* Mangle the name in a predictable way; we need to reference
> -            this from a java compiled object file.  */
> -         tree oid = DECL_ASSEMBLER_NAME (fndecl);
> -         const char *oname = IDENTIFIER_POINTER (oid);
> -         gcc_assert (oname[0] == '_' && oname[1] == 'Z');
> -         char *nname = ACONCAT (("_ZGA", oname + 2, NULL));
> -
> -         tree alias = make_alias_for (fndecl, get_identifier (nname));
> -         TREE_PUBLIC (alias) = 1;
> -         DECL_VISIBILITY (alias) = VISIBILITY_HIDDEN;
> -
> -         cgraph_node::create_same_body_alias (alias, fndecl);
> -       }
> -    }
> -}
> -
>  /* Return C++ property of T, based on given operation OP.  */
>
>  static int
> @@ -4908,9 +4795,6 @@ c_parse_final_cleanups (void)
>       linkage now.  */
>    pop_lang_context ();
>
> -  /* Generate Java hidden aliases.  */
> -  build_java_method_aliases ();
> -
>    if (flag_vtable_verify)
>      {
>        vtv_recover_class_info ();
> @@ -5066,7 +4950,7 @@ possibly_inlined_p (tree decl)
>    gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
>    if (DECL_UNINLINABLE (decl))
>      return false;
> -  if (!optimize || pragma_java_exceptions)
> +  if (!optimize)
>      return DECL_DECLARED_INLINE_P (decl);
>    /* When optimizing, we might inline everything when flatten
>       attribute or heuristics inlining for size or autoinlining
> --- gcc/cp/init.c.jj    2016-09-27 09:46:10.000000000 +0200
> +++ gcc/cp/init.c       2016-10-02 19:19:59.709887386 +0200
> @@ -2622,7 +2622,6 @@ build_new_1 (vec<tree, va_gc> **placemen
>    tree alloc_fn;
>    tree cookie_expr, init_expr;
>    int nothrow, check_new;
> -  int use_java_new = 0;
>    /* If non-NULL, the number of extra bytes to allocate at the
>       beginning of the storage allocated for an array-new expression in
>       order to store the number of elements.  */
> @@ -2866,149 +2865,97 @@ build_new_1 (vec<tree, va_gc> **placemen
>    bool member_new_p = false;
>
>    /* Allocate the object.  */
> -  if (vec_safe_is_empty (*placement) && TYPE_FOR_JAVA (elt_type))
> -    {
> -      tree class_addr;
> -      tree class_decl;
> -      static const char alloc_name[] = "_Jv_AllocObject";
> +  tree fnname;
> +  tree fns;
>
> -      if (!MAYBE_CLASS_TYPE_P (elt_type))
> -       {
> -         error ("%qT isn%'t a valid Java class type", elt_type);
> -         return error_mark_node;
> -       }
> +  fnname = ansi_opname (array_p ? VEC_NEW_EXPR : NEW_EXPR);
>
> -      class_decl = build_java_class_ref (elt_type);
> -      if (class_decl == error_mark_node)
> -       return error_mark_node;
> -
> -      use_java_new = 1;
> -      if (!get_global_value_if_present (get_identifier (alloc_name),
> -                                       &alloc_fn))
> +  member_new_p = !globally_qualified_p
> +                && CLASS_TYPE_P (elt_type)
> +                && (array_p
> +                    ? TYPE_HAS_ARRAY_NEW_OPERATOR (elt_type)
> +                    : TYPE_HAS_NEW_OPERATOR (elt_type));
> +
> +  if (member_new_p)
> +    {
> +      /* Use a class-specific operator new.  */
> +      /* If a cookie is required, add some extra space.  */
> +      if (array_p && TYPE_VEC_NEW_USES_COOKIE (elt_type))
> +       size = size_binop (PLUS_EXPR, size, cookie_size);
> +      else
>         {
> -          if (complain & tf_error)
> -            error ("call to Java constructor with %qs undefined", alloc_name);
> -         return error_mark_node;
> -       }
> -      else if (really_overloaded_fn (alloc_fn))
> +         cookie_size = NULL_TREE;
> +         /* No size arithmetic necessary, so the size check is
> +            not needed. */
> +         if (outer_nelts_check != NULL && inner_size == 1)
> +           outer_nelts_check = NULL_TREE;
> +       }
> +      /* Perform the overflow check.  */
> +      tree errval = TYPE_MAX_VALUE (sizetype);
> +      if (cxx_dialect >= cxx11 && flag_exceptions)
> +       errval = throw_bad_array_new_length ();
> +      if (outer_nelts_check != NULL_TREE)
> +       size = fold_build3 (COND_EXPR, sizetype, outer_nelts_check,
> +                           size, errval);
> +      /* Create the argument list.  */
> +      vec_safe_insert (*placement, 0, size);
> +      /* Do name-lookup to find the appropriate operator.  */
> +      fns = lookup_fnfields (elt_type, fnname, /*protect=*/2);
> +      if (fns == NULL_TREE)
>         {
> -          if (complain & tf_error)
> -            error ("%qD should never be overloaded", alloc_fn);
> +         if (complain & tf_error)
> +           error ("no suitable %qD found in class %qT", fnname, elt_type);
>           return error_mark_node;
>         }
> -      alloc_fn = OVL_CURRENT (alloc_fn);
> -      if (TREE_CODE (alloc_fn) != FUNCTION_DECL
> -         || TREE_CODE (TREE_TYPE (alloc_fn)) != FUNCTION_TYPE
> -         || !POINTER_TYPE_P (TREE_TYPE (TREE_TYPE (alloc_fn))))
> +      if (TREE_CODE (fns) == TREE_LIST)
>         {
>           if (complain & tf_error)
> -           error ("%qD is not a function returning a pointer", alloc_fn);
> +           {
> +             error ("request for member %qD is ambiguous", fnname);
> +             print_candidates (fns);
> +           }
>           return error_mark_node;
>         }
> -      class_addr = build1 (ADDR_EXPR, jclass_node, class_decl);
> -      alloc_call = cp_build_function_call_nary (alloc_fn, complain,
> -                                               class_addr, NULL_TREE);
> -    }
> -  else if (TYPE_FOR_JAVA (elt_type) && MAYBE_CLASS_TYPE_P (elt_type))
> -    {
> -      error ("Java class %q#T object allocated using placement new", elt_type);
> -      return error_mark_node;
> +      tree dummy = build_dummy_object (elt_type);
> +      alloc_call = NULL_TREE;
> +      if (align_arg)
> +       {
> +         vec<tree, va_gc> *align_args
> +           = vec_copy_and_insert (*placement, align_arg, 1);
> +         alloc_call
> +           = build_new_method_call (dummy, fns, &align_args,
> +                                    /*conversion_path=*/NULL_TREE,
> +                                    LOOKUP_NORMAL, &alloc_fn, tf_none);
> +         /* If no matching function is found and the allocated object type
> +            has new-extended alignment, the alignment argument is removed
> +            from the argument list, and overload resolution is performed
> +            again.  */
> +         if (alloc_call == error_mark_node)
> +           alloc_call = NULL_TREE;
> +       }
> +      if (!alloc_call)
> +       alloc_call = build_new_method_call (dummy, fns, placement,
> +                                           /*conversion_path=*/NULL_TREE,
> +                                           LOOKUP_NORMAL,
> +                                           &alloc_fn, complain);
>      }
>    else
>      {
> -      tree fnname;
> -      tree fns;
> -
> -      fnname = ansi_opname (array_p ? VEC_NEW_EXPR : NEW_EXPR);
> -
> -      member_new_p = !globally_qualified_p
> -         && CLASS_TYPE_P (elt_type)
> -         && (array_p
> -             ? TYPE_HAS_ARRAY_NEW_OPERATOR (elt_type)
> -           : TYPE_HAS_NEW_OPERATOR (elt_type));
> -
> -      if (member_new_p)
> -       {
> -         /* Use a class-specific operator new.  */
> -         /* If a cookie is required, add some extra space.  */
> -         if (array_p && TYPE_VEC_NEW_USES_COOKIE (elt_type))
> -           size = size_binop (PLUS_EXPR, size, cookie_size);
> -         else
> -           {
> -             cookie_size = NULL_TREE;
> -             /* No size arithmetic necessary, so the size check is
> -                not needed. */
> -             if (outer_nelts_check != NULL && inner_size == 1)
> -               outer_nelts_check = NULL_TREE;
> -           }
> -         /* Perform the overflow check.  */
> -         tree errval = TYPE_MAX_VALUE (sizetype);
> -         if (cxx_dialect >= cxx11 && flag_exceptions)
> -           errval = throw_bad_array_new_length ();
> -         if (outer_nelts_check != NULL_TREE)
> -            size = fold_build3 (COND_EXPR, sizetype, outer_nelts_check,
> -                                size, errval);
> -         /* Create the argument list.  */
> -         vec_safe_insert (*placement, 0, size);
> -         /* Do name-lookup to find the appropriate operator.  */
> -         fns = lookup_fnfields (elt_type, fnname, /*protect=*/2);
> -         if (fns == NULL_TREE)
> -           {
> -              if (complain & tf_error)
> -                error ("no suitable %qD found in class %qT", fnname, elt_type);
> -             return error_mark_node;
> -           }
> -         if (TREE_CODE (fns) == TREE_LIST)
> -           {
> -              if (complain & tf_error)
> -                {
> -                  error ("request for member %qD is ambiguous", fnname);
> -                  print_candidates (fns);
> -                }
> -             return error_mark_node;
> -           }
> -         tree dummy = build_dummy_object (elt_type);
> -         alloc_call = NULL_TREE;
> -         if (align_arg)
> -           {
> -             vec<tree, va_gc> *align_args
> -               = vec_copy_and_insert (*placement, align_arg, 1);
> -             alloc_call
> -               = build_new_method_call (dummy, fns, &align_args,
> -                                        /*conversion_path=*/NULL_TREE,
> -                                        LOOKUP_NORMAL, &alloc_fn, tf_none);
> -             /* If no matching function is found and the allocated object type
> -                has new-extended alignment, the alignment argument is removed
> -                from the argument list, and overload resolution is performed
> -                again.  */
> -             if (alloc_call == error_mark_node)
> -               alloc_call = NULL_TREE;
> -           }
> -         if (!alloc_call)
> -           alloc_call = build_new_method_call (dummy, fns, placement,
> -                                               /*conversion_path=*/NULL_TREE,
> -                                               LOOKUP_NORMAL,
> -                                               &alloc_fn, complain);
> +      /* Use a global operator new.  */
> +      /* See if a cookie might be required.  */
> +      if (!(array_p && TYPE_VEC_NEW_USES_COOKIE (elt_type)))
> +       {
> +         cookie_size = NULL_TREE;
> +         /* No size arithmetic necessary, so the size check is
> +            not needed. */
> +         if (outer_nelts_check != NULL && inner_size == 1)
> +           outer_nelts_check = NULL_TREE;
>         }
> -      else
> -       {
> -         /* Use a global operator new.  */
> -         /* See if a cookie might be required.  */
> -         if (!(array_p && TYPE_VEC_NEW_USES_COOKIE (elt_type)))
> -           {
> -             cookie_size = NULL_TREE;
> -             /* No size arithmetic necessary, so the size check is
> -                not needed. */
> -             if (outer_nelts_check != NULL && inner_size == 1)
> -               outer_nelts_check = NULL_TREE;
> -           }
>
> -         alloc_call = build_operator_new_call (fnname, placement,
> -                                               &size, &cookie_size,
> -                                               align_arg,
> -                                               outer_nelts_check,
> -                                               &alloc_fn, complain);
> -       }
> +      alloc_call = build_operator_new_call (fnname, placement,
> +                                           &size, &cookie_size,
> +                                           align_arg, outer_nelts_check,
> +                                           &alloc_fn, complain);
>      }
>
>    if (alloc_call == error_mark_node)
> @@ -3111,7 +3058,7 @@ build_new_1 (vec<tree, va_gc> **placemen
>       So check for a null exception spec on the op new we just called.  */
>
>    nothrow = TYPE_NOTHROW_P (TREE_TYPE (alloc_fn));
> -  check_new = (flag_check_new || nothrow) && ! use_java_new;
> +  check_new = (flag_check_new || nothrow);
>
>    if (cookie_size)
>      {
> @@ -3290,7 +3237,7 @@ build_new_1 (vec<tree, va_gc> **placemen
>          unambiguous matching deallocation function can be found,
>          propagating the exception does not cause the object's memory to be
>          freed.  */
> -      if (flag_exceptions && ! use_java_new)
> +      if (flag_exceptions)
>         {
>           enum tree_code dcode = array_p ? VEC_DELETE_EXPR : DELETE_EXPR;
>           tree cleanup;
> @@ -3531,59 +3478,6 @@ build_new (vec<tree, va_gc> **placement,
>
>    return rval;
>  }
> -
> -/* Given a Java class, return a decl for the corresponding java.lang.Class.  */
> -
> -tree
> -build_java_class_ref (tree type)
> -{
> -  tree name = NULL_TREE, class_decl;
> -  static tree CL_suffix = NULL_TREE;
> -  if (CL_suffix == NULL_TREE)
> -    CL_suffix = get_identifier("class$");
> -  if (jclass_node == NULL_TREE)
> -    {
> -      jclass_node = IDENTIFIER_GLOBAL_VALUE (get_identifier ("jclass"));
> -      if (jclass_node == NULL_TREE)
> -       {
> -         error ("call to Java constructor, while %<jclass%> undefined");
> -         return error_mark_node;
> -       }
> -      jclass_node = TREE_TYPE (jclass_node);
> -    }
> -
> -  /* Mangle the class$ field.  */
> -  {
> -    tree field;
> -    for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field))
> -      if (DECL_NAME (field) == CL_suffix)
> -       {
> -         mangle_decl (field);
> -         name = DECL_ASSEMBLER_NAME (field);
> -         break;
> -       }
> -    if (!field)
> -      {
> -       error ("can%'t find %<class$%> in %qT", type);
> -       return error_mark_node;
> -      }
> -  }
> -
> -  class_decl = IDENTIFIER_GLOBAL_VALUE (name);
> -  if (class_decl == NULL_TREE)
> -    {
> -      class_decl = build_decl (input_location,
> -                              VAR_DECL, name, TREE_TYPE (jclass_node));
> -      TREE_STATIC (class_decl) = 1;
> -      DECL_EXTERNAL (class_decl) = 1;
> -      TREE_PUBLIC (class_decl) = 1;
> -      DECL_ARTIFICIAL (class_decl) = 1;
> -      DECL_IGNORED_P (class_decl) = 1;
> -      pushdecl_top_level (class_decl);
> -      make_decl_rtl (class_decl);
> -    }
> -  return class_decl;
> -}
>
>  static tree
>  build_vec_delete_1 (tree base, tree maxindex, tree type,
> --- gcc/cp/pt.c.jj      2016-09-26 12:06:41.000000000 +0200
> +++ gcc/cp/pt.c 2016-10-02 19:22:54.431740054 +0200
> @@ -893,7 +893,6 @@ maybe_new_partial_specialization (tree t
>        // for the newly declared specialization.
>        tree t = make_class_type (TREE_CODE (type));
>        CLASSTYPE_DECLARED_CLASS (t) = CLASSTYPE_DECLARED_CLASS (type);
> -      TYPE_FOR_JAVA (t) = TYPE_FOR_JAVA (type);
>        SET_TYPE_TEMPLATE_INFO (t, build_template_info (tmpl, args));
>
>        /* We only need a separate type node for storing the definition of this
> @@ -8453,7 +8452,6 @@ lookup_template_class_1 (tree d1, tree a
>           CLASSTYPE_DECLARED_CLASS (t)
>             = CLASSTYPE_DECLARED_CLASS (template_type);
>           SET_CLASSTYPE_IMPLICIT_INSTANTIATION (t);
> -         TYPE_FOR_JAVA (t) = TYPE_FOR_JAVA (template_type);
>
>           /* A local class.  Make sure the decl gets registered properly.  */
>           if (context == current_function_decl)
> @@ -9918,7 +9916,6 @@ instantiate_class_template_1 (tree type)
>    TYPE_PACKED (type) = TYPE_PACKED (pattern);
>    SET_TYPE_ALIGN (type, TYPE_ALIGN (pattern));
>    TYPE_USER_ALIGN (type) = TYPE_USER_ALIGN (pattern);
> -  TYPE_FOR_JAVA (type) = TYPE_FOR_JAVA (pattern); /* For libjava's JArray<T> */
>    if (ANON_AGGR_TYPE_P (pattern))
>      SET_ANON_AGGR_TYPE_P (type);
>    if (CLASSTYPE_VISIBILITY_SPECIFIED (pattern))
> --- gcc/cp/except.c.jj  2016-09-29 22:53:53.000000000 +0200
> +++ gcc/cp/except.c     2016-10-02 19:12:42.476258912 +0200
> @@ -35,7 +35,6 @@ static tree prepare_eh_type (tree);
>  static tree do_begin_catch (void);
>  static int dtor_nothrow (tree);
>  static tree do_end_catch (tree);
> -static bool decl_is_java_type (tree decl, int err);
>  static void initialize_handler_parm (tree, tree);
>  static tree do_allocate_exception (tree);
>  static tree wrap_cleanups_r (tree *, int *, void *);
> @@ -103,17 +102,10 @@ prepare_eh_type (tree type)
>  tree
>  eh_type_info (tree type)
>  {
> -  tree exp;
> -
>    if (type == NULL_TREE || type == error_mark_node)
>      return type;
>
> -  if (decl_is_java_type (type, 0))
> -    exp = build_java_class_ref (TREE_TYPE (type));
> -  else
> -    exp = get_tinfo_decl (type);
> -
> -  return exp;
> +  return get_tinfo_decl (type);
>  }
>
>  /* Build the address of a typeinfo decl for use in the runtime
> @@ -262,107 +254,6 @@ push_eh_cleanup (tree type)
>    finish_decl_cleanup (NULL_TREE, do_end_catch (type));
>  }
>
> -/* Return nonzero value if DECL is a Java type suitable for catch or
> -   throw.  */
> -
> -static bool
> -decl_is_java_type (tree decl, int err)
> -{
> -  bool r = (TYPE_PTR_P (decl)
> -           && TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE
> -           && TYPE_FOR_JAVA (TREE_TYPE (decl)));
> -
> -  if (err)
> -    {
> -      if (TREE_CODE (decl) == REFERENCE_TYPE
> -         && TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE
> -         && TYPE_FOR_JAVA (TREE_TYPE (decl)))
> -       {
> -         /* Can't throw a reference.  */
> -         error ("type %qT is disallowed in Java %<throw%> or %<catch%>",
> -                decl);
> -       }
> -
> -      if (r)
> -       {
> -         tree jthrow_node
> -           = IDENTIFIER_GLOBAL_VALUE (get_identifier ("jthrowable"));
> -
> -         if (jthrow_node == NULL_TREE)
> -           fatal_error
> -             (input_location,
> -              "call to Java %<catch%> or %<throw%> with %<jthrowable%> undefined");
> -
> -         jthrow_node = TREE_TYPE (TREE_TYPE (jthrow_node));
> -
> -         if (! DERIVED_FROM_P (jthrow_node, TREE_TYPE (decl)))
> -           {
> -             /* Thrown object must be a Throwable.  */
> -             error ("type %qT is not derived from %<java::lang::Throwable%>",
> -                    TREE_TYPE (decl));
> -           }
> -       }
> -    }
> -
> -  return r;
> -}
> -
> -/* Select the personality routine to be used for exception handling,
> -   or issue an error if we need two different ones in the same
> -   translation unit.
> -   ??? At present DECL_FUNCTION_PERSONALITY is set via
> -   LANG_HOOKS_EH_PERSONALITY.  Should it be done here instead?  */
> -void
> -choose_personality_routine (enum languages lang)
> -{
> -  static enum {
> -    chose_none,
> -    chose_cpp,
> -    chose_java,
> -    gave_error
> -  } state;
> -
> -  switch (state)
> -    {
> -    case gave_error:
> -      return;
> -
> -    case chose_cpp:
> -      if (lang != lang_cplusplus)
> -       goto give_error;
> -      return;
> -
> -    case chose_java:
> -      if (lang != lang_java)
> -       goto give_error;
> -      return;
> -
> -    case chose_none:
> -      ; /* Proceed to language selection.  */
> -    }
> -
> -  switch (lang)
> -    {
> -    case lang_cplusplus:
> -      state = chose_cpp;
> -      break;
> -
> -    case lang_java:
> -      state = chose_java;
> -      terminate_node = builtin_decl_explicit (BUILT_IN_ABORT);
> -      pragma_java_exceptions = true;
> -      break;
> -
> -    default:
> -      gcc_unreachable ();
> -    }
> -  return;
> -
> - give_error:
> -  error ("mixing C++ and Java catches in a single translation unit");
> -  state = gave_error;
> -}
> -
>  /* Wrap EXPR in a MUST_NOT_THROW_EXPR expressing that EXPR must
>     not throw any exceptions if COND is true.  A condition of
>     NULL_TREE is treated as 'true'.  */
> @@ -408,9 +299,6 @@ initialize_handler_parm (tree decl, tree
>    if (!POINTER_TYPE_P (init_type))
>      init_type = build_reference_type (init_type);
>
> -  choose_personality_routine (decl_is_java_type (init_type, 0)
> -                             ? lang_java : lang_cplusplus);
> -
>    /* Since pointers are passed by value, initialize a reference to
>       pointer catch parm with the address of the temporary.  */
>    if (TREE_CODE (init_type) == REFERENCE_TYPE
> @@ -490,22 +378,6 @@ expand_start_catch_block (tree decl)
>    else
>      type = NULL_TREE;
>
> -  if (decl && decl_is_java_type (type, 1))
> -    {
> -      /* Java only passes object via pointer and doesn't require
> -        adjusting.  The java object is immediately before the
> -        generic exception header.  */
> -      exp = build_exc_ptr ();
> -      exp = build1 (NOP_EXPR, build_pointer_type (type), exp);
> -      exp = fold_build_pointer_plus (exp,
> -                   fold_build1_loc (input_location,
> -                                    NEGATE_EXPR, sizetype,
> -                                    TYPE_SIZE_UNIT (TREE_TYPE (exp))));
> -      exp = cp_build_indirect_ref (exp, RO_NULL, tf_warning_or_error);
> -      initialize_handler_parm (decl, exp);
> -      return type;
> -    }
> -
>    /* Call __cxa_end_catch at the end of processing the exception.  */
>    push_eh_cleanup (type);
>
> @@ -738,27 +610,7 @@ build_throw (tree exp)
>    if (! doing_eh ())
>      return error_mark_node;
>
> -  if (exp && decl_is_java_type (TREE_TYPE (exp), 1))
> -    {
> -      tree fn = get_identifier ("_Jv_Throw");
> -      if (!get_global_value_if_present (fn, &fn))
> -       {
> -         /* Declare void _Jv_Throw (void *).  */
> -         tree tmp;
> -         tmp = build_function_type_list (ptr_type_node,
> -                                         ptr_type_node, NULL_TREE);
> -         fn = push_throw_library_fn (fn, tmp);
> -       }
> -      else if (really_overloaded_fn (fn))
> -       {
> -         error ("%qD should never be overloaded", fn);
> -         return error_mark_node;
> -       }
> -      fn = OVL_CURRENT (fn);
> -      exp = cp_build_function_call_nary (fn, tf_warning_or_error,
> -                                        exp, NULL_TREE);
> -    }
> -  else if (exp)
> +  if (exp)
>      {
>        tree throw_type;
>        tree temp_type;
> --- gcc/cp/cp-lang.c.jj 2016-01-04 14:55:57.000000000 +0100
> +++ gcc/cp/cp-lang.c    2016-10-02 19:25:15.506006252 +0200
> @@ -137,10 +137,7 @@ static tree
>  cp_eh_personality (void)
>  {
>    if (!cp_eh_personality_decl)
> -    {
> -      const char *lang = (pragma_java_exceptions ? "gcj" : "gxx");
> -      cp_eh_personality_decl = build_personality_function (lang);
> -    }
> +    cp_eh_personality_decl = build_personality_function ("gxx");
>
>    return cp_eh_personality_decl;
>  }
> --- gcc/cp/typeck.c.jj  2016-09-26 12:06:41.000000000 +0200
> +++ gcc/cp/typeck.c     2016-10-02 19:23:59.429941226 +0200
> @@ -1226,8 +1226,6 @@ structural_comptypes (tree t1, tree t2,
>         || TREE_CODE (t1) == METHOD_TYPE)
>        && type_memfn_rqual (t1) != type_memfn_rqual (t2))
>      return false;
> -  if (TYPE_FOR_JAVA (t1) != TYPE_FOR_JAVA (t2))
> -    return false;
>
>    /* Allow for two different type nodes which have essentially the same
>       definition.  Note that we already checked for equality of the type
> --- gcc/cp/call.c.jj    2016-09-23 09:32:09.000000000 +0200
> +++ gcc/cp/call.c       2016-10-02 19:03:40.001922477 +0200
> @@ -146,7 +146,6 @@ static int joust (struct z_candidate *,
>                   tsubst_flags_t);
>  static int compare_ics (conversion *, conversion *);
>  static tree build_over_call (struct z_candidate *, int, tsubst_flags_t);
> -static tree build_java_interface_fn_ref (tree, tree);
>  #define convert_like(CONV, EXPR, COMPLAIN)                     \
>    convert_like_real ((CONV), (EXPR), NULL_TREE, 0, 0,          \
>                      /*issue_conversion_warnings=*/true,        \
> @@ -7935,10 +7934,7 @@ build_over_call (struct z_candidate *can
>        if (TREE_SIDE_EFFECTS (argarray[0]))
>         argarray[0] = save_expr (argarray[0]);
>        t = build_pointer_type (TREE_TYPE (fn));
> -      if (DECL_CONTEXT (fn) && TYPE_JAVA_INTERFACE (DECL_CONTEXT (fn)))
> -       fn = build_java_interface_fn_ref (fn, argarray[0]);
> -      else
> -       fn = build_vfn_ref (argarray[0], DECL_VINDEX (fn));
> +      fn = build_vfn_ref (argarray[0], DECL_VINDEX (fn));
>        TREE_TYPE (fn) = t;
>      }
>    else
> @@ -8045,67 +8041,6 @@ build_cxx_call (tree fn, int nargs, tree
>    return convert_from_reference (fn);
>  }
>
> -static GTY(()) tree java_iface_lookup_fn;
> -
> -/* Make an expression which yields the address of the Java interface
> -   method FN.  This is achieved by generating a call to libjava's
> -   _Jv_LookupInterfaceMethodIdx().  */
> -
> -static tree
> -build_java_interface_fn_ref (tree fn, tree instance)
> -{
> -  tree lookup_fn, method, idx;
> -  tree klass_ref, iface, iface_ref;
> -  int i;
> -
> -  if (!java_iface_lookup_fn)
> -    {
> -      tree ftype = build_function_type_list (ptr_type_node,
> -                                            ptr_type_node, ptr_type_node,
> -                                            java_int_type_node, NULL_TREE);
> -      java_iface_lookup_fn
> -       = add_builtin_function ("_Jv_LookupInterfaceMethodIdx", ftype,
> -                               0, NOT_BUILT_IN, NULL, NULL_TREE);
> -    }
> -
> -  /* Look up the pointer to the runtime java.lang.Class object for `instance'.
> -     This is the first entry in the vtable.  */
> -  klass_ref = build_vtbl_ref (cp_build_indirect_ref (instance, RO_NULL,
> -                                                     tf_warning_or_error),
> -                             integer_zero_node);
> -
> -  /* Get the java.lang.Class pointer for the interface being called.  */
> -  iface = DECL_CONTEXT (fn);
> -  iface_ref = lookup_field (iface, get_identifier ("class$"), 0, false);
> -  if (!iface_ref || !VAR_P (iface_ref)
> -      || DECL_CONTEXT (iface_ref) != iface)
> -    {
> -      error ("could not find class$ field in java interface type %qT",
> -               iface);
> -      return error_mark_node;
> -    }
> -  iface_ref = build_address (iface_ref);
> -  iface_ref = convert (build_pointer_type (iface), iface_ref);
> -
> -  /* Determine the itable index of FN.  */
> -  i = 1;
> -  for (method = TYPE_METHODS (iface); method; method = DECL_CHAIN (method))
> -    {
> -      if (!DECL_VIRTUAL_P (method))
> -       continue;
> -      if (fn == method)
> -       break;
> -      i++;
> -    }
> -  idx = build_int_cst (NULL_TREE, i);
> -
> -  lookup_fn = build1 (ADDR_EXPR,
> -                     build_pointer_type (TREE_TYPE (java_iface_lookup_fn)),
> -                     java_iface_lookup_fn);
> -  return build_call_nary (ptr_type_node, lookup_fn,
> -                         3, klass_ref, iface_ref, idx);
> -}
> -
>  /* Returns the value to use for the in-charge parameter when making a
>     call to a function with the indicated NAME.
>
> --- gcc/cp/tree.c.jj    2016-09-13 10:43:56.000000000 +0200
> +++ gcc/cp/tree.c       2016-10-02 19:23:37.150215044 +0200
> @@ -42,7 +42,6 @@ static tree count_trees_r (tree *, int *
>  static tree verify_stmt_tree_r (tree *, int *, void *);
>  static tree build_local_temp (tree);
>
> -static tree handle_java_interface_attribute (tree *, tree, tree, int, bool *);
>  static tree handle_init_priority_attribute (tree *, tree, tree, int, bool *);
>  static tree handle_abi_tag_attribute (tree *, tree, tree, int, bool *);
>
> @@ -3638,8 +3637,6 @@ const struct attribute_spec cxx_attribut
>  {
>    /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
>         affects_type_identity } */
> -  { "java_interface", 0, 0, false, false, false,
> -    handle_java_interface_attribute, false },
>    { "init_priority",  1, 1, true,  false, false,
>      handle_init_priority_attribute, false },
>    { "abi_tag", 1, -1, false, false, false,
> @@ -3659,31 +3656,6 @@ const struct attribute_spec std_attribut
>    { NULL,            0, 0, false, false, false, NULL, false }
>  };
>
> -/* Handle a "java_interface" attribute; arguments as in
> -   struct attribute_spec.handler.  */
> -static tree
> -handle_java_interface_attribute (tree* node,
> -                                tree name,
> -                                tree /*args*/,
> -                                int flags,
> -                                bool* no_add_attrs)
> -{
> -  if (DECL_P (*node)
> -      || !CLASS_TYPE_P (*node)
> -      || !TYPE_FOR_JAVA (*node))
> -    {
> -      error ("%qE attribute can only be applied to Java class definitions",
> -            name);
> -      *no_add_attrs = true;
> -      return NULL_TREE;
> -    }
> -  if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE))
> -    *node = build_variant_type_copy (*node);
> -  TYPE_JAVA_INTERFACE (*node) = 1;
> -
> -  return NULL_TREE;
> -}
> -
>  /* Handle an "init_priority" attribute; arguments as in
>     struct attribute_spec.handler.  */
>  static tree
> --- gcc/cp/lex.c.jj     2016-05-30 23:22:56.000000000 +0200
> +++ gcc/cp/lex.c        2016-10-02 19:24:43.372401174 +0200
> @@ -37,7 +37,6 @@ static void handle_pragma_vtable (cpp_re
>  static void handle_pragma_unit (cpp_reader *);
>  static void handle_pragma_interface (cpp_reader *);
>  static void handle_pragma_implementation (cpp_reader *);
> -static void handle_pragma_java_exceptions (cpp_reader *);
>
>  static void init_operators (void);
>  static void copy_lang_type (tree);
> @@ -71,9 +70,6 @@ struct impl_files
>  };
>
>  static struct impl_files *impl_file_chain;
> -
> -/* True if we saw "#pragma GCC java_exceptions".  */
> -bool pragma_java_exceptions;
>
>  void
>  cxx_finish (void)
> @@ -210,7 +206,6 @@ init_cp_pragma (void)
>    c_register_pragma (0, "implementation", handle_pragma_implementation);
>    c_register_pragma ("GCC", "interface", handle_pragma_interface);
>    c_register_pragma ("GCC", "implementation", handle_pragma_implementation);
> -  c_register_pragma ("GCC", "java_exceptions", handle_pragma_java_exceptions);
>  }
>
>  /* TRUE if a code represents a statement.  */
> @@ -427,18 +422,6 @@ handle_pragma_implementation (cpp_reader
>      }
>  }
>
> -/* Indicate that this file uses Java-personality exception handling.  */
> -static void
> -handle_pragma_java_exceptions (cpp_reader* /*dfile*/)
> -{
> -  tree x;
> -  if (pragma_lex (&x) != CPP_EOF)
> -    warning (0, "junk at end of #pragma GCC java_exceptions");
> -
> -  choose_personality_routine (lang_java);
> -  pragma_java_exceptions = true;
> -}
> -
>  /* Issue an error message indicating that the lookup of NAME (an
>     IDENTIFIER_NODE) failed.  Returns the ERROR_MARK_NODE.  */
>
> @@ -580,8 +563,6 @@ retrofit_lang_decl (tree t)
>      SET_DECL_LANGUAGE (t, lang_cplusplus);
>    else if (current_lang_name == lang_name_c)
>      SET_DECL_LANGUAGE (t, lang_c);
> -  else if (current_lang_name == lang_name_java)
> -    SET_DECL_LANGUAGE (t, lang_java);
>    else
>      gcc_unreachable ();
>
> --- gcc/cp/method.c.jj  2016-09-27 09:46:10.000000000 +0200
> +++ gcc/cp/method.c     2016-10-02 19:22:08.738301627 +0200
> @@ -1765,7 +1765,7 @@ implicitly_declare_fn (special_function_
>
>    type = TYPE_MAIN_VARIANT (type);
>
> -  if (targetm.cxx.cdtor_returns_this () && !TYPE_FOR_JAVA (type))
> +  if (targetm.cxx.cdtor_returns_this ())
>      {
>        if (kind == sfk_destructor)
>         /* See comment in check_special_function_return_type.  */
> --- gcc/cp/error.c.jj   2016-09-16 22:24:49.000000000 +0200
> +++ gcc/cp/error.c      2016-10-02 19:25:32.467797791 +0200
> @@ -3019,9 +3019,6 @@ language_to_string (enum languages c)
>      case lang_cplusplus:
>        return "C++";
>
> -    case lang_java:
> -      return "Java";
> -
>      default:
>        gcc_unreachable ();
>      }
> --- gcc/cp/decl.c.jj    2016-09-29 22:53:53.000000000 +0200
> +++ gcc/cp/decl.c       2016-10-02 19:07:00.439460373 +0200
> @@ -77,7 +77,6 @@ static void bad_specifiers (tree, enum b
>                             int);
>  static void check_for_uninitialized_const_var (tree);
>  static tree local_variable_p_walkfn (tree *, int *, void *);
> -static tree record_builtin_java_type (const char *, int);
>  static const char *tag_name (enum tag_types);
>  static tree lookup_and_check_tag (enum tag_types, tree, tag_scope, bool);
>  static int walk_namespaces_r (tree, walk_namespaces_fn, void *);
> @@ -3892,53 +3891,6 @@ record_builtin_type (enum rid rid_index,
>      debug_hooks->type_decl (tdecl, 0);
>  }
>
> -/* Record one of the standard Java types.
> - * Declare it as having the given NAME.
> - * If SIZE > 0, it is the size of one of the integral types;
> - * otherwise it is the negative of the size of one of the other types.  */
> -
> -static tree
> -record_builtin_java_type (const char* name, int size)
> -{
> -  tree type, decl;
> -  if (size > 0)
> -    {
> -      type = build_nonstandard_integer_type (size, 0);
> -      type = build_distinct_type_copy (type);
> -    }
> -  else if (size > -32)
> -    {
> -      tree stype;
> -      /* "__java_char" or ""__java_boolean".  */
> -      type = build_nonstandard_integer_type (-size, 1);
> -      type = build_distinct_type_copy (type);
> -      /* Get the signed type cached and attached to the unsigned type,
> -        so it doesn't get garbage-collected at "random" times,
> -        causing potential codegen differences out of different UIDs
> -        and different alias set numbers.  */
> -      stype = build_nonstandard_integer_type (-size, 0);
> -      stype = build_distinct_type_copy (stype);
> -      TREE_CHAIN (type) = stype;
> -      /*if (size == -1)        TREE_SET_CODE (type, BOOLEAN_TYPE);*/
> -    }
> -  else
> -    { /* "__java_float" or ""__java_double".  */
> -      type = make_node (REAL_TYPE);
> -      TYPE_PRECISION (type) = - size;
> -      layout_type (type);
> -    }
> -  record_builtin_type (RID_MAX, name, type);
> -  decl = TYPE_NAME (type);
> -
> -  /* Suppress generate debug symbol entries for these types,
> -     since for normal C++ they are just clutter.
> -     However, push_lang_context undoes this if extern "Java" is seen.  */
> -  DECL_IGNORED_P (decl) = 1;
> -
> -  TYPE_FOR_JAVA (type) = 1;
> -  return type;
> -}
> -
>  /* Push a type into the namespace so that the back ends ignore it.  */
>
>  static void
> @@ -3979,7 +3931,6 @@ initialize_predefined_identifiers (void)
>    static const predefined_identifier predefined_identifiers[] = {
>      { "C++", &lang_name_cplusplus, 0 },
>      { "C", &lang_name_c, 0 },
> -    { "Java", &lang_name_java, 0 },
>      /* Some of these names have a trailing space so that it is
>         impossible for them to conflict with names written by users.  */
>      { "__ct ", &ctor_identifier, 1 },
> @@ -4051,15 +4002,6 @@ cxx_init_decl_processing (void)
>
>    c_common_nodes_and_builtins ();
>
> -  java_byte_type_node = record_builtin_java_type ("__java_byte", 8);
> -  java_short_type_node = record_builtin_java_type ("__java_short", 16);
> -  java_int_type_node = record_builtin_java_type ("__java_int", 32);
> -  java_long_type_node = record_builtin_java_type ("__java_long", 64);
> -  java_float_type_node = record_builtin_java_type ("__java_float", -32);
> -  java_double_type_node = record_builtin_java_type ("__java_double", -64);
> -  java_char_type_node = record_builtin_java_type ("__java_char", -16);
> -  java_boolean_type_node = record_builtin_java_type ("__java_boolean", -1);
> -
>    integer_two_node = build_int_cst (NULL_TREE, 2);
>
>    record_builtin_type (RID_BOOL, "bool", boolean_type_node);
> @@ -6962,20 +6904,6 @@ cp_finish_decl (tree decl, tree init, bo
>              is *not* defined.  */
>           && (!DECL_EXTERNAL (decl) || init))
>         {
> -         if (TYPE_FOR_JAVA (type) && MAYBE_CLASS_TYPE_P (type))
> -           {
> -             tree jclass
> -               = IDENTIFIER_GLOBAL_VALUE (get_identifier ("jclass"));
> -             /* Allow libjava/prims.cc define primitive classes.  */
> -             if (init != NULL_TREE
> -                 || jclass == NULL_TREE
> -                 || TREE_CODE (jclass) != TYPE_DECL
> -                 || !POINTER_TYPE_P (TREE_TYPE (jclass))
> -                 || !same_type_ignoring_top_level_qualifiers_p
> -                                       (type, TREE_TYPE (TREE_TYPE (jclass))))
> -               error ("Java object %qD not allocated with %<new%>", decl);
> -             init = NULL_TREE;
> -           }
>           cleanups = make_tree_vector ();
>           init = check_initializer (decl, init, flags, &cleanups);
>
> @@ -7019,9 +6947,6 @@ cp_finish_decl (tree decl, tree init, bo
>            so that we can decide later to emit debug info for them.  */
>         record_types_used_by_current_var_decl (decl);
>      }
> -  else if (TREE_CODE (decl) == FIELD_DECL
> -          && TYPE_FOR_JAVA (type) && MAYBE_CLASS_TYPE_P (type))
> -    error ("non-static data member %qD has Java class type", decl);
>
>    /* Add this declaration to the statement-tree.  This needs to happen
>       after the call to check_initializer so that the DECL_EXPR for a
> @@ -8384,9 +8309,7 @@ grokfndecl (tree ctype,
>         check_main_parameter_types (decl);
>      }
>
> -  if (ctype != NULL_TREE
> -      && (! TYPE_FOR_JAVA (ctype) || check_java_method (decl))
> -      && check)
> +  if (ctype != NULL_TREE && check)
>      {
>        tree old_decl = check_classfn (ctype, decl,
>                                      (processing_template_decl
> @@ -9236,7 +9159,7 @@ check_special_function_return_type (spec
>         error_at (smallest_type_quals_location (type_quals, locations),
>                   "qualifiers are not allowed on constructor declaration");
>
> -      if (targetm.cxx.cdtor_returns_this () && !TYPE_FOR_JAVA (optype))
> +      if (targetm.cxx.cdtor_returns_this ())
>         type = build_pointer_type (optype);
>        else
>         type = void_type_node;
> @@ -9250,10 +9173,8 @@ check_special_function_return_type (spec
>                   "qualifiers are not allowed on destructor declaration");
>
>        /* We can't use the proper return type here because we run into
> -        problems with ambiguous bases and covariant returns.
> -        Java classes are left unchanged because (void *) isn't a valid
> -        Java type, and we don't want to change the Java ABI.  */
> -      if (targetm.cxx.cdtor_returns_this () && !TYPE_FOR_JAVA (optype))
> +        problems with ambiguous bases and covariant returns.  */
> +      if (targetm.cxx.cdtor_returns_this ())
>         type = build_pointer_type (void_type_node);
>        else
>         type = void_type_node;
> @@ -10826,11 +10747,6 @@ grokdeclarator (const cp_declarator *dec
>      {
>        tree decl;
>
> -      /* Note that the grammar rejects storage classes
> -        in typenames, fields or parameters.  */
> -      if (current_lang_name == lang_name_java)
> -       TYPE_FOR_JAVA (type) = 1;
> -
>        /* This declaration:
>
>            typedef void f(int) const;
> @@ -11898,16 +11814,6 @@ grokparms (tree parmlist, tree *parms)
>           TREE_TYPE (decl) = error_mark_node;
>         }
>
> -      if (type != error_mark_node
> -         && TYPE_FOR_JAVA (type)
> -         && MAYBE_CLASS_TYPE_P (type))
> -       {
> -         error ("parameter %qD has Java class type", decl);
> -         type = error_mark_node;
> -         TREE_TYPE (decl) = error_mark_node;
> -         init = NULL_TREE;
> -       }
> -
>        if (type != error_mark_node)
>         {
>           if (deprecated_state != DEPRECATED_SUPPRESS)
> @@ -13108,21 +13014,14 @@ xref_basetypes (tree ref, tree base_list
>      }
>
>    if (max_bases > 1)
> -    {
> -      if (TYPE_FOR_JAVA (ref))
> -       error ("Java class %qT cannot have multiple bases", ref);
> -      else
> -       warning (OPT_Wmultiple_inheritance,
> -                "%qT defined with multiple direct bases", ref);
> -    }
> +    warning (OPT_Wmultiple_inheritance,
> +            "%qT defined with multiple direct bases", ref);
>
>    if (max_vbases)
>      {
>        vec_alloc (CLASSTYPE_VBASECLASSES (ref), max_vbases);
>
> -      if (TYPE_FOR_JAVA (ref))
> -       error ("Java class %qT cannot have virtual bases", ref);
> -      else if (max_dvbases)
> +      if (max_dvbases)
>         warning (OPT_Wvirtual_inheritance,
>                  "%qT defined with direct virtual base", ref);
>      }
> @@ -13147,9 +13046,6 @@ xref_basetypes (tree ref, tree base_list
>           goto dropped_base;
>         }
>
> -      if (TYPE_FOR_JAVA (basetype) && (current_lang_depth () == 0))
> -       TYPE_FOR_JAVA (ref) = 1;
> -
>        base_binfo = NULL_TREE;
>        if (CLASS_TYPE_P (basetype) && !dependent_scope_p (basetype))
>         {
> @@ -13924,15 +13820,11 @@ check_function_type (tree decl, tree cur
>    if (dependent_type_p (return_type)
>        || type_uses_auto (return_type))
>      return;
> -  if (!COMPLETE_OR_VOID_TYPE_P (return_type)
> -      || (TYPE_FOR_JAVA (return_type) && MAYBE_CLASS_TYPE_P (return_type)))
> +  if (!COMPLETE_OR_VOID_TYPE_P (return_type))
>      {
>        tree args = TYPE_ARG_TYPES (fntype);
>
> -      if (!COMPLETE_OR_VOID_TYPE_P (return_type))
> -       error ("return type %q#T is incomplete", return_type);
> -      else
> -       error ("return type has Java class type %q#T", return_type);
> +      error ("return type %q#T is incomplete", return_type);
>
>        /* Make it return void instead.  */
>        if (TREE_CODE (fntype) == METHOD_TYPE)
> @@ -14587,8 +14479,7 @@ finish_constructor_body (void)
>    tree val;
>    tree exprstmt;
>
> -  if (targetm.cxx.cdtor_returns_this ()
> -      && (! TYPE_FOR_JAVA (current_class_type)))
> +  if (targetm.cxx.cdtor_returns_this ())
>      {
>        /* Any return from a constructor will end up here.  */
>        add_stmt (build_stmt (input_location, LABEL_EXPR, cdtor_label));
> --- gcc/cp/mangle.c.jj  2016-09-05 19:27:03.000000000 +0200
> +++ gcc/cp/mangle.c     2016-10-02 19:21:45.576586284 +0200
> @@ -239,10 +239,6 @@ static bool equal_abi_tags (tree, tree);
>  static inline void start_mangling (const tree);
>  static tree mangle_special_for_type (const tree, const char *);
>
> -/* Foreign language functions.  */
> -
> -static void write_java_integer_type_codes (const tree);
> -
>  /* Append a single character to the end of the mangled
>     representation.  */
>  #define write_char(CHAR)                                               \
> @@ -2436,8 +2432,6 @@ write_builtin_type (tree type)
>         write_string ("Ds");
>        else if (type == char32_type_node)
>         write_string ("Di");
> -      else if (TYPE_FOR_JAVA (type))
> -       write_java_integer_type_codes (type);
>        else
>         {
>           size_t itk;
> @@ -2492,11 +2486,9 @@ write_builtin_type (tree type)
>        break;
>
>      case REAL_TYPE:
> -      if (type == float_type_node
> -         || type == java_float_type_node)
> +      if (type == float_type_node)
>         write_char ('f');
> -      else if (type == double_type_node
> -              || type == java_double_type_node)
> +      else if (type == double_type_node)
>         write_char ('d');
>        else if (type == long_double_type_node)
>         write_char ('e');
> @@ -2621,40 +2613,16 @@ write_function_type (const tree type)
>  /* Non-terminal <bare-function-type>.  TYPE is a FUNCTION_TYPE or
>     METHOD_TYPE.  If INCLUDE_RETURN_TYPE is nonzero, the return value
>     is mangled before the parameter types.  If non-NULL, DECL is
> -   FUNCTION_DECL for the function whose type is being emitted.
> -
> -   If DECL is a member of a Java type, then a literal 'J'
> -   is output and the return type is mangled as if INCLUDE_RETURN_TYPE
> -   were nonzero.
> -
> -     <bare-function-type> ::= [J]</signature/ type>+  */
> +   FUNCTION_DECL for the function whose type is being emitted.  */
>
>  static void
>  write_bare_function_type (const tree type, const int include_return_type_p,
>                           const tree decl)
>  {
> -  int java_method_p;
> -
>    MANGLE_TRACE_TREE ("bare-function-type", type);
>
> -  /* Detect Java methods and emit special encoding.  */
> -  if (decl != NULL
> -      && DECL_FUNCTION_MEMBER_P (decl)
> -      && TYPE_FOR_JAVA (DECL_CONTEXT (decl))
> -      && !DECL_CONSTRUCTOR_P (decl)
> -      && !DECL_DESTRUCTOR_P (decl)
> -      && !DECL_CONV_FN_P (decl))
> -    {
> -      java_method_p = 1;
> -      write_char ('J');
> -    }
> -  else
> -    {
> -      java_method_p = 0;
> -    }
> -
>    /* Mangle the return type, if requested.  */
> -  if (include_return_type_p || java_method_p)
> +  if (include_return_type_p)
>      write_type (TREE_TYPE (type));
>
>    /* Now mangle the types of the arguments.  */
> @@ -4264,30 +4232,6 @@ mangle_ref_init_variable (const tree var
>    return finish_mangling_get_identifier ();
>  }
>
> -
> -/* Foreign language type mangling section.  */
> -
> -/* How to write the type codes for the integer Java type.  */
> -
> -static void
> -write_java_integer_type_codes (const tree type)
> -{
> -  if (type == java_int_type_node)
> -    write_char ('i');
> -  else if (type == java_short_type_node)
> -    write_char ('s');
> -  else if (type == java_byte_type_node)
> -    write_char ('c');
> -  else if (type == java_char_type_node)
> -    write_char ('w');
> -  else if (type == java_long_type_node)
> -    write_char ('x');
> -  else if (type == java_boolean_type_node)
> -    write_char ('b');
> -  else
> -    gcc_unreachable ();
> -}
> -
>  /* Given a CLASS_TYPE, such as a record for std::bad_exception this
>     function generates a mangled name for the vtable map variable of
>     the class type.  For example, if the class type is
> --- gcc/cp/class.c.jj   2016-09-23 09:32:13.000000000 +0200
> +++ gcc/cp/class.c      2016-10-02 19:14:49.350700430 +0200
> @@ -1047,19 +1047,7 @@ add_method (tree type, tree method, tree
>    if (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (method))
>      slot = CLASSTYPE_CONSTRUCTOR_SLOT;
>    else if (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (method))
> -    {
> -      slot = CLASSTYPE_DESTRUCTOR_SLOT;
> -
> -      if (TYPE_FOR_JAVA (type))
> -       {
> -         if (!DECL_ARTIFICIAL (method))
> -           error ("Java class %qT cannot have a destructor", type);
> -         else if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type))
> -           error ("Java class %qT cannot have an implicit non-trivial "
> -                  "destructor",
> -                  type);
> -       }
> -    }
> +    slot = CLASSTYPE_DESTRUCTOR_SLOT;
>    else
>      {
>        tree m;
> @@ -3349,17 +3337,8 @@ add_implicitly_declared_members (tree t,
>
>    /* Destructor.  */
>    if (!CLASSTYPE_DESTRUCTORS (t))
> -    {
> -      /* In general, we create destructors lazily.  */
> -      CLASSTYPE_LAZY_DESTRUCTOR (t) = 1;
> -
> -      if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)
> -         && TYPE_FOR_JAVA (t))
> -       /* But if this is a Java class, any non-trivial destructor is
> -          invalid, even if compiler-generated.  Therefore, if the
> -          destructor is non-trivial we create it now.  */
> -       lazily_declare_fn (sfk_destructor, t);
> -    }
> +    /* In general, we create destructors lazily.  */
> +    CLASSTYPE_LAZY_DESTRUCTOR (t) = 1;
>
>    /* [class.ctor]
>
> @@ -3382,7 +3361,7 @@ add_implicitly_declared_members (tree t,
>
>       If a class definition does not explicitly declare a copy
>       constructor, one is declared implicitly.  */
> -  if (! TYPE_HAS_COPY_CTOR (t) && ! TYPE_FOR_JAVA (t))
> +  if (! TYPE_HAS_COPY_CTOR (t))
>      {
>        TYPE_HAS_COPY_CTOR (t) = 1;
>        TYPE_HAS_CONST_COPY_CTOR (t) = !cant_have_const_cctor;
> @@ -3395,7 +3374,7 @@ add_implicitly_declared_members (tree t,
>       when it is needed.  For now, just record whether or not the type
>       of the parameter to the assignment operator will be a const or
>       non-const reference.  */
> -  if (!TYPE_HAS_COPY_ASSIGN (t) && !TYPE_FOR_JAVA (t))
> +  if (!TYPE_HAS_COPY_ASSIGN (t))
>      {
>        TYPE_HAS_COPY_ASSIGN (t) = 1;
>        TYPE_HAS_CONST_COPY_ASSIGN (t) = !cant_have_const_assignment;
> @@ -6653,8 +6632,7 @@ determine_key_method (tree type)
>  {
>    tree method;
>
> -  if (TYPE_FOR_JAVA (type)
> -      || processing_template_decl
> +  if (processing_template_decl
>        || CLASSTYPE_TEMPLATE_INSTANTIATION (type)
>        || CLASSTYPE_INTERFACE_KNOWN (type))
>      return;
> @@ -7095,9 +7073,7 @@ finish_struct_1 (tree t)
>    /* Build the VTT for T.  */
>    build_vtt (t);
>
> -  /* This warning does not make sense for Java classes, since they
> -     cannot have destructors.  */
> -  if (!TYPE_FOR_JAVA (t) && warn_nonvdtor
> +  if (warn_nonvdtor
>        && TYPE_POLYMORPHIC_P (t) && accessible_nvdtor_p (t)
>        && !CLASSTYPE_FINAL (t))
>      warning (OPT_Wnon_virtual_dtor,
> @@ -7832,29 +7808,9 @@ push_lang_context (tree name)
>    vec_safe_push (current_lang_base, current_lang_name);
>
>    if (name == lang_name_cplusplus)
> -    {
> -      current_lang_name = name;
> -    }
> -  else if (name == lang_name_java)
> -    {
> -      current_lang_name = name;
> -      /* DECL_IGNORED_P is initially set for these types, to avoid clutter.
> -        (See record_builtin_java_type in decl.c.)  However, that causes
> -        incorrect debug entries if these types are actually used.
> -        So we re-enable debug output after extern "Java".  */
> -      DECL_IGNORED_P (TYPE_NAME (java_byte_type_node)) = 0;
> -      DECL_IGNORED_P (TYPE_NAME (java_short_type_node)) = 0;
> -      DECL_IGNORED_P (TYPE_NAME (java_int_type_node)) = 0;
> -      DECL_IGNORED_P (TYPE_NAME (java_long_type_node)) = 0;
> -      DECL_IGNORED_P (TYPE_NAME (java_float_type_node)) = 0;
> -      DECL_IGNORED_P (TYPE_NAME (java_double_type_node)) = 0;
> -      DECL_IGNORED_P (TYPE_NAME (java_char_type_node)) = 0;
> -      DECL_IGNORED_P (TYPE_NAME (java_boolean_type_node)) = 0;
> -    }
> +    current_lang_name = name;
>    else if (name == lang_name_c)
> -    {
> -      current_lang_name = name;
> -    }
> +    current_lang_name = name;
>    else
>      error ("language string %<\"%E\"%> not recognized", name);
>  }
> --- gcc/testsuite/g++.dg/other/java3.C.jj       2013-11-12 11:31:20.430635087 +0100
> +++ gcc/testsuite/g++.dg/other/java3.C  2016-10-02 19:31:12.607617473 +0200
> @@ -1,7 +0,0 @@
> -// PR c++/11006
> -
> -typedef int* jclass;
> -
> -void foo () {
> -  new __java_boolean;  // { dg-error "valid" }
> -}
> --- gcc/testsuite/g++.dg/other/java1.C.jj       2008-09-05 12:55:02.000000000 +0200
> +++ gcc/testsuite/g++.dg/other/java1.C  2016-10-02 19:31:07.941674817 +0200
> @@ -1,22 +0,0 @@
> -// { dg-options "-w -ansi -pedantic" }
> -
> -// Copyright (C) 2003 Free Software Foundation, Inc.
> -// Contributed by Nathan Sidwell 23 Oct 2003 <nathan@codesourcery.com>
> -
> -extern "Java" {
> -  class One
> -  {
> -    ~One (); // { dg-error "cannot have a destructor" "" }
> -    One ();
> -  };
> -
> -  class Two {};
> -
> -  class Three : One {}; // { dg-error "cannot have an implicit" "" }
> -
> -  class Four : Two {};
> -
> -  class Five : Two, Four {}; //  { dg-error "cannot have multiple bases" "" }
> -
> -  class Six : virtual Two {}; // { dg-error "cannot have virtual base" "" }
> -}
> --- gcc/testsuite/g++.dg/other/error12.C.jj     2008-09-05 12:55:01.000000000 +0200
> +++ gcc/testsuite/g++.dg/other/error12.C        2016-10-02 19:31:30.747394535 +0200
> @@ -1,9 +0,0 @@
> -//PR c++/28292
> -
> -extern "Java"
> -{
> -  struct A
> -  {
> -    void foo(void; // { dg-error "before|incomplete type|invalid use" }
> -  };
> -}
> --- gcc/testsuite/g++.dg/other/java2.C.jj       2008-09-05 12:55:01.000000000 +0200
> +++ gcc/testsuite/g++.dg/other/java2.C  2016-10-02 19:31:10.433644191 +0200
> @@ -1,11 +0,0 @@
> -// PR c++/???
> -// { dg-do compile }
> -
> -extern "Java"
> -{
> -  struct A {};
> -}
> -
> -typedef void* jclass;
> -
> -A* p = new A;  // { dg-error "class\\$" }
> --- gcc/testsuite/g++.dg/warn/Wnvdtor.C.jj      2014-04-08 08:59:40.257428209 +0200
> +++ gcc/testsuite/g++.dg/warn/Wnvdtor.C 2016-10-02 19:32:10.994899893 +0200
> @@ -1,11 +0,0 @@
> -// { dg-options "-Wnon-virtual-dtor" }
> -
> -extern "Java"
> -{
> -  class Foo
> -  {
> -  public:
> -    virtual void bar( void);
> -  };
> -}
> -
> --- gcc/testsuite/g++.dg/lookup/java1.C.jj      2008-09-05 12:55:04.000000000 +0200
> +++ gcc/testsuite/g++.dg/lookup/java1.C 2016-10-02 19:30:30.783131496 +0200
> @@ -1,68 +0,0 @@
> -// { dg-do compile }
> -// { dg-options "-fdollars-in-identifiers" }
> -// Origin: Giovanni Bajo <giovannibajo at libero dot it>
> -// Make sure that Java special functions can be called correctly.
> -
> -extern "Java"
> -{
> -  typedef __java_int jint;
> -  namespace java
> -  {
> -    namespace lang
> -    {
> -      class Class;
> -      class Object;
> -      class Throwable {};
> -      class Foo;
> -    }
> -  }
> -}
> -
> -typedef struct java::lang::Object* jobject;
> -typedef struct java::lang::Throwable* jthrowable;
> -typedef class java::lang::Class* jclass;
> -using java::lang::Foo;
> -
> -class Foo : public java::lang::Throwable
> -{
> -public:
> -  static ::java::lang::Class class$;
> -};
> -
> -
> -/*
> - * Step 1: no declarations. A declaration for _Jv_Throw is created.
> - */
> -
> -void Bar1(void)
> -{
> -  Foo* f = new java::lang::Foo;   // { dg-error "call to Java constructor" }
> -  throw (f);
> -}
> -
> -
> -/*
> - * Step 2: constructor declaration
> - */
> -
> -extern "C" jobject _Jv_AllocObject (jclass) __attribute__((__malloc__));
> -
> -void Bar2(void)
> -{
> -  Foo* f = new java::lang::Foo;
> -  throw (f);
> -}
> -
> -
> -/*
> - * Step 3: overloads
> - */
> -
> -jobject _Jv_AllocObject (jclass, jint, float) __attribute__((__malloc__));
> -void _Jv_Throw (int, float) __attribute__ ((__noreturn__));
> -
> -void Bar3(void)
> -{
> -  Foo* f = new java::lang::Foo;          // { dg-error "should never be overloaded" }
> -  throw (f);                     // { dg-error "should never be overloaded" }
> -}
> --- gcc/testsuite/g++.dg/lookup/java2.C.jj      2008-09-05 12:55:04.000000000 +0200
> +++ gcc/testsuite/g++.dg/lookup/java2.C 2016-10-02 19:30:32.245113528 +0200
> @@ -1,47 +0,0 @@
> -// { dg-do compile }
> -// { dg-options "-fdollars-in-identifiers" }
> -// Origin: Giovanni Bajo <giovannibajo at libero dot it>
> -// Make sure that Java special functions can be called correctly.
> -// (continue from java1.C)
> -
> -extern "Java"
> -{
> -  typedef __java_int jint;
> -  namespace java
> -  {
> -    namespace lang
> -    {
> -      class Class;
> -      class Object;
> -      class Throwable {};
> -      class Foo;
> -    }
> -  }
> -}
> -
> -typedef struct java::lang::Object* jobject;
> -typedef struct java::lang::Throwable* jthrowable;
> -typedef class java::lang::Class* jclass;
> -using java::lang::Foo;
> -
> -class Foo : public java::lang::Throwable
> -{
> -public:
> -  static ::java::lang::Class class$;
> -};
> -
> -/*
> - * Step 4: Manual declaration of _Jv_Throw
> - *  This is the last case we need to test. In the other file we're testing
> - *  the compiler is able to generate an artifical declaration for this
> - *  function, so we need to test here if it works with a normal declaration.
> - */
> -
> -extern "C" jobject _Jv_AllocObject (jclass) __attribute__((__malloc__));
> -extern "C" void _Jv_Throw (jthrowable) __attribute__ ((__noreturn__));
> -
> -void Bar4(void)
> -{
> -  Foo* f = new java::lang::Foo;
> -  throw (f);
> -}
> --- gcc/testsuite/g++.dg/ext/pr34829.C.jj       2008-09-05 12:55:02.000000000 +0200
> +++ gcc/testsuite/g++.dg/ext/pr34829.C  2016-10-02 19:30:04.517454301 +0200
> @@ -1,22 +0,0 @@
> -// Test for PR c++/34829
> -// Placement new should be ok for non-aggregate Java types.
> -
> -// { dg-do compile }
> -// { dg-options "" }
> -
> -extern "Java"
> -{
> -  typedef __java_byte jbyte;
> -}
> -
> -typedef __SIZE_TYPE__ size_t;
> -
> -void *operator new (size_t, void *m)
> -{
> -  return m;
> -}
> -
> -jbyte *f(void *memory)
> -{
> -  return new (memory) jbyte;
> -}
> --- gcc/testsuite/g++.dg/ext/java-3.C.jj        2016-03-23 10:41:12.442279851 +0100
> +++ gcc/testsuite/g++.dg/ext/java-3.C   2016-10-02 19:29:33.887830739 +0200
> @@ -1,39 +0,0 @@
> -// PR c++/70267
> -// { dg-do compile { target { ! { powerpc-ibm-aix* } } } }
> -// { dg-options "-O2" }
> -
> -extern "Java"
> -{
> -  typedef __java_int jint;
> -  namespace java
> -  {
> -    namespace lang
> -    {
> -      class Class;
> -      class Object;
> -      class Throwable {};
> -      class Foo;
> -    }
> -  }
> -}
> -
> -typedef struct java::lang::Object * jobject;
> -typedef struct java::lang::Throwable * jthrowable;
> -typedef class  java::lang::Class * jclass;
> -
> -using java::lang::Foo;
> -
> -class Foo: public java::lang::Throwable
> -{
> -  public:static::java::lang::Class class$;
> -};
> -
> -extern "C" Foo _Jv_AllocObject (jclass);
> -extern "C" void _Jv_Throw (jthrowable) __attribute__ ((__noreturn__));
> -
> -void
> -Bar4 (void)
> -{
> -  Foo * f = new java::lang::Foo;       // { dg-error "is not a function returning a pointer" }
> -  throw (f);
> -}
> --- gcc/testsuite/g++.dg/ext/java-1.C.jj        2008-09-05 12:55:02.000000000 +0200
> +++ gcc/testsuite/g++.dg/ext/java-1.C   2016-10-02 19:29:29.645882873 +0200
> @@ -1,26 +0,0 @@
> -// { dg-do compile { target { ! { powerpc-ibm-aix* } } } }
> -// { dg-options "" }
> -// Test extern "java" and some throwing of the objects.
> -
> -extern "Java"
> -  namespace java
> -  {
> -    namespace lang
> -    {
> -      class Throwable;
> -      class Class;
> -  }
> -}
> -typedef class java::lang::Throwable* jthrowable;
> -typedef class java::lang::Class* jclass;
> -class java::lang::Throwable {
> -public:
> -  static jclass class$;
> -};
> -int
> -_Jv_FindClassFromSignature ( )
> -  try
> -    {
> -    }
> -  catch (java::lang::Throwable *ncdfe) {}
> -
> --- gcc/testsuite/g++.dg/ext/java-2.C.jj        2008-10-23 13:21:04.000000000 +0200
> +++ gcc/testsuite/g++.dg/ext/java-2.C   2016-10-02 19:29:31.942854643 +0200
> @@ -1,79 +0,0 @@
> -// PR c++/30293
> -// PR c++/30294
> -// { dg-do compile { target { ! { powerpc-ibm-aix* } } } }
> -// { dg-options "" }
> -
> -extern "Java" {
> -typedef __java_byte jbyte;
> -namespace java {
> -namespace lang {
> -  class Object {};
> -  class Class {};
> -}
> -}
> -typedef struct java::lang::Object* jobject;
> -typedef java::lang::Class *jclass;
> -}
> -extern "C" jobject _Jv_AllocObject (jclass);
> -
> -extern "Java" {
> -  struct A { static java::lang::Class class$; };
> -}
> -
> -struct B {
> -  A a;         // { dg-error "has Java class type" }
> -};
> -
> -void* operator new (__SIZE_TYPE__, void*) throw();
> -char buf[1024];
> -
> -A a;           // { dg-error "not allocated with" }
> -A b = A ();    // { dg-error "not allocated with" }
> -A *c = new ((void *) buf) A ();        // { dg-error "using placement new" }
> -A *d = new A ();
> -jbyte e = 6;
> -
> -const A fn1 () // { dg-error "return type has Java class type" }
> -{
> -  A a;         // { dg-error "not allocated with" }
> -  return a;
> -}
> -
> -A fn2 ()       // { dg-error "return type has Java class type" }
> -{
> -  A a;         // { dg-error "not allocated with" }
> -  return a;
> -}
> -
> -A *fn3 ()
> -{
> -  return new A ();
> -}
> -
> -A &fn4 ()
> -{
> -  return *c;
> -}
> -
> -jbyte fn5 ()
> -{
> -  return 7;
> -}
> -
> -void fn6 (A x) // { dg-error "has Java class type" }
> -{
> -}
> -
> -void fn7 (const A x)   // { dg-error "has Java class type" }
> -{
> -}
> -
> -void fn8 (A *x)
> -{
> -  (void) x;
> -}
> -
> -void fn9 (jbyte x)
> -{
> -  (void) x;
> -}
> --- gcc/testsuite/g++.old-deja/g++.oliva/dwarf2.C.jj    2010-06-10 19:32:03.000000000 +0200
> +++ gcc/testsuite/g++.old-deja/g++.oliva/dwarf2.C       2016-05-06 19:07:57.544936929 +0200
> @@ -1,10 +0,0 @@
> -// { dg-do assemble }
> -
> -// Copyright (C) 1999 Free Software Foundation
> -
> -// by Alexandre Oliva <oliva@dcc.unicamp.br>
> -
> -// Fails with dwarf debugging.
> -
> -typedef __java_boolean jboolean;
> -void foo() {}
>
>
>         Jakub

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-10-03 12:53                 ` Rainer Orth
@ 2016-10-04 15:28                   ` Jeff Law
  0 siblings, 0 replies; 86+ messages in thread
From: Jeff Law @ 2016-10-04 15:28 UTC (permalink / raw)
  To: Rainer Orth, Andrew Haley
  Cc: Eric Gallager, Jakub Jelinek, Ian Lance Taylor, Marek Polacek,
	gcc-patches

On 10/03/2016 06:53 AM, Rainer Orth wrote:
> Andrew Haley <aph@redhat.com> writes:
>
>> On 30/09/16 23:16, Rainer Orth wrote:
>>> me too, though mostly to have maximum test coverage (primarily on
>>> Solaris).  As expected, a x86_64-apple-darwin16 bootstrap with
>>> --enable-objc-gc just failed for me.  I'm testing the following patch
>>> (on top of Jakub's).
>>>
>>> 	Rainer
>>>
>>>
>>> 2016-10-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>>>
>>> 	* configure.ac (target_libraries): Readd target-boehm-gc.
>>> 	Restore --enable-objc-gc handling.
>>> 	* configure: Regenerate.
>>
>> Thanks everybody.  My apologies.
>
> The bootstrap completed successfully now.  Ok for mainline?
Yes.
jeff

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-04  8:41     ` Andrew Haley
@ 2016-10-04 17:23       ` Mike Stump
  2016-10-04 17:25         ` Andrew Pinski
  2016-10-04 18:40         ` Iain Sandoe
  0 siblings, 2 replies; 86+ messages in thread
From: Mike Stump @ 2016-10-04 17:23 UTC (permalink / raw)
  To: Andrew Haley; +Cc: Rainer Orth, Matthias Klose, GCC Patches, GCJ-patches

On Oct 4, 2016, at 1:41 AM, Andrew Haley <aph@redhat.com> wrote:
> 
> On 04/10/16 09:39, Rainer Orth wrote:
>> Hi Matthias,
>> 
>>> On 05.09.2016 17:13, Andrew Haley wrote:
>>>> As discussed.  I think I should ask a Global reviewer to approve this
>>>> one.  For obvious reasons I haven't included the diffs to the deleted
>>>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>>>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>>>> if anyone would like to try it.
>>> 
>>> still breaks bootstraps when configured with --enable-objc-gc.
>>> 
>>> the immediate step should be to fix the bootstrap failure, as an additional step
>>> to remove boehm-gc from the gcc sources and be able to use an external boehm-gc.
>> 
>> the first part is handled by my unreviewed patch
>> 
>> 	https://gcc.gnu.org/ml/gcc-patches/2016-09/msg02437.html
> 
> Looks obvious to me, fixes bootstrap.  I think no-one will complain
> if you check it in.

I don't know who wants to review it, but if people want me to, Ok.  The idea is that if ObjC is the last remaining user in tree for boehm-gc, then reasonably I'm the last man standing.  Of course, if others want to review approve the patch, I'm fine with that.  

I'm fine with patches to externalize boehm-gc if people want to push that direction.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-04 17:23       ` Mike Stump
@ 2016-10-04 17:25         ` Andrew Pinski
  2016-10-04 18:40         ` Iain Sandoe
  1 sibling, 0 replies; 86+ messages in thread
From: Andrew Pinski @ 2016-10-04 17:25 UTC (permalink / raw)
  To: Mike Stump
  Cc: Andrew Haley, Rainer Orth, Matthias Klose, GCC Patches, GCJ-patches

On Tue, Oct 4, 2016 at 10:23 AM, Mike Stump <mikestump@comcast.net> wrote:
> On Oct 4, 2016, at 1:41 AM, Andrew Haley <aph@redhat.com> wrote:
>>
>> On 04/10/16 09:39, Rainer Orth wrote:
>>> Hi Matthias,
>>>
>>>> On 05.09.2016 17:13, Andrew Haley wrote:
>>>>> As discussed.  I think I should ask a Global reviewer to approve this
>>>>> one.  For obvious reasons I haven't included the diffs to the deleted
>>>>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>>>>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>>>>> if anyone would like to try it.
>>>>
>>>> still breaks bootstraps when configured with --enable-objc-gc.
>>>>
>>>> the immediate step should be to fix the bootstrap failure, as an additional step
>>>> to remove boehm-gc from the gcc sources and be able to use an external boehm-gc.
>>>
>>> the first part is handled by my unreviewed patch
>>>
>>>      https://gcc.gnu.org/ml/gcc-patches/2016-09/msg02437.html
>>
>> Looks obvious to me, fixes bootstrap.  I think no-one will complain
>> if you check it in.
>
> I don't know who wants to review it, but if people want me to, Ok.  The idea is that if ObjC is the last remaining user in tree for boehm-gc, then reasonably I'm the last man standing.  Of course, if others want to review approve the patch, I'm fine with that.

From a runtime maintainer position, I am also fine with this patch.

>
> I'm fine with patches to externalize boehm-gc if people want to push that direction.

I am also ok with that too.

Thanks,
Andrew


>

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-04 17:23       ` Mike Stump
  2016-10-04 17:25         ` Andrew Pinski
@ 2016-10-04 18:40         ` Iain Sandoe
  2016-10-05 16:28           ` Jeff Law
  1 sibling, 1 reply; 86+ messages in thread
From: Iain Sandoe @ 2016-10-04 18:40 UTC (permalink / raw)
  To: Rainer Orth
  Cc: Andrew Haley, Matthias Klose, GCC Patches, GCJ-patches, Mike Stump


> On 4 Oct 2016, at 18:23, Mike Stump <mikestump@comcast.net> wrote:
> 
> On Oct 4, 2016, at 1:41 AM, Andrew Haley <aph@redhat.com> wrote:
>> 
>> On 04/10/16 09:39, Rainer Orth wrote:
>>> Hi Matthias,
>>> 
>>>> On 05.09.2016 17:13, Andrew Haley wrote:
>>>>> As discussed.  I think I should ask a Global reviewer to approve this
>>>>> one.  For obvious reasons I haven't included the diffs to the deleted
>>>>> gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>>>>> is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>>>>> if anyone would like to try it.
>>>> 
>>>> still breaks bootstraps when configured with --enable-objc-gc.
>>>> 
>>>> the immediate step should be to fix the bootstrap failure, as an additional step
>>>> to remove boehm-gc from the gcc sources and be able to use an external boehm-gc.
>>> 
>>> the first part is handled by my unreviewed patch
>>> 
>>> 	https://gcc.gnu.org/ml/gcc-patches/2016-09/msg02437.html
>> 
>> Looks obvious to me, fixes bootstrap.  I think no-one will complain
>> if you check it in.
> 
> I don't know who wants to review it, but if people want me to, Ok.  The idea is that if ObjC is the last remaining user in tree for boehm-gc, then reasonably I'm the last man standing.  Of course, if others want to review approve the patch, I'm fine with that.  
> 
> I'm fine with patches to externalize boehm-gc if people want to push that direction.

+1

Iain

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [C++ PATCH] Delete GCJ - C++ part
  2016-10-02 19:59           ` [C++ PATCH] Delete GCJ - C++ part Jakub Jelinek
  2016-10-04 15:20             ` Jason Merrill
@ 2016-10-05  9:04             ` Andreas Schwab
  2016-10-05  9:07               ` Jakub Jelinek
  1 sibling, 1 reply; 86+ messages in thread
From: Andreas Schwab @ 2016-10-05  9:04 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Jason Merrill, Andrew Haley, Marek Polacek, gcc-patches

FAIL: g++.dg/pr49847-2.C  -std=gnu++11 (test for excess errors)
Excess errors:
/daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:5:13: error: '__java_int' does not name a type
/daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:6:13: error: '__java_float' does not name a type; did you mean '__cpp_hex_float'?
/daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:18:12: error: language string '"Java"' not recognized
/daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:25:5: error: 'jint' does not name a type; did you mean 'int'?
/daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:26:5: error: 'jfloat' does not name a type; did you mean 'float'?
/daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:41:6: error: 'jfloat' was not declared in this scope
/daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:42:13: error: expected ';' before 'value1'
/daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:43:10: error: 'value1' was not declared in this scope
/daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:43:19: error: 'value2' was not declared in this scope
/daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:43:41: error: 'union _Jv_word' has no member named 'i'

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [C++ PATCH] Delete GCJ - C++ part
  2016-10-05  9:04             ` Andreas Schwab
@ 2016-10-05  9:07               ` Jakub Jelinek
  2016-10-05 16:22                 ` Jeff Law
  0 siblings, 1 reply; 86+ messages in thread
From: Jakub Jelinek @ 2016-10-05  9:07 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Jason Merrill, Andrew Haley, Marek Polacek, gcc-patches

On Wed, Oct 05, 2016 at 11:04:05AM +0200, Andreas Schwab wrote:
> FAIL: g++.dg/pr49847-2.C  -std=gnu++11 (test for excess errors)
> Excess errors:
> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:5:13: error: '__java_int' does not name a type
> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:6:13: error: '__java_float' does not name a type; did you mean '__cpp_hex_float'?
> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:18:12: error: language string '"Java"' not recognized
> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:25:5: error: 'jint' does not name a type; did you mean 'int'?
> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:26:5: error: 'jfloat' does not name a type; did you mean 'float'?
> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:41:6: error: 'jfloat' was not declared in this scope
> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:42:13: error: expected ';' before 'value1'
> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:43:10: error: 'value1' was not declared in this scope
> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:43:19: error: 'value2' was not declared in this scope
> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:43:41: error: 'union _Jv_word' has no member named 'i'

Feel free to remove it.  I have no access to m68k.

	Jakub

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [C++ PATCH] Delete GCJ - C++ part
  2016-10-05  9:07               ` Jakub Jelinek
@ 2016-10-05 16:22                 ` Jeff Law
  0 siblings, 0 replies; 86+ messages in thread
From: Jeff Law @ 2016-10-05 16:22 UTC (permalink / raw)
  To: Jakub Jelinek, Andreas Schwab
  Cc: Jason Merrill, Andrew Haley, Marek Polacek, gcc-patches

On 10/05/2016 03:07 AM, Jakub Jelinek wrote:
> On Wed, Oct 05, 2016 at 11:04:05AM +0200, Andreas Schwab wrote:
>> FAIL: g++.dg/pr49847-2.C  -std=gnu++11 (test for excess errors)
>> Excess errors:
>> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:5:13: error: '__java_int' does not name a type
>> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:6:13: error: '__java_float' does not name a type; did you mean '__cpp_hex_float'?
>> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:18:12: error: language string '"Java"' not recognized
>> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:25:5: error: 'jint' does not name a type; did you mean 'int'?
>> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:26:5: error: 'jfloat' does not name a type; did you mean 'float'?
>> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:41:6: error: 'jfloat' was not declared in this scope
>> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:42:13: error: expected ';' before 'value1'
>> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:43:10: error: 'value1' was not declared in this scope
>> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:43:19: error: 'value2' was not declared in this scope
>> /daten/aranym/gcc/gcc-20161005/gcc/testsuite/g++.dg/pr49847-2.C:43:41: error: 'union _Jv_word' has no member named 'i'
>
> Feel free to remove it.  I have no access to m68k.
No objections from me either.     It was a test for a very obscure 
problem with cc0 targets and the setter/user getting separated.  Given 
we just want to verify compilation without hitting an ICE, we could 
probably create suitable types and save the test, but I doubt it's 
terribly important.

jeff

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-04 18:40         ` Iain Sandoe
@ 2016-10-05 16:28           ` Jeff Law
       [not found]             ` <2b5de569-1efd-f407-49c2-c9fa84cc5315@ubuntu.com>
  0 siblings, 1 reply; 86+ messages in thread
From: Jeff Law @ 2016-10-05 16:28 UTC (permalink / raw)
  To: Iain Sandoe, Rainer Orth
  Cc: Andrew Haley, Matthias Klose, GCC Patches, GCJ-patches, Mike Stump

On 10/04/2016 12:39 PM, Iain Sandoe wrote:
>>
>> I don't know who wants to review it, but if people want me to, Ok.  The idea is that if ObjC is the last remaining user in tree for boehm-gc, then reasonably I'm the last man standing.  Of course, if others want to review approve the patch, I'm fine with that.
>>
>> I'm fine with patches to externalize boehm-gc if people want to push that direction.
>
> +1
Works for me as well, particularly since we've been horrible at updating 
boehm-gc.  I think the in-tree version is something like 10 years old at 
this point -- and there's been over a dozen upstream releases since we 
last sync'd.

Jeff

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
       [not found]             ` <2b5de569-1efd-f407-49c2-c9fa84cc5315@ubuntu.com>
@ 2016-10-06 16:16               ` Matthias Klose
  2016-10-06 16:43                 ` Rainer Orth
  0 siblings, 1 reply; 86+ messages in thread
From: Matthias Klose @ 2016-10-06 16:16 UTC (permalink / raw)
  To: Jeff Law, Iain Sandoe, Rainer Orth
  Cc: Andrew Haley, GCC Patches, GCJ-patches, Mike Stump

[-- Attachment #1: Type: text/plain, Size: 1877 bytes --]

On 06.10.2016 18:14, Matthias Klose wrote:
> On 05.10.2016 18:28, Jeff Law wrote:
>> On 10/04/2016 12:39 PM, Iain Sandoe wrote:
>>>>
>>>> I don't know who wants to review it, but if people want me to, Ok.  The idea
>>>> is that if ObjC is the last remaining user in tree for boehm-gc, then
>>>> reasonably I'm the last man standing.  Of course, if others want to review
>>>> approve the patch, I'm fine with that.
>>>>
>>>> I'm fine with patches to externalize boehm-gc if people want to push that
>>>> direction.
>>>
>>> +1
>> Works for me as well, particularly since we've been horrible at updating
>> boehm-gc.  I think the in-tree version is something like 10 years old at this
>> point -- and there's been over a dozen upstream releases since we last sync'd.
>>
>> Jeff
> 
> Here's what I tested. This requires a boehm-gc version 7.0 or later (having the
> header files in a gc subdirectory).  Depending on your available library, it
> only builds the GC enabled library for the default multilib library, and just
> skips over building the non-default multilib variants (assuming that most people
> won't have a libgc for that installed).  The --enable-objc-gc option is not
> documented, so I didn't update the documentation.
> 
> Matthias
> 
> 2016-10-06  Matthias Klose  <doko@ubuntu.com>
> 
>         * boehm-gc: Remove
>         * Makefile.def: Remove boehm-gc dependencies.
>         * Makefile.in: Regenerate.
>         * configure.ac: Include pkg.m4, check for bdw-gc pkg-config module.
>         * configure: Regenerate.
> 
> config/
> 
> 2016-10-06  Matthias Klose  <doko@ubuntu.com>
> 
>         * pkg.m4: New file.
> 
> libobjc/
> 
> 2016-10-06  Matthias Klose  <doko@ubuntu.com>
> 
>         * configure.ac: Include pkg.m4, use bdw-gc pkg-config module.
>         * configure: Regenerate.

and sending the attachment again without the boehm-gc removal ...




[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: no-boehm.diff --]
[-- Type: text/x-diff; name="no-boehm.diff", Size: 18690 bytes --]

2016-10-06  Matthias Klose  <doko@ubuntu.com>

	* boehm-gc: Remove
	* Makefile.def: Remove boehm-gc dependencies.
	* Makefile.in: Regenerate.
	* configure.ac: Include pkg.m4, check for bdw-gc pkg-config module.
	* configure: Regenerate.

config/

2016-10-06  Matthias Klose  <doko@ubuntu.com>

	* pkg.m4: New file.

libobjc/

2016-10-06  Matthias Klose  <doko@ubuntu.com>

	* configure.ac: Include pkg.m4, use bdw-gc pkg-config module.
	* configure: Regenerate.
	* Makefile.in: Remove boehm-gc include, use system boehm-gc library.
	* gc.c, memory.c, objects.c: Include system boehm-gc headers.

Index: Makefile.def
===================================================================
--- Makefile.def	(revision 240829)
+++ Makefile.def	(working copy)
@@ -166,7 +166,6 @@
 target_modules = { module= libgloss; no_check=true; };
 target_modules = { module= libffi; no_install=true; };
 target_modules = { module= zlib; };
-target_modules = { module= boehm-gc; };
 target_modules = { module= rda; };
 target_modules = { module= libada; };
 target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
@@ -544,7 +543,6 @@
 // a dependency on libgcc for native targets to configure.
 lang_env_dependencies = { module=libiberty; no_c=true; };
 
-dependencies = { module=configure-target-boehm-gc; on=all-target-libstdc++-v3; };
 dependencies = { module=configure-target-fastjar; on=configure-target-zlib; };
 dependencies = { module=all-target-fastjar; on=all-target-zlib; };
 dependencies = { module=configure-target-libgo; on=configure-target-libffi; };
@@ -552,8 +550,6 @@
 dependencies = { module=all-target-libgo; on=all-target-libbacktrace; };
 dependencies = { module=all-target-libgo; on=all-target-libffi; };
 dependencies = { module=all-target-libgo; on=all-target-libatomic; };
-dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; };
-dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
 dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; };
 dependencies = { module=configure-target-liboffloadmic; on=configure-target-libgomp; };
 dependencies = { module=configure-target-libsanitizer; on=all-target-libstdc++-v3; };
Index: config/pkg.m4
===================================================================
--- config/pkg.m4	(nonexistent)
+++ config/pkg.m4	(working copy)
@@ -0,0 +1,275 @@
+dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
+dnl serial 11 (pkg-config-0.29)
+dnl
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=m4_default([$1], [0.9.0])
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		PKG_CONFIG=""
+	fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_default([$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes ],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+   	AC_MSG_RESULT([no])
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+        ])
+elif test $pkg_failed = untried; then
+     	AC_MSG_RESULT([no])
+	m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+        ])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	$3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+    [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+    [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
Index: configure.ac
===================================================================
--- configure.ac	(revision 240829)
+++ configure.ac	(working copy)
@@ -29,6 +29,7 @@
 m4_include([ltversion.m4])
 m4_include([lt~obsolete.m4])
 m4_include([config/isl.m4])
+m4_include([config/pkg.m4])
 
 AC_INIT(move-if-change)
 AC_PREREQ(2.64)
@@ -161,7 +162,6 @@
 		target-libssp \
 		target-libquadmath \
 		target-libgfortran \
-		target-boehm-gc \
 		target-libffi \
 		target-libobjc \
 		target-libada \
@@ -2060,23 +2060,15 @@
 [AS_HELP_STRING([--enable-objc-gc],
 		[enable use of Boehm's garbage collector with the
 		 GNU Objective-C runtime])],
-[case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
-  *,objc,*:*:yes:*target-boehm-gc*)
-    AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration])
+[AC_MSG_CHECKING([for Boehm's garbage collector])
+ case ,${enable_languages},:${enable_objc_gc} in
+  *,objc,*:yes)
+    PKG_CHECK_EXISTS(bdw-gc,
+      AC_MSG_RESULT([found]),
+      AC_MSG_ERROR([bdw-gc pkg-config module not found]))
     ;;
 esac])
 
-# Make sure we only build Boehm's garbage collector if required.
-case ,${enable_languages},:${enable_objc_gc} in
-  *,objc,*:yes)
-    # Keep target-boehm-gc if requested for Objective-C.
-    ;;
-  *)
-    # Otherwise remove target-boehm-gc.
-    noconfigdirs="$noconfigdirs target-boehm-gc"
-    ;;
-esac
-
 # Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
 case ,${enable_languages}, in
   *,c++,*)
Index: libobjc/Makefile.in
===================================================================
--- libobjc/Makefile.in	(revision 240829)
+++ libobjc/Makefile.in	(working copy)
@@ -47,8 +47,6 @@
 
 top_builddir = .
 
--include ../boehm-gc/threads.mk
-
 libdir = $(exec_prefix)/lib
 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
 
@@ -95,7 +93,7 @@
 OBJC_GCFLAGS=@OBJC_GCFLAGS@
 OBJC_BOEHM_GC=@OBJC_BOEHM_GC@
 OBJC_BOEHM_GC_INCLUDES=@OBJC_BOEHM_GC_INCLUDES@
-OBJC_BOEHM_GC_LIBS=../boehm-gc/libgcjgc_convenience.la $(thread_libs_and_flags)
+OBJC_BOEHM_GC_LIBS=@OBJC_BOEHM_GC_LIBS@
 
 INCLUDES = -I$(srcdir)/$(MULTISRCTOP)../gcc \
   -I$(srcdir)/$(MULTISRCTOP)../gcc/config \
Index: libobjc/configure.ac
===================================================================
--- libobjc/configure.ac	(revision 240829)
+++ libobjc/configure.ac	(working copy)
@@ -18,6 +18,8 @@
 #along with GCC; see the file COPYING3.  If not see
 #<http://www.gnu.org/licenses/>.
 
+m4_include([../config/pkg.m4])
+
 AC_PREREQ(2.64)
 AC_INIT(package-unused, version-unused,, libobjc)
 AC_CONFIG_SRCDIR([objc/objc.h])
@@ -57,26 +59,6 @@
 [version_specific_libs=no])
 AC_MSG_RESULT($version_specific_libs)
 
-AC_ARG_ENABLE(objc-gc,
-[  --enable-objc-gc       enable the use of Boehm's garbage collector with
-                          the GNU Objective-C runtime.],
-[case $enable_objc_gc in
-  no)
-    OBJC_GCFLAGS=''
-    OBJC_BOEHM_GC=''
-    OBJC_BOEHM_GC_INCLUDES=''
-    ;;
-  *)
-    OBJC_GCFLAGS='-DOBJC_WITH_GC=1'
-    OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la'
-    OBJC_BOEHM_GC_INCLUDES='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include'
-    ;;
-esac],
-[OBJC_GCFLAGS=''; OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES=''])
-AC_SUBST(OBJC_GCFLAGS)
-AC_SUBST(OBJC_BOEHM_GC)
-AC_SUBST(OBJC_BOEHM_GC_INCLUDES)
-
 # -----------
 # Directories
 # -----------
@@ -214,6 +196,38 @@
 
 gt_BITFIELD_TYPE_MATTERS
 
+# -----------
+# boehm-gc
+# -----------
+
+AC_ARG_ENABLE(objc-gc,
+[  --enable-objc-gc       enable the use of Boehm's garbage collector with
+                          the GNU Objective-C runtime.],
+[case $enable_objc_gc in
+  no)
+    OBJC_GCFLAGS=''
+    OBJC_BOEHM_GC=''
+    OBJC_BOEHM_GC_INCLUDES=''
+    OBJC_BOEHM_GC_LIBS=''
+    ;;
+  *)
+    PKG_CHECK_MODULES(BDW_GC, bdw-gc >= 7)
+    AC_CHECK_LIB(gc, GC_init, [
+      OBJC_GCFLAGS='-DOBJC_WITH_GC=1'
+      OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la'
+      OBJC_BOEHM_GC_INCLUDES=$BDW_GC_CFLAGS
+      OBJC_BOEHM_GC_LIBS=$BDW_GC_LIBS
+    ],[
+      : dnl no libgc for multilib variants available
+    ])
+    ;;
+esac],
+[OBJC_GCFLAGS=''; OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_LIBS=''; OBJC_BOEHM_GC_INCLUDES=''])
+AC_SUBST(OBJC_GCFLAGS)
+AC_SUBST(OBJC_BOEHM_GC)
+AC_SUBST(OBJC_BOEHM_GC_INCLUDES)
+AC_SUBST(OBJC_BOEHM_GC_LIBS)
+
 # ------
 # Output
 # ------
Index: libobjc/gc.c
===================================================================
--- libobjc/gc.c	(revision 240829)
+++ libobjc/gc.c	(working copy)
@@ -36,7 +36,7 @@
 #include "objc/runtime.h"
 #include "objc-private/module-abi-8.h"
 
-#include <gc.h>
+#include <gc/gc.h>
 #include <limits.h>
 
 /* gc_typed.h uses the following but doesn't declare them */
@@ -44,7 +44,7 @@
 typedef GC_signed_word signed_word;
 #define BITS_PER_WORD (CHAR_BIT * sizeof (word))
 
-#include <gc_typed.h>
+#include <gc/gc_typed.h>
 
 /* The following functions set up in `mask` the corresponding pointers.
    The offset is incremented with the size of the type.  */
Index: libobjc/memory.c
===================================================================
--- libobjc/memory.c	(revision 240829)
+++ libobjc/memory.c	(working copy)
@@ -41,7 +41,7 @@
 #include "objc/runtime.h"
 
 #if OBJC_WITH_GC
-#include <gc.h>
+#include <gc/gc.h>
 
 void *
 objc_malloc (size_t size)
Index: libobjc/objects.c
===================================================================
--- libobjc/objects.c	(revision 240829)
+++ libobjc/objects.c	(working copy)
@@ -31,8 +31,8 @@
 #include <string.h>                     /* For memcpy()  */
 
 #if OBJC_WITH_GC
-# include <gc.h>
-# include <gc_typed.h>
+# include <gc/gc.h>
+# include <gc/gc_typed.h>
 #endif
 
 /* FIXME: The semantics of extraBytes are not really clear.  */

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-06 16:16               ` Matthias Klose
@ 2016-10-06 16:43                 ` Rainer Orth
  2016-10-06 16:47                   ` Iain Sandoe
  0 siblings, 1 reply; 86+ messages in thread
From: Rainer Orth @ 2016-10-06 16:43 UTC (permalink / raw)
  To: Matthias Klose
  Cc: Jeff Law, Iain Sandoe, Andrew Haley, GCC Patches, GCJ-patches,
	Mike Stump

Hi Matthias,

>> Here's what I tested. This requires a boehm-gc version 7.0 or later
>> (having the
>> header files in a gc subdirectory).  Depending on your available library, it
>> only builds the GC enabled library for the default multilib library, and just
>> skips over building the non-default multilib variants (assuming that most
>> people
>> won't have a libgc for that installed).  The --enable-objc-gc option is not

this assumption may not hold, though: in Solaris 11+ where libgc is
bundled, both 32 and 64-bit libs are present, as always.  I'd also claim
that for multilib testing in general, it's bad to test different
multilibs with different configurations, so I'd rather have people doing
multilib testing obtain all variants of libgc.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-06 16:43                 ` Rainer Orth
@ 2016-10-06 16:47                   ` Iain Sandoe
  2016-10-06 16:54                     ` Matthias Klose
  0 siblings, 1 reply; 86+ messages in thread
From: Iain Sandoe @ 2016-10-06 16:47 UTC (permalink / raw)
  To: Matthias Klose
  Cc: Jeff Law, Andrew Haley, GCC Patches, GCJ-patches, Mike Stump,
	Rainer Orth


> On 6 Oct 2016, at 17:42, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
> 

>>> Here's what I tested. This requires a boehm-gc version 7.0 or later
>>> (having the
>>> header files in a gc subdirectory).  Depending on your available library, it
>>> only builds the GC enabled library for the default multilib library, and just
>>> skips over building the non-default multilib variants (assuming that most
>>> people
>>> won't have a libgc for that installed).  The --enable-objc-gc option is not
> 
> this assumption may not hold, though: in Solaris 11+ where libgc is
> bundled, both 32 and 64-bit libs are present, as always.  I'd also claim
> that for multilib testing in general, it's bad to test different
> multilibs with different configurations, so I'd rather have people doing
> multilib testing obtain all variants of libgc.

likewise on Darwin, people may well build “fat” libraries, and I also would encourage testing of m32/m64,
Iain

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-06 16:47                   ` Iain Sandoe
@ 2016-10-06 16:54                     ` Matthias Klose
  2016-10-06 16:56                       ` Rainer Orth
  0 siblings, 1 reply; 86+ messages in thread
From: Matthias Klose @ 2016-10-06 16:54 UTC (permalink / raw)
  To: Iain Sandoe
  Cc: Jeff Law, Andrew Haley, GCC Patches, GCJ-patches, Mike Stump,
	Rainer Orth

On 06.10.2016 18:46, Iain Sandoe wrote:
> 
>> On 6 Oct 2016, at 17:42, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
>>
> 
>>>> Here's what I tested. This requires a boehm-gc version 7.0 or later
>>>> (having the
>>>> header files in a gc subdirectory).  Depending on your available library, it
>>>> only builds the GC enabled library for the default multilib library, and just
>>>> skips over building the non-default multilib variants (assuming that most
>>>> people
>>>> won't have a libgc for that installed).  The --enable-objc-gc option is not
>>
>> this assumption may not hold, though: in Solaris 11+ where libgc is
>> bundled, both 32 and 64-bit libs are present, as always.  I'd also claim
>> that for multilib testing in general, it's bad to test different
>> multilibs with different configurations, so I'd rather have people doing
>> multilib testing obtain all variants of libgc.
> 
> likewise on Darwin, people may well build “fat” libraries, and I also would encourage testing of m32/m64,

so you both prefer to hard-fail if any of the libgc variants needed for the
multilibs is missing?  Maybe force this behaviour with --enable-objc-gc=yes, and
skip those which are not available with -enable-objc-gc=auto?

Matthias

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-06 16:54                     ` Matthias Klose
@ 2016-10-06 16:56                       ` Rainer Orth
  2016-10-06 17:10                         ` Iain Sandoe
  2016-10-06 18:01                         ` Mike Stump
  0 siblings, 2 replies; 86+ messages in thread
From: Rainer Orth @ 2016-10-06 16:56 UTC (permalink / raw)
  To: Matthias Klose
  Cc: Iain Sandoe, Jeff Law, Andrew Haley, GCC Patches, GCJ-patches,
	Mike Stump

Hi Matthias,

>>> this assumption may not hold, though: in Solaris 11+ where libgc is
>>> bundled, both 32 and 64-bit libs are present, as always.  I'd also claim
>>> that for multilib testing in general, it's bad to test different
>>> multilibs with different configurations, so I'd rather have people doing
>>> multilib testing obtain all variants of libgc.
>> 
>> likewise on Darwin, people may well build “fat” libraries, and I also
>> would encourage testing of m32/m64,
>
> so you both prefer to hard-fail if any of the libgc variants needed for the
> multilibs is missing?  Maybe force this behaviour with --enable-objc-gc=yes, and
> skip those which are not available with -enable-objc-gc=auto?

I wouldn't hard-fail, but completely disable objc-gc with an appropriate
warning.  The Objective-C maintainers may have other preferences, though.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-06 16:56                       ` Rainer Orth
@ 2016-10-06 17:10                         ` Iain Sandoe
  2016-10-06 18:01                         ` Mike Stump
  1 sibling, 0 replies; 86+ messages in thread
From: Iain Sandoe @ 2016-10-06 17:10 UTC (permalink / raw)
  To: Matthias Klose
  Cc: Jeff Law, Andrew Haley, GCC Patches, GCJ-patches, Mike Stump,
	Rainer Orth


> On 6 Oct 2016, at 17:56, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
> 

>>>> this assumption may not hold, though: in Solaris 11+ where libgc is
>>>> bundled, both 32 and 64-bit libs are present, as always.  I'd also claim
>>>> that for multilib testing in general, it's bad to test different
>>>> multilibs with different configurations, so I'd rather have people doing
>>>> multilib testing obtain all variants of libgc.
>>> 
>>> likewise on Darwin, people may well build “fat” libraries, and I also
>>> would encourage testing of m32/m64,
>> 
>> so you both prefer to hard-fail if any of the libgc variants needed for the
>> multilibs is missing?  Maybe force this behaviour with --enable-objc-gc=yes, and
>> skip those which are not available with -enable-objc-gc=auto?
> 
> I wouldn't hard-fail, but completely disable objc-gc with an appropriate
> warning.  The Objective-C maintainers may have other preferences, though.

that seems a reasonable strategy to me too (disable that capability when the library is not present) - I suspect that most people do not usually build with GC support anyway (but no firm statistics to back the hunch).

Iain

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-06 16:56                       ` Rainer Orth
  2016-10-06 17:10                         ` Iain Sandoe
@ 2016-10-06 18:01                         ` Mike Stump
  2016-10-06 23:59                           ` Matthias Klose
  1 sibling, 1 reply; 86+ messages in thread
From: Mike Stump @ 2016-10-06 18:01 UTC (permalink / raw)
  To: Rainer Orth
  Cc: Matthias Klose, Iain Sandoe, Jeff Law, Andrew Haley, GCC Patches,
	GCJ-patches

On Oct 6, 2016, at 9:56 AM, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
> I wouldn't hard-fail, but completely disable objc-gc with an appropriate
> warning.  The Objective-C maintainers may have other preferences, though.

gcc historically is fairly weak at complex configurations.  I need the 32 bit libraries to support -m32, but, those libraries might not be present, but do I build all the rest of my libraries, and if i do, do I test them once build, but what is other dependent external libraries are missing.  Do I turn off the multilib, or do I not?

I used to manage some of this by passing in configure flags to control multilibbing based upon what libraries were install and then run testing based upon that.  Of course, that's all external to gcc proper.  Doesn't really make gcc any easier to configure and build or advance gcc.

We could smell the system at configure time, and turn on and off multilib variants and things like objc gc.  Target specific, but I think it helps to ponder this in a target independent way.  This can then turn on and off objc gc support directly.  To get it on, one would need to install the needed libraries, and reconfigure and rebuild gcc.  I think I might like that the best.  Has a nice easy of use about it, and then everything gcc does is rather sane (no funny build errors when a needed library isn't present).


So, I think, if I understand what you propose, I'm fine with that.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-06 18:01                         ` Mike Stump
@ 2016-10-06 23:59                           ` Matthias Klose
  2016-10-07  8:31                             ` Iain Sandoe
  0 siblings, 1 reply; 86+ messages in thread
From: Matthias Klose @ 2016-10-06 23:59 UTC (permalink / raw)
  To: Mike Stump, Rainer Orth
  Cc: Iain Sandoe, Jeff Law, Andrew Haley, GCC Patches, GCJ-patches

On 06.10.2016 20:00, Mike Stump wrote:
> On Oct 6, 2016, at 9:56 AM, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
>> I wouldn't hard-fail, but completely disable objc-gc with an appropriate
>> warning.  The Objective-C maintainers may have other preferences, though.

I think I can't do that in the top level make file very well (currently I only
have the pkg-config check there for an early failure, but that check doesn't
tell me if the library is present for all multilib variants). And I can't check
for multilibs because I don't know if the bootstrap compiler is multilib aware.

> gcc historically is fairly weak at complex configurations.  I need the 32 bit libraries to support -m32, but, those libraries might not be present, but do I build all the rest of my libraries, and if i do, do I test them once build, but what is other dependent external libraries are missing.  Do I turn off the multilib, or do I not?
> 
> I used to manage some of this by passing in configure flags to control multilibbing based upon what libraries were install and then run testing based upon that.  Of course, that's all external to gcc proper.  Doesn't really make gcc any easier to configure and build or advance gcc.
> 
> We could smell the system at configure time, and turn on and off multilib variants and things like objc gc.  Target specific, but I think it helps to ponder this in a target independent way.  This can then turn on and off objc gc support directly.  To get it on, one would need to install the needed libraries, and reconfigure and rebuild gcc.  I think I might like that the best.  Has a nice easy of use about it, and then everything gcc does is rather sane (no funny build errors when a needed library isn't present).
> 
> 
> So, I think, if I understand what you propose, I'm fine with that.

So your proposal is to replace the ": dnl ..." line in libobjc/configure.ac with
a hard error message and leave it to the user to correctly configure GCC?  That
would rely on the compiler to find the library in a system wide multilib aware
directory (e.g. /usr/lib/i386-linux-gnu, or /usr/lib32).  Is this the case for
Solaris and Darwin?

I'm fine with that, it wouldn't affect configurations like x86_64-linux-gnu
where multilib is the default (but objc-gc is not).

Looking back at libjava, I think everybody disabled multilibs for libjava,
because nobody had a complete gtk2 stack for multilibs, however that was a
complete subdir, not just a certain configuration in that subdir. Looking back
at libffi and separate released libffi's I first built multilib'ed libffi
libraries from the libffi source for Debian/Ubuntu, then dropped these because
they were not used, and until today GCC internal and external libffi are
hopelessly out of sync, so you couldn't use an external libffi to build libjava.

In the past I looked at updating boehm-gc to recent sources but never finished
because libjava relied on internals.  Afaics this is not the case for objc-gc,
so maybe you could update boehm-gc. But I don't want to go this road myself ...

Matthias

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-06 23:59                           ` Matthias Klose
@ 2016-10-07  8:31                             ` Iain Sandoe
  2016-10-10  4:03                               ` Matthias Klose
  0 siblings, 1 reply; 86+ messages in thread
From: Iain Sandoe @ 2016-10-07  8:31 UTC (permalink / raw)
  To: Matthias Klose
  Cc: Mike Stump, Rainer Orth, Jeff Law, Andrew Haley, GCC Patches,
	GCJ-patches


> On 7 Oct 2016, at 00:58, Matthias Klose <doko@ubuntu.com> wrote:
> 
> On 06.10.2016 20:00, Mike Stump wrote:
>> On Oct 6, 2016, at 9:56 AM, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
>>> I wouldn't hard-fail, but completely disable objc-gc with an appropriate
>>> warning.  The Objective-C maintainers may have other preferences, though.
> 
> I think I can't do that in the top level make file very well (currently I only
> have the pkg-config check there for an early failure, but that check doesn't
> tell me if the library is present for all multilib variants). And I can't check
> for multilibs because I don't know if the bootstrap compiler is multilib aware.

hrm, so perhaps we need a —with-target-boehm-gc= type arrangement, and it’s the configurer’s responsibility to provide a path with appropriate headers/libs for the multi-lib configuration being attempted.
> 
>> gcc historically is fairly weak at complex configurations.  I need the 32 bit libraries to support -m32, but, those libraries might not be present, but do I build all the rest of my libraries, and if i do, do I test them once build, but what is other dependent external libraries are missing.  Do I turn off the multilib, or do I not?
>> 
>> I used to manage some of this by passing in configure flags to control multilibbing based upon what libraries were install and then run testing based upon that.  Of course, that's all external to gcc proper. Doesn't really make gcc any easier to configure and build or advance gcc.
>> 
>> We could smell the system at configure time, and turn on and off multilib variants and things like objc gc. Target specific, but I think it helps to ponder this in a target independent way.  This can then turn on and off objc gc support directly.  To get it on, one would need to install the needed libraries, and reconfigure and rebuild gcc.  I think I might like that the best.  Has a nice easy of use about it, and then everything gcc does is rather sane (no funny build errors when a needed library isn't present).
>> 
>> 
>> So, I think, if I understand what you propose, I'm fine with that.
> 
> So your proposal is to replace the ": dnl ..." line in libobjc/configure.ac with
> a hard error message and leave it to the user to correctly configure GCC?  That
> would rely on the compiler to find the library in a system wide multilib aware
> directory (e.g. /usr/lib/i386-linux-gnu, or /usr/lib32).  Is this the case for
> Solaris and Darwin?

for Darwin, it’s not a default install (but then neither are the host deps such as gmp & friends) - so the toolchain builder on Darwin already needs to make some provisions outside the system.  It’s just that the only target provisions to date have been the sysroot (we haven’t yet made use of add-on target libs).

> I'm fine with that, it wouldn't affect configurations like x86_64-linux-gnu
> where multilib is the default (but objc-gc is not).
> 
> Looking back at libjava, I think everybody disabled multilibs for libjava,
> because nobody had a complete gtk2 stack for multilibs, however that was a
> complete subdir, not just a certain configuration in that subdir. Looking back
> at libffi and separate released libffi's I first built multilib'ed libffi
> libraries from the libffi source for Debian/Ubuntu, then dropped these because
> they were not used, and until today GCC internal and external libffi are
> hopelessly out of sync, so you couldn't use an external libffi to build libjava.

Becase Darwin’s libjava does not depend on the gtk2 stack, actually normally libjava (and libffi, gc) were generally built and tested (by those who cared to do it) as multilibs [the default].
> 
> In the past I looked at updating boehm-gc to recent sources but never finished
> because libjava relied on internals.  Afaics this is not the case for objc-gc,
> so maybe you could update boehm-gc. But I don't want to go this road myself …

.. and I don’t have cycles to volunteer to try this at present either.
Iain


> 
> Matthias

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-07  8:31                             ` Iain Sandoe
@ 2016-10-10  4:03                               ` Matthias Klose
  2016-10-10  7:58                                 ` Iain Sandoe
  0 siblings, 1 reply; 86+ messages in thread
From: Matthias Klose @ 2016-10-10  4:03 UTC (permalink / raw)
  To: Iain Sandoe
  Cc: Mike Stump, Rainer Orth, Jeff Law, Andrew Haley, GCC Patches,
	GCJ-patches

On 07.10.2016 10:30, Iain Sandoe wrote:
> 
>> On 7 Oct 2016, at 00:58, Matthias Klose <doko@ubuntu.com> wrote:
>>
>> On 06.10.2016 20:00, Mike Stump wrote:
>>> On Oct 6, 2016, at 9:56 AM, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
>>>> I wouldn't hard-fail, but completely disable objc-gc with an appropriate
>>>> warning.  The Objective-C maintainers may have other preferences, though.
>>
>> I think I can't do that in the top level make file very well (currently I only
>> have the pkg-config check there for an early failure, but that check doesn't
>> tell me if the library is present for all multilib variants). And I can't check
>> for multilibs because I don't know if the bootstrap compiler is multilib aware.
> 
> hrm, so perhaps we need a —with-target-boehm-gc= type arrangement, and it’s the configurer’s responsibility to provide a path with appropriate headers/libs for the multi-lib configuration being attempted.

I don't understand what you are proposing here.

>>> gcc historically is fairly weak at complex configurations.  I need the 32 bit libraries to support -m32, but, those libraries might not be present, but do I build all the rest of my libraries, and if i do, do I test them once build, but what is other dependent external libraries are missing.  Do I turn off the multilib, or do I not?
>>>
>>> I used to manage some of this by passing in configure flags to control multilibbing based upon what libraries were install and then run testing based upon that.  Of course, that's all external to gcc proper. Doesn't really make gcc any easier to configure and build or advance gcc.
>>>
>>> We could smell the system at configure time, and turn on and off multilib variants and things like objc gc. Target specific, but I think it helps to ponder this in a target independent way.  This can then turn on and off objc gc support directly.  To get it on, one would need to install the needed libraries, and reconfigure and rebuild gcc.  I think I might like that the best.  Has a nice easy of use about it, and then everything gcc does is rather sane (no funny build errors when a needed library isn't present).
>>>
>>>
>>> So, I think, if I understand what you propose, I'm fine with that.
>>
>> So your proposal is to replace the ": dnl ..." line in libobjc/configure.ac with
>> a hard error message and leave it to the user to correctly configure GCC?  That
>> would rely on the compiler to find the library in a system wide multilib aware
>> directory (e.g. /usr/lib/i386-linux-gnu, or /usr/lib32).  Is this the case for
>> Solaris and Darwin?
> 
> for Darwin, it’s not a default install (but then neither are the host deps such as gmp & friends) - so the toolchain builder on Darwin already needs to make some provisions outside the system.  It’s just that the only target provisions to date have been the sysroot (we haven’t yet made use of add-on target libs).
> 
>> I'm fine with that, it wouldn't affect configurations like x86_64-linux-gnu
>> where multilib is the default (but objc-gc is not).
>>
>> Looking back at libjava, I think everybody disabled multilibs for libjava,
>> because nobody had a complete gtk2 stack for multilibs, however that was a
>> complete subdir, not just a certain configuration in that subdir. Looking back
>> at libffi and separate released libffi's I first built multilib'ed libffi
>> libraries from the libffi source for Debian/Ubuntu, then dropped these because
>> they were not used, and until today GCC internal and external libffi are
>> hopelessly out of sync, so you couldn't use an external libffi to build libjava.
> 
> Becase Darwin’s libjava does not depend on the gtk2 stack, actually normally libjava (and libffi, gc) were generally built and tested (by those who cared to do it) as multilibs [the default].
>>
>> In the past I looked at updating boehm-gc to recent sources but never finished
>> because libjava relied on internals.  Afaics this is not the case for objc-gc,
>> so maybe you could update boehm-gc. But I don't want to go this road myself …
> 
> .. and I don’t have cycles to volunteer to try this at present either.
> Iain
> 
> 
>>
>> Matthias
> 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-10  4:03                               ` Matthias Klose
@ 2016-10-10  7:58                                 ` Iain Sandoe
  2016-11-20 20:42                                   ` Matthias Klose
  0 siblings, 1 reply; 86+ messages in thread
From: Iain Sandoe @ 2016-10-10  7:58 UTC (permalink / raw)
  To: Matthias Klose
  Cc: Mike Stump, Rainer Orth, Jeff Law, Andrew Haley, GCC Patches,
	GCJ-patches


> On 10 Oct 2016, at 05:03, Matthias Klose <doko@ubuntu.com> wrote:
> 
> On 07.10.2016 10:30, Iain Sandoe wrote:
>> 
>>> On 7 Oct 2016, at 00:58, Matthias Klose <doko@ubuntu.com> wrote:
>>> 
>>> On 06.10.2016 20:00, Mike Stump wrote:
>>>> On Oct 6, 2016, at 9:56 AM, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
>>>>> I wouldn't hard-fail, but completely disable objc-gc with an appropriate
>>>>> warning.  The Objective-C maintainers may have other preferences, though.
>>> 
>>> I think I can't do that in the top level make file very well (currently I only
>>> have the pkg-config check there for an early failure, but that check doesn't
>>> tell me if the library is present for all multilib variants). And I can't check
>>> for multilibs because I don't know if the bootstrap compiler is multilib aware.
>> 
>> hrm, so perhaps we need a —with-target-boehm-gc= type arrangement, and it’s the configurer’s responsibility to provide a path with appropriate headers/libs for the multi-lib configuration being attempted.
> 
> I don't understand what you are proposing here.

given that:
 auto-detection of the capabilities could be quite difficult (or, in the general case, unachievable) for the reasons you gave.
 the chosen target libraries might be in a non-standard place.

making it an explicit requirement to point to them, and to ensure that the versions/multi-libs provided are suitable, (by putting —with-target-boehm-gc=/path/to/suitable/) would mean that the dependent configury (for objc-gc) could be just conditional upon the  presence of the "with-target-boehm-gc”.

I suppose that one could make "—with-target-boehm-gc” (no attached path) declare that the library (and requisite mult-lib versions) will be found in the sysroot without any additional work.

The point here was to simplify the dependent configury so that it only needs to test something that the configuring user specifies (i.e. if they specify objc-gc, then they need also to specify the place that the gc lib can be found).

>>>> gcc historically is fairly weak at complex configurations.  I need the 32 bit libraries to support -m32, but, those libraries might not be present, but do I build all the rest of my libraries, and if i do, do I test them once build, but what is other dependent external libraries are missing.  Do I turn off the multilib, or do I not?
>>>> 
>>>> I used to manage some of this by passing in configure flags to control multilibbing based upon what libraries were install and then run testing based upon that.  Of course, that's all external to gcc proper. Doesn't really make gcc any easier to configure and build or advance gcc.
>>>> 
>>>> We could smell the system at configure time, and turn on and off multilib variants and things like objc gc. Target specific, but I think it helps to ponder this in a target independent way.  This can then turn on and off objc gc support directly.  To get it on, one would need to install the needed libraries, and reconfigure and rebuild gcc.  I think I might like that the best.  Has a nice easy of use about it, and then everything gcc does is rather sane (no funny build errors when a needed library isn't present).
>>>> 
>>>> 
>>>> So, I think, if I understand what you propose, I'm fine with that.
>>> 
>>> So your proposal is to replace the ": dnl ..." line in libobjc/configure.ac with
>>> a hard error message and leave it to the user to correctly configure GCC?  That
>>> would rely on the compiler to find the library in a system wide multilib aware
>>> directory (e.g. /usr/lib/i386-linux-gnu, or /usr/lib32).  Is this the case for
>>> Solaris and Darwin?
>> 
>> for Darwin, it’s not a default install (but then neither are the host deps such as gmp & friends) - so the toolchain builder on Darwin already needs to make some provisions outside the system.  It’s just that the only target provisions to date have been the sysroot (we haven’t yet made use of add-on target libs).
>> 
>>> I'm fine with that, it wouldn't affect configurations like x86_64-linux-gnu
>>> where multilib is the default (but objc-gc is not).
>>> 
>>> Looking back at libjava, I think everybody disabled multilibs for libjava,
>>> because nobody had a complete gtk2 stack for multilibs, however that was a
>>> complete subdir, not just a certain configuration in that subdir. Looking back
>>> at libffi and separate released libffi's I first built multilib'ed libffi
>>> libraries from the libffi source for Debian/Ubuntu, then dropped these because
>>> they were not used, and until today GCC internal and external libffi are
>>> hopelessly out of sync, so you couldn't use an external libffi to build libjava.
>> 
>> Becase Darwin’s libjava does not depend on the gtk2 stack, actually normally libjava (and libffi, gc) were generally built and tested (by those who cared to do it) as multilibs [the default].
>>> 
>>> In the past I looked at updating boehm-gc to recent sources but never finished
>>> because libjava relied on internals.  Afaics this is not the case for objc-gc,
>>> so maybe you could update boehm-gc. But I don't want to go this road myself …
>> 
>> .. and I don’t have cycles to volunteer to try this at present either.
>> Iain
>> 
>> 
>>> 
>>> Matthias
>> 
> 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-10-04  9:23               ` Jakub Jelinek
@ 2016-10-19 12:14                 ` Rainer Orth
  2016-10-24 18:51                   ` Jeff Law
  0 siblings, 1 reply; 86+ messages in thread
From: Rainer Orth @ 2016-10-19 12:14 UTC (permalink / raw)
  To: Jakub Jelinek
  Cc: Eric Gallager, Andrew Haley, Ian Lance Taylor, Marek Polacek,
	gcc-patches

Hi Jakub,

>> 2016-10-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>> 
>> 	* configure.ac (target_libraries): Readd target-boehm-gc.
>> 	Restore --enable-objc-gc handling.
>> 	* configure: Regenerate.
>
> This is incomplete.  I guess it can be committed as is, but should be
> followed by re-addition of:
>   bfin-*-*)
>     noconfigdirs="$noconfigdirs target-boehm-gc"
>     ;;
>   cris-*-* | crisv32-*-*)
>     case "${target}" in
>       *-*-linux*)
>         ;;
>       *) # See PR46792 regarding target-libffi.
>         noconfigdirs="$noconfigdirs target-boehm-gc";;
>     esac
>     ;;
>   mmix-*-*)
>     noconfigdirs="$noconfigdirs target-boehm-gc"
>     ;;
> (perhaps in the same case as target-libffi handling).

sorry I missed this.  I can still re-add it if desired, but would rather
keep it in a separate case from the target-libffi handling: in-tree
boehm-gc may be replaced with an external version, while libffi is
likely to stay for libgo.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-10-19 12:14                 ` Rainer Orth
@ 2016-10-24 18:51                   ` Jeff Law
  2016-10-27 12:02                     ` Rainer Orth
                                       ` (3 more replies)
  0 siblings, 4 replies; 86+ messages in thread
From: Jeff Law @ 2016-10-24 18:51 UTC (permalink / raw)
  To: Rainer Orth, Jakub Jelinek
  Cc: Eric Gallager, Andrew Haley, Ian Lance Taylor, Marek Polacek,
	gcc-patches

On 10/19/2016 06:13 AM, Rainer Orth wrote:
> Hi Jakub,
>
>>> 2016-10-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>>>
>>> 	* configure.ac (target_libraries): Readd target-boehm-gc.
>>> 	Restore --enable-objc-gc handling.
>>> 	* configure: Regenerate.
>>
>> This is incomplete.  I guess it can be committed as is, but should be
>> followed by re-addition of:
>>   bfin-*-*)
>>     noconfigdirs="$noconfigdirs target-boehm-gc"
>>     ;;
>>   cris-*-* | crisv32-*-*)
>>     case "${target}" in
>>       *-*-linux*)
>>         ;;
>>       *) # See PR46792 regarding target-libffi.
>>         noconfigdirs="$noconfigdirs target-boehm-gc";;
>>     esac
>>     ;;
>>   mmix-*-*)
>>     noconfigdirs="$noconfigdirs target-boehm-gc"
>>     ;;
>> (perhaps in the same case as target-libffi handling).
>
> sorry I missed this.  I can still re-add it if desired, but would rather
> keep it in a separate case from the target-libffi handling: in-tree
> boehm-gc may be replaced with an external version, while libffi is
> likely to stay for libgo.
I think disabling of target-boehm-gc for these targets was because they 
didn't support Java for various reasons.   However, ISTM that we'd need 
it for objc-gc.  So I think we shouldn't be adding these hunks at this 
point.

In theory we could build those targets after configuring with 
--eanble-objc-gc as a test.
jeff

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-10-24 18:51                   ` Jeff Law
  2016-10-27 12:02                     ` Rainer Orth
  2016-10-27 12:02                     ` Rainer Orth
@ 2016-10-27 12:02                     ` Rainer Orth
  2016-10-27 12:02                     ` Rainer Orth
  3 siblings, 0 replies; 86+ messages in thread
From: Rainer Orth @ 2016-10-27 12:02 UTC (permalink / raw)
  To: Jeff Law
  Cc: Jakub Jelinek, Eric Gallager, Andrew Haley, Ian Lance Taylor,
	Marek Polacek, gcc-patches

Hi Jeff,

> On 10/19/2016 06:13 AM, Rainer Orth wrote:
>> Hi Jakub,
>>
>>>> 2016-10-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>>>>
>>>> 	* configure.ac (target_libraries): Readd target-boehm-gc.
>>>> 	Restore --enable-objc-gc handling.
>>>> 	* configure: Regenerate.
>>>
>>> This is incomplete.  I guess it can be committed as is, but should be
>>> followed by re-addition of:
>>>   bfin-*-*)
>>>     noconfigdirs="$noconfigdirs target-boehm-gc"
>>>     ;;
>>>   cris-*-* | crisv32-*-*)
>>>     case "${target}" in
>>>       *-*-linux*)
>>>         ;;
>>>       *) # See PR46792 regarding target-libffi.
>>>         noconfigdirs="$noconfigdirs target-boehm-gc";;
>>>     esac
>>>     ;;
>>>   mmix-*-*)
>>>     noconfigdirs="$noconfigdirs target-boehm-gc"
>>>     ;;
>>> (perhaps in the same case as target-libffi handling).
>>
>> sorry I missed this.  I can still re-add it if desired, but would rather
>> keep it in a separate case from the target-libffi handling: in-tree
>> boehm-gc may be replaced with an external version, while libffi is
>> likely to stay for libgo.
> I think disabling of target-boehm-gc for these targets was because they
> didn't support Java for various reasons.   However, ISTM that we'd need it

but wouldn't it have been sufficient to just disable libjava in this
case?  boehm-gc was only dragged in for libjava (or --enable-objc-gc), IIUC.

> for objc-gc.  So I think we shouldn't be adding these hunks at this point.

Fine with me ;-)

> In theory we could build those targets after configuring with
> --eanble-objc-gc as a test.

True, but that would need complete cross-development environments for
those targets.  I'm certainly not up for that, especially not at this
point.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-10-24 18:51                   ` Jeff Law
  2016-10-27 12:02                     ` Rainer Orth
@ 2016-10-27 12:02                     ` Rainer Orth
  2016-10-27 16:00                       ` Jeff Law
  2016-10-27 12:02                     ` Rainer Orth
  2016-10-27 12:02                     ` Rainer Orth
  3 siblings, 1 reply; 86+ messages in thread
From: Rainer Orth @ 2016-10-27 12:02 UTC (permalink / raw)
  To: Jeff Law
  Cc: Jakub Jelinek, Eric Gallager, Andrew Haley, Ian Lance Taylor,
	Marek Polacek, gcc-patches

Hi Jeff,

> On 10/19/2016 06:13 AM, Rainer Orth wrote:
>> Hi Jakub,
>>
>>>> 2016-10-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>>>>
>>>> 	* configure.ac (target_libraries): Readd target-boehm-gc.
>>>> 	Restore --enable-objc-gc handling.
>>>> 	* configure: Regenerate.
>>>
>>> This is incomplete.  I guess it can be committed as is, but should be
>>> followed by re-addition of:
>>>   bfin-*-*)
>>>     noconfigdirs="$noconfigdirs target-boehm-gc"
>>>     ;;
>>>   cris-*-* | crisv32-*-*)
>>>     case "${target}" in
>>>       *-*-linux*)
>>>         ;;
>>>       *) # See PR46792 regarding target-libffi.
>>>         noconfigdirs="$noconfigdirs target-boehm-gc";;
>>>     esac
>>>     ;;
>>>   mmix-*-*)
>>>     noconfigdirs="$noconfigdirs target-boehm-gc"
>>>     ;;
>>> (perhaps in the same case as target-libffi handling).
>>
>> sorry I missed this.  I can still re-add it if desired, but would rather
>> keep it in a separate case from the target-libffi handling: in-tree
>> boehm-gc may be replaced with an external version, while libffi is
>> likely to stay for libgo.
> I think disabling of target-boehm-gc for these targets was because they
> didn't support Java for various reasons.   However, ISTM that we'd need it

but wouldn't it have been sufficient to just disable libjava in this
case?  boehm-gc was only dragged in for libjava (or --enable-objc-gc), IIUC.

> for objc-gc.  So I think we shouldn't be adding these hunks at this point.

Fine with me ;-)

> In theory we could build those targets after configuring with
> --eanble-objc-gc as a test.

True, but that would need complete cross-development environments for
those targets.  I'm certainly not up for that, especially not at this
point.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-10-24 18:51                   ` Jeff Law
@ 2016-10-27 12:02                     ` Rainer Orth
  2016-10-27 12:02                     ` Rainer Orth
                                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 86+ messages in thread
From: Rainer Orth @ 2016-10-27 12:02 UTC (permalink / raw)
  To: Jeff Law
  Cc: Jakub Jelinek, Eric Gallager, Andrew Haley, Ian Lance Taylor,
	Marek Polacek, gcc-patches

Hi Jeff,

> On 10/19/2016 06:13 AM, Rainer Orth wrote:
>> Hi Jakub,
>>
>>>> 2016-10-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>>>>
>>>> 	* configure.ac (target_libraries): Readd target-boehm-gc.
>>>> 	Restore --enable-objc-gc handling.
>>>> 	* configure: Regenerate.
>>>
>>> This is incomplete.  I guess it can be committed as is, but should be
>>> followed by re-addition of:
>>>   bfin-*-*)
>>>     noconfigdirs="$noconfigdirs target-boehm-gc"
>>>     ;;
>>>   cris-*-* | crisv32-*-*)
>>>     case "${target}" in
>>>       *-*-linux*)
>>>         ;;
>>>       *) # See PR46792 regarding target-libffi.
>>>         noconfigdirs="$noconfigdirs target-boehm-gc";;
>>>     esac
>>>     ;;
>>>   mmix-*-*)
>>>     noconfigdirs="$noconfigdirs target-boehm-gc"
>>>     ;;
>>> (perhaps in the same case as target-libffi handling).
>>
>> sorry I missed this.  I can still re-add it if desired, but would rather
>> keep it in a separate case from the target-libffi handling: in-tree
>> boehm-gc may be replaced with an external version, while libffi is
>> likely to stay for libgo.
> I think disabling of target-boehm-gc for these targets was because they
> didn't support Java for various reasons.   However, ISTM that we'd need it

but wouldn't it have been sufficient to just disable libjava in this
case?  boehm-gc was only dragged in for libjava (or --enable-objc-gc), IIUC.

> for objc-gc.  So I think we shouldn't be adding these hunks at this point.

Fine with me ;-)

> In theory we could build those targets after configuring with
> --eanble-objc-gc as a test.

True, but that would need complete cross-development environments for
those targets.  I'm certainly not up for that, especially not at this
point.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-10-24 18:51                   ` Jeff Law
                                       ` (2 preceding siblings ...)
  2016-10-27 12:02                     ` Rainer Orth
@ 2016-10-27 12:02                     ` Rainer Orth
  3 siblings, 0 replies; 86+ messages in thread
From: Rainer Orth @ 2016-10-27 12:02 UTC (permalink / raw)
  To: Jeff Law
  Cc: Jakub Jelinek, Eric Gallager, Andrew Haley, Ian Lance Taylor,
	Marek Polacek, gcc-patches

Hi Jeff,

> On 10/19/2016 06:13 AM, Rainer Orth wrote:
>> Hi Jakub,
>>
>>>> 2016-10-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>>>>
>>>> 	* configure.ac (target_libraries): Readd target-boehm-gc.
>>>> 	Restore --enable-objc-gc handling.
>>>> 	* configure: Regenerate.
>>>
>>> This is incomplete.  I guess it can be committed as is, but should be
>>> followed by re-addition of:
>>>   bfin-*-*)
>>>     noconfigdirs="$noconfigdirs target-boehm-gc"
>>>     ;;
>>>   cris-*-* | crisv32-*-*)
>>>     case "${target}" in
>>>       *-*-linux*)
>>>         ;;
>>>       *) # See PR46792 regarding target-libffi.
>>>         noconfigdirs="$noconfigdirs target-boehm-gc";;
>>>     esac
>>>     ;;
>>>   mmix-*-*)
>>>     noconfigdirs="$noconfigdirs target-boehm-gc"
>>>     ;;
>>> (perhaps in the same case as target-libffi handling).
>>
>> sorry I missed this.  I can still re-add it if desired, but would rather
>> keep it in a separate case from the target-libffi handling: in-tree
>> boehm-gc may be replaced with an external version, while libffi is
>> likely to stay for libgo.
> I think disabling of target-boehm-gc for these targets was because they
> didn't support Java for various reasons.   However, ISTM that we'd need it

but wouldn't it have been sufficient to just disable libjava in this
case?  boehm-gc was only dragged in for libjava (or --enable-objc-gc), IIUC.

> for objc-gc.  So I think we shouldn't be adding these hunks at this point.

Fine with me ;-)

> In theory we could build those targets after configuring with
> --eanble-objc-gc as a test.

True, but that would need complete cross-development environments for
those targets.  I'm certainly not up for that, especially not at this
point.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Fix bootstrap with --enable-languages=all,go
  2016-10-27 12:02                     ` Rainer Orth
@ 2016-10-27 16:00                       ` Jeff Law
  0 siblings, 0 replies; 86+ messages in thread
From: Jeff Law @ 2016-10-27 16:00 UTC (permalink / raw)
  To: Rainer Orth
  Cc: Jakub Jelinek, Eric Gallager, Andrew Haley, Ian Lance Taylor,
	Marek Polacek, gcc-patches

On 10/27/2016 05:00 AM, Rainer Orth wrote:
> Hi Jeff,
>
>> On 10/19/2016 06:13 AM, Rainer Orth wrote:
>>> Hi Jakub,
>>>
>>>>> 2016-10-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>>>>>
>>>>> 	* configure.ac (target_libraries): Readd target-boehm-gc.
>>>>> 	Restore --enable-objc-gc handling.
>>>>> 	* configure: Regenerate.
>>>>
>>>> This is incomplete.  I guess it can be committed as is, but should be
>>>> followed by re-addition of:
>>>>   bfin-*-*)
>>>>     noconfigdirs="$noconfigdirs target-boehm-gc"
>>>>     ;;
>>>>   cris-*-* | crisv32-*-*)
>>>>     case "${target}" in
>>>>       *-*-linux*)
>>>>         ;;
>>>>       *) # See PR46792 regarding target-libffi.
>>>>         noconfigdirs="$noconfigdirs target-boehm-gc";;
>>>>     esac
>>>>     ;;
>>>>   mmix-*-*)
>>>>     noconfigdirs="$noconfigdirs target-boehm-gc"
>>>>     ;;
>>>> (perhaps in the same case as target-libffi handling).
>>>
>>> sorry I missed this.  I can still re-add it if desired, but would rather
>>> keep it in a separate case from the target-libffi handling: in-tree
>>> boehm-gc may be replaced with an external version, while libffi is
>>> likely to stay for libgo.
>> I think disabling of target-boehm-gc for these targets was because they
>> didn't support Java for various reasons.   However, ISTM that we'd need it
>
> but wouldn't it have been sufficient to just disable libjava in this
> case?  boehm-gc was only dragged in for libjava (or --enable-objc-gc), IIUC.
It would have been sufficient -- I think it was just overlooked as an 
option at the time.

>
>> In theory we could build those targets after configuring with
>> --eanble-objc-gc as a test.
>
> True, but that would need complete cross-development environments for
> those targets.  I'm certainly not up for that, especially not at this
> point.
:-)   It was just an observation, certainly not going to require that of 
you.

jeff

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-02 13:27         ` [PATCH] Delete GCJ Andreas Schwab
  2016-10-02 16:51           ` Andrew Haley
  2016-10-02 19:59           ` [C++ PATCH] Delete GCJ - C++ part Jakub Jelinek
@ 2016-10-28 20:57           ` Eric Botcazou
  2017-01-22 23:06           ` Gerald Pfeifer
  3 siblings, 0 replies; 86+ messages in thread
From: Eric Botcazou @ 2016-10-28 20:57 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gcc-patches, Andrew Haley, Marek Polacek

> Things we may want to remove:
> 
> - references to java in contrib (download_ecj, gcc_update,
>   patch_tester.sh, update-copyright.py)
> - GCJ, GCJ_FOR_BUILD, GCJ_FOR_TARGET in Makefiles.tpl and configure.ac
> - LIBGCJ_SONAME in config/i386/{cygwin.h,mingw32.h}
> - references to java in install.texi

There are more references in sourcebuild.texi and install.texi.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-10  7:58                                 ` Iain Sandoe
@ 2016-11-20 20:42                                   ` Matthias Klose
  2016-11-21  5:34                                     ` Sandra Loosemore
  2016-11-21 10:24                                     ` Iain Sandoe
  0 siblings, 2 replies; 86+ messages in thread
From: Matthias Klose @ 2016-11-20 20:42 UTC (permalink / raw)
  To: Iain Sandoe
  Cc: Mike Stump, Rainer Orth, Jeff Law, Andrew Haley, GCC Patches,
	GCJ-patches

[-- Attachment #1: Type: text/plain, Size: 3124 bytes --]

On 10.10.2016 09:58, Iain Sandoe wrote:
> 
>> On 10 Oct 2016, at 05:03, Matthias Klose <doko@ubuntu.com> wrote:
>>
>> On 07.10.2016 10:30, Iain Sandoe wrote:
>>>
>>>> On 7 Oct 2016, at 00:58, Matthias Klose <doko@ubuntu.com> wrote:
>>>>
>>>> On 06.10.2016 20:00, Mike Stump wrote:
>>>>> On Oct 6, 2016, at 9:56 AM, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
>>>>>> I wouldn't hard-fail, but completely disable objc-gc with an appropriate
>>>>>> warning.  The Objective-C maintainers may have other preferences, though.
>>>>
>>>> I think I can't do that in the top level make file very well (currently I only
>>>> have the pkg-config check there for an early failure, but that check doesn't
>>>> tell me if the library is present for all multilib variants). And I can't check
>>>> for multilibs because I don't know if the bootstrap compiler is multilib aware.
>>>
>>> hrm, so perhaps we need a —with-target-boehm-gc= type arrangement, and it’s the configurer’s responsibility to provide a path with appropriate headers/libs for the multi-lib configuration being attempted.
>>
>> I don't understand what you are proposing here.
> 
> given that:
>  auto-detection of the capabilities could be quite difficult (or, in the general case, unachievable) for the reasons you gave.
>  the chosen target libraries might be in a non-standard place.
> 
> making it an explicit requirement to point to them, and to ensure that the versions/multi-libs provided are suitable, (by putting —with-target-boehm-gc=/path/to/suitable/) would mean that the dependent configury (for objc-gc) could be just conditional upon the  presence of the "with-target-boehm-gc”.
> 
> I suppose that one could make "—with-target-boehm-gc” (no attached path) declare that the library (and requisite mult-lib versions) will be found in the sysroot without any additional work.
> 
> The point here was to simplify the dependent configury so that it only needs to test something that the configuring user specifies (i.e. if they specify objc-gc, then they need also to specify the place that the gc lib can be found).

So here is the next proposal, I hope the added documentation in install.texi
makes the usage clear.

<toplevel>

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	* Makefile.def: Remove reference to boehm-gc target module.
  	* configure.ac: Include pkg.m4, check for --with-target-bdw-gc
	options and for the bdw-gc pkg-config module.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

gcc/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	* doc/install.texi: Document configure options --enable-objc-gc
	and --with-target-bdw-gc.

config/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	* pkg.m4: New file.

libobjc/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	* configure.ac (--enable-objc-gc): Allow to configure with a
	system provided boehm-gc.
	* configure: Regenerate.
	* Makefile.in (OBJC_BOEHM_GC_LIBS): Get value from configure.
	* gc.c: Include system bdw-gc headers.
	* memory.c: Likewise
	* objects.c: Likewise

boehm-gc/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	Remove




[-- Attachment #2: libobjc-bdw-gc.diff --]
[-- Type: text/x-diff, Size: 15646 bytes --]

<toplevel>

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	* Makefile.def: Remove reference to boehm-gc target module.
  	* configure.ac: Include pkg.m4, check for --with-target-bdw-gc
	options and for the bdw-gc pkg-config module.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

gcc/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	* doc/install.texi: Document configure options --enable-objc-gc
	and --with-target-bdw-gc.

config/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	* pkg.m4: New file.

libobjc/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	* configure.ac (--enable-objc-gc): Allow to configure with a
	system provided boehm-gc.
	* configure: Regenerate.
	* Makefile.in (OBJC_BOEHM_GC_LIBS): Get value from configure.
	* gc.c: Include system bdw-gc headers.
	* memory.c: Likewise
	* objects.c: Likewise

boehm-gc/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	Remove

Index: Makefile.def
===================================================================
--- Makefile.def	(revision 242638)
+++ Makefile.def	(working copy)
@@ -166,7 +166,6 @@
 target_modules = { module= libgloss; no_check=true; };
 target_modules = { module= libffi; no_install=true; };
 target_modules = { module= zlib; };
-target_modules = { module= boehm-gc; };
 target_modules = { module= rda; };
 target_modules = { module= libada; };
 target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
@@ -543,7 +542,6 @@
 // a dependency on libgcc for native targets to configure.
 lang_env_dependencies = { module=libiberty; no_c=true; };
 
-dependencies = { module=configure-target-boehm-gc; on=all-target-libstdc++-v3; };
 dependencies = { module=configure-target-fastjar; on=configure-target-zlib; };
 dependencies = { module=all-target-fastjar; on=all-target-zlib; };
 dependencies = { module=configure-target-libgo; on=configure-target-libffi; };
@@ -551,8 +549,6 @@
 dependencies = { module=all-target-libgo; on=all-target-libbacktrace; };
 dependencies = { module=all-target-libgo; on=all-target-libffi; };
 dependencies = { module=all-target-libgo; on=all-target-libatomic; };
-dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; };
-dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
 dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; };
 dependencies = { module=configure-target-liboffloadmic; on=configure-target-libgomp; };
 dependencies = { module=configure-target-libsanitizer; on=all-target-libstdc++-v3; };
Index: configure.ac
===================================================================
--- configure.ac	(revision 242638)
+++ configure.ac	(working copy)
@@ -29,6 +29,7 @@
 m4_include([ltversion.m4])
 m4_include([lt~obsolete.m4])
 m4_include([config/isl.m4])
+m4_include([config/pkg.m4])
 
 AC_INIT(move-if-change)
 AC_PREREQ(2.64)
@@ -161,7 +162,6 @@
 		target-libssp \
 		target-libquadmath \
 		target-libgfortran \
-		target-boehm-gc \
 		target-libffi \
 		target-libobjc \
 		target-libada \
@@ -2060,22 +2060,36 @@
 AC_ARG_ENABLE(objc-gc,
 [AS_HELP_STRING([--enable-objc-gc],
 		[enable use of Boehm's garbage collector with the
-		 GNU Objective-C runtime])],
-[case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
-  *,objc,*:*:yes:*target-boehm-gc*)
-    AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration])
-    ;;
-esac])
-
-# Make sure we only build Boehm's garbage collector if required.
-case ,${enable_languages},:${enable_objc_gc} in
-  *,objc,*:yes)
-    # Keep target-boehm-gc if requested for Objective-C.
-    ;;
-  *)
-    # Otherwise remove target-boehm-gc.
-    noconfigdirs="$noconfigdirs target-boehm-gc"
-    ;;
+		 GNU Objective-C runtime])])
+AC_ARG_WITH([target-bdw-gc],
+[AS_HELP_STRING([--with-target-bdw-gc=PATHLIST],
+		[specify prefix directory for installed bdw-gc package.
+		 Equivalent to --with-bdw-gc-include=PATH/include
+		 plus --with-bdw-gc-lib=PATH/lib])])
+AC_ARG_WITH([target-bdw-gc-include],
+[AS_HELP_STRING([--with-target-bdw-gc-include=PATHLIST],
+		[specify directories for installed bdw-gc include files])])
+AC_ARG_WITH([target-bdw-gc-lib],
+[AS_HELP_STRING([--with-target-bdw-gc-lib=PATHLIST],
+		[specify directories for installed bdw-gc library])])
+		  
+case ,${enable_languages},:${enable_objc_gc} in *,objc,*:yes|*,objc,*:auto)
+  AC_MSG_CHECKING([for bdw garbage collector])
+  if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then
+    dnl no bdw-gw options, fall back to the bdw-gc pkg-config module
+    PKG_CHECK_EXISTS(bdw-gc,
+      AC_MSG_RESULT([using bdw-gc pkg-config module]),
+      AC_MSG_ERROR([no --with-target-bdw-gc options and no bdw-gc pkg-config module found]))
+  else
+    dnl bdw-gw options, first error checking, complete checking in libobjc
+    if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then
+      AC_MSG_ERROR([found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing])
+    elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then
+      AC_MSG_ERROR([found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing])
+    else
+      AC_MSG_RESULT([using paths configured with --with-target-bdw-gc options])
+    fi
+  fi
 esac
 
 # Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi	(revision 242638)
+++ gcc/doc/install.texi	(working copy)
@@ -2143,6 +2143,36 @@
 overrides, you can pass a setting for @env{CONFIG_SITE} and set
 variables in the site file.
 
+@subheading Objective-C-Specific Options
+
+The following options apply to the build of the Objective-C runtime library.
+
+@table @code
+@item --enable-objc-gc
+Specify that an additional variant of the GNU Objective-C runtime library
+is built, using an external build of the Boehm-Demers-Weiser garbage
+collector (@uref{http://www.hboehm.info/gc/}).  This library needs to be
+available for each multilib variant, unless configured with
+@option{--enable-objc-gc=@samp{auto}} in which case the build of the
+additional runtime library is skipped and the build continues.
+
+@item --with-target-bdw-gc=@var{list}
+@itemx --with-target-bdw-gc-include=@var{list}
+@itemx --with-target-bdw-gc-lib=@var{list}
+Specify search directories for the garbage collector header files and
+libraries. @var{list} is a comma separated list of key value pairs of the
+form @samp{@var{multilibdir}@=@var{path}}, where the default multilib key
+is named as @samp{.} (dot), or is omitted (e.g.
+@samp{--with-target-bdw-gc=/opt/bdw-gc,32=/opt-bdw-gc32}).
+
+The options @option{--with-target-bdw-gc-include} and
+@option{--with-target-bdw-gc-include} must always specified together for
+each multilib variant and take precedence over
+@option{--with-target-bdw-gc-include}.  If none of these options are
+specified, the values are taken from the @command{pkg-config}
+@samp{bdw-gc} module.
+@end table
+
 @html
 <hr />
 <p>
Index: libobjc/Makefile.in
===================================================================
--- libobjc/Makefile.in	(revision 242638)
+++ libobjc/Makefile.in	(working copy)
@@ -47,8 +47,6 @@
 
 top_builddir = .
 
--include ../boehm-gc/threads.mk
-
 libdir = $(exec_prefix)/lib
 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
 
@@ -95,7 +93,7 @@
 OBJC_GCFLAGS=@OBJC_GCFLAGS@
 OBJC_BOEHM_GC=@OBJC_BOEHM_GC@
 OBJC_BOEHM_GC_INCLUDES=@OBJC_BOEHM_GC_INCLUDES@
-OBJC_BOEHM_GC_LIBS=../boehm-gc/libgcjgc_convenience.la $(thread_libs_and_flags)
+OBJC_BOEHM_GC_LIBS=@OBJC_BOEHM_GC_LIBS@
 
 INCLUDES = -I$(srcdir)/$(MULTISRCTOP)../gcc \
   -I$(srcdir)/$(MULTISRCTOP)../gcc/config \
Index: libobjc/configure.ac
===================================================================
--- libobjc/configure.ac	(revision 242638)
+++ libobjc/configure.ac	(working copy)
@@ -18,6 +18,8 @@
 #along with GCC; see the file COPYING3.  If not see
 #<http://www.gnu.org/licenses/>.
 
+m4_include([../config/pkg.m4])
+
 AC_PREREQ(2.64)
 AC_INIT(package-unused, version-unused,, libobjc)
 AC_CONFIG_SRCDIR([objc/objc.h])
@@ -57,26 +59,6 @@
 [version_specific_libs=no])
 AC_MSG_RESULT($version_specific_libs)
 
-AC_ARG_ENABLE(objc-gc,
-[  --enable-objc-gc       enable the use of Boehm's garbage collector with
-                          the GNU Objective-C runtime.],
-[case $enable_objc_gc in
-  no)
-    OBJC_GCFLAGS=''
-    OBJC_BOEHM_GC=''
-    OBJC_BOEHM_GC_INCLUDES=''
-    ;;
-  *)
-    OBJC_GCFLAGS='-DOBJC_WITH_GC=1'
-    OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la'
-    OBJC_BOEHM_GC_INCLUDES='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include'
-    ;;
-esac],
-[OBJC_GCFLAGS=''; OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES=''])
-AC_SUBST(OBJC_GCFLAGS)
-AC_SUBST(OBJC_BOEHM_GC)
-AC_SUBST(OBJC_BOEHM_GC_INCLUDES)
-
 # -----------
 # Directories
 # -----------
@@ -214,6 +196,163 @@
 
 gt_BITFIELD_TYPE_MATTERS
 
+# -----------
+# boehm-gc
+# -----------
+
+AC_ARG_ENABLE(objc-gc,
+[AS_HELP_STRING([--enable-objc-gc],
+		[enable use of Boehm's garbage collector with the
+		 GNU Objective-C runtime])])
+AC_ARG_WITH([target-bdw-gc],
+[AS_HELP_STRING([--with-target-bdw-gc=PATHLIST],
+		[specify prefix directory for installed bdw-gc package.
+		 Equivalent to --with-bdw-gc-include=PATH/include
+		 plus --with-bdw-gc-lib=PATH/lib])])
+AC_ARG_WITH([target-bdw-gc-include],
+[AS_HELP_STRING([--with-target-bdw-gc-include=PATHLIST],
+		[specify directories for installed bdw-gc include files])])
+AC_ARG_WITH([target-bdw-gc-lib],
+[AS_HELP_STRING([--with-target-bdw-gc-lib=PATHLIST],
+		[specify directories for installed bdw-gc library])])
+		  
+case "$enable_objc_gc" in
+no)
+  use_bdw_gc=no
+  ;;
+*)
+  AC_MSG_CHECKING([for bdw garbage collector])
+  if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then
+    dnl no bdw-gw options, fall back to the bdw-gc pkg-config module
+    PKG_CHECK_EXISTS(bdw-gc,
+      AC_MSG_RESULT([using bdw-gc pkg-config module]),
+      AC_MSG_ERROR([no --with-target-bdw-gc options and no bdw-gc pkg-config module found]))
+  else
+    dnl bdw-gw options, first error checking, complete checking in libobjc
+    if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then
+      AC_MSG_ERROR([found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing])
+    elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then
+      AC_MSG_ERROR([found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing])
+    else
+      AC_MSG_RESULT([using paths configured with --with-target-bdw-gc options])
+    fi
+  fi
+  mldir=`${CC-gcc} --print-multi-directory 2>/dev/null`
+  bdw_val=
+  if test "x$with_target_bdw_gc" != x; then
+    for i in `echo $with_target_bdw_gc | tr ',' ' '`; do
+      case "$i" in
+        *=*) sd=${i%%=*}; d=${i#*=} ;;
+        *) sd=.; d=$i ;;
+      esac
+      if test "$mldir" = "$sd"; then
+        bdw_val=$d
+      fi
+    done
+    if test "x$bdw_val" = x; then
+      AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc])
+    fi
+    bdw_inc_dir="$bdw_val/include"
+    bdw_lib_dir="$bdw_val/lib"
+  fi
+  bdw_val=
+  if test "x$with_target_bdw_gc_include" != x; then
+    for i in `echo $with_target_bdw_gc_include | tr ',' ' '`; do
+      case "$i" in
+        *=*) sd=${i%%=*}; d=${i#*=} ;;
+        *) sd=.; d=$i ;;
+      esac
+      if test "$mldir" = "$sd"; then
+        bdw_val=$d
+      fi
+    done
+    if test "x$bdw_val" = x; then
+      AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-include])
+    fi
+    bdw_inc_dir="$bdw_val"
+  fi
+  bdw_val=
+  if test "x$with_target_bdw_gc_lib" != x; then
+    for i in `echo $with_target_bdw_gc_lib | tr ',' ' '`; do
+      case "$i" in
+        *=*) sd=${i%%=*}; d=${i#*=} ;;
+        *) sd=.; d=$i ;;
+      esac
+      if test "$mldir" = "$sd"; then
+        bdw_val=$d
+      fi
+    done
+    if test "x$bdw_val" = x; then
+      AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-lib])
+    fi
+    bdw_lib_dir="$bdw_val"
+  fi
+  if test "x$bdw_inc_dir" = x; then
+    AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-include])
+  fi
+  if test "x$bdw_lib_dir" = x; then
+    AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-lib])
+  fi
+  BDW_GC_CFLAGS="-I$bdw_inc_dir"
+  BDW_GC_LIBS="-L$bdw_lib_dir -lgc"
+  AC_MSG_RESULT([found])
+  use_bdw_gc=maybe
+esac
+
+if test "$use_bdw_gc" = maybe; then
+  AC_MSG_CHECKING([for system boehm-gc])
+  save_CFLAGS=$CFLAGS
+  save_LIBS=$LIBS
+  CFLAGS="$CFLAGS $BDW_GC_CFLAGS"
+  LIBS="$LIBS $BDW_GC_LIBS"
+  dnl the link test is not good enough for ARM32 multilib detection,
+  dnl first check to link, then to run
+  AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM([#include <gc/gc.h>],[GC_init()])],
+    [
+      AC_RUN_IFELSE([AC_LANG_SOURCE([[
+        #include <gc/gc.h>
+        int main() {
+          GC_init();
+          return 0;
+        }
+        ]])],
+        [system_bdw_gc_found=yes],
+        [system_bdw_gc_found=no],
+        dnl assume no system boehm-gc for cross builds ...
+        [system_bdw_gc_found=no]
+      )
+    ],
+    [system_bdw_gc_found=no])
+  CFLAGS=$save_CFLAGS
+  LIBS=$save_LIBS
+  if test x$enable_objc_gc = xauto && test x$system_bdw_gc_found = xno; then
+    AC_MSG_WARN([system bdw-gc not found, not building libobjc_gc])
+    use_bdw_gc=no
+  elif test x$enable_objc_gc = xyes && test x$system_bdw_gc_found = xno; then
+    AC_MSG_ERROR([system bdw-gc required but not found])
+  else
+    use_bdw_gc=yes
+    AC_MSG_RESULT([found])
+  fi
+fi
+
+if test "$use_bdw_gc" = no; then
+  OBJC_GCFLAGS=''
+  OBJC_BOEHM_GC=''
+  OBJC_BOEHM_GC_INCLUDES=''
+  OBJC_BOEHM_GC_LIBS=''
+else
+  OBJC_GCFLAGS='-DOBJC_WITH_GC=1'
+  OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la'
+  OBJC_BOEHM_GC_INCLUDES=$BDW_GC_CFLAGS
+  OBJC_BOEHM_GC_LIBS=$BDW_GC_LIBS
+fi
+AC_SUBST(OBJC_GCFLAGS)
+AC_SUBST(OBJC_BOEHM_GC)
+AC_SUBST(OBJC_BOEHM_GC_INCLUDES)
+AC_SUBST(OBJC_BOEHM_GC_LIBS)
+
 # ------
 # Output
 # ------
Index: libobjc/gc.c
===================================================================
--- libobjc/gc.c	(revision 242638)
+++ libobjc/gc.c	(working copy)
@@ -36,7 +36,7 @@
 #include "objc/runtime.h"
 #include "objc-private/module-abi-8.h"
 
-#include <gc.h>
+#include <gc/gc.h>
 #include <limits.h>
 
 /* gc_typed.h uses the following but doesn't declare them */
@@ -44,7 +44,7 @@
 typedef GC_signed_word signed_word;
 #define BITS_PER_WORD (CHAR_BIT * sizeof (word))
 
-#include <gc_typed.h>
+#include <gc/gc_typed.h>
 
 /* The following functions set up in `mask` the corresponding pointers.
    The offset is incremented with the size of the type.  */
Index: libobjc/memory.c
===================================================================
--- libobjc/memory.c	(revision 242638)
+++ libobjc/memory.c	(working copy)
@@ -41,7 +41,7 @@
 #include "objc/runtime.h"
 
 #if OBJC_WITH_GC
-#include <gc.h>
+#include <gc/gc.h>
 
 void *
 objc_malloc (size_t size)
Index: libobjc/objects.c
===================================================================
--- libobjc/objects.c	(revision 242638)
+++ libobjc/objects.c	(working copy)
@@ -31,8 +31,8 @@
 #include <string.h>                     /* For memcpy()  */
 
 #if OBJC_WITH_GC
-# include <gc.h>
-# include <gc_typed.h>
+# include <gc/gc.h>
+# include <gc/gc_typed.h>
 #endif
 
 /* FIXME: The semantics of extraBytes are not really clear.  */

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-11-20 20:42                                   ` Matthias Klose
@ 2016-11-21  5:34                                     ` Sandra Loosemore
  2016-11-21 10:24                                     ` Iain Sandoe
  1 sibling, 0 replies; 86+ messages in thread
From: Sandra Loosemore @ 2016-11-21  5:34 UTC (permalink / raw)
  To: Matthias Klose, Iain Sandoe
  Cc: Mike Stump, Rainer Orth, Jeff Law, Andrew Haley, GCC Patches,
	GCJ-patches

On 11/20/2016 01:42 PM, Matthias Klose wrote:

> +The options @option{--with-target-bdw-gc-include} and
> +@option{--with-target-bdw-gc-include} must always specified together for
> +each multilib variant and take precedence over
> +@option{--with-target-bdw-gc-include}.  If none of these options are
> +specified, the values are taken from the @command{pkg-config}
> +@samp{bdw-gc} module.

This paragraph makes no sense to me.  :-(

-Sandra

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-11-20 20:42                                   ` Matthias Klose
  2016-11-21  5:34                                     ` Sandra Loosemore
@ 2016-11-21 10:24                                     ` Iain Sandoe
  2016-11-21 12:57                                       ` Matthias Klose
  1 sibling, 1 reply; 86+ messages in thread
From: Iain Sandoe @ 2016-11-21 10:24 UTC (permalink / raw)
  To: Matthias Klose
  Cc: Mike Stump, Rainer Orth, Jeff Law, Andrew Haley, GCC Patches,
	GCJ-patches, Sandra Loosemore


> On 20 Nov 2016, at 20:42, Matthias Klose <doko@ubuntu.com> wrote:
> 
> On 10.10.2016 09:58, Iain Sandoe wrote:
>> 

>> The point here was to simplify the dependent configury so that it only needs to test something that the configuring user specifies (i.e. if they specify objc-gc, then they need also to specify the place that the gc lib can be found).
> 
> So here is the next proposal, I hope the added documentation in install.texi
> makes the usage clear.

thanks for working on this!

> 
> <toplevel>
> 
> 2016-11-19  Matthias Klose  <doko@ubuntu.com>
> 
> 	* Makefile.def: Remove reference to boehm-gc target module.
>  	* configure.ac: Include pkg.m4, check for --with-target-bdw-gc
> 	options and for the bdw-gc pkg-config module.
> 	* configure: Regenerate.
> 	* Makefile.in: Regenerate.


+AC_ARG_ENABLE(objc-gc,
+[AS_HELP_STRING([--enable-objc-gc],
+		[enable use of Boehm's garbage collector with the
+		 GNU Objective-C runtime])])
+AC_ARG_WITH([target-bdw-gc],
+[AS_HELP_STRING([--with-target-bdw-gc=PATHLIST],
+		[specify prefix directory for installed bdw-gc package.
+		 Equivalent to --with-bdw-gc-include=PATH/include
+		 plus --with-bdw-gc-lib=PATH/lib])])

missing “target” in the --with-bdw-gc-*

> 
> gcc/
> 
> 2016-11-19  Matthias Klose  <doko@ubuntu.com>
> 
> 	* doc/install.texi: Document configure options --enable-objc-gc
> 	and --with-target-bdw-gc.

As per Sandra’s comment,  should we understand the priority of options is

--with-target-bdw-gc-*

which overrides…

--with-target-bdw-gc=<list>

which overrides automatic discovery using pkg_config?

Iain



^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-11-21 10:24                                     ` Iain Sandoe
@ 2016-11-21 12:57                                       ` Matthias Klose
  2016-11-21 16:23                                         ` Sandra Loosemore
  0 siblings, 1 reply; 86+ messages in thread
From: Matthias Klose @ 2016-11-21 12:57 UTC (permalink / raw)
  To: Iain Sandoe
  Cc: Mike Stump, Rainer Orth, Jeff Law, Andrew Haley, GCC Patches,
	GCJ-patches, Sandra Loosemore

On 21.11.2016 11:23, Iain Sandoe wrote:
> 
>> On 20 Nov 2016, at 20:42, Matthias Klose <doko@ubuntu.com> wrote:
>>
>> On 10.10.2016 09:58, Iain Sandoe wrote:
>>>
> 
>>> The point here was to simplify the dependent configury so that it only needs to test something that the configuring user specifies (i.e. if they specify objc-gc, then they need also to specify the place that the gc lib can be found).
>>
>> So here is the next proposal, I hope the added documentation in install.texi
>> makes the usage clear.
> 
> thanks for working on this!
> 
>>
>> <toplevel>
>>
>> 2016-11-19  Matthias Klose  <doko@ubuntu.com>
>>
>> 	* Makefile.def: Remove reference to boehm-gc target module.
>>  	* configure.ac: Include pkg.m4, check for --with-target-bdw-gc
>> 	options and for the bdw-gc pkg-config module.
>> 	* configure: Regenerate.
>> 	* Makefile.in: Regenerate.
> 
> 
> +AC_ARG_ENABLE(objc-gc,
> +[AS_HELP_STRING([--enable-objc-gc],
> +		[enable use of Boehm's garbage collector with the
> +		 GNU Objective-C runtime])])
> +AC_ARG_WITH([target-bdw-gc],
> +[AS_HELP_STRING([--with-target-bdw-gc=PATHLIST],
> +		[specify prefix directory for installed bdw-gc package.
> +		 Equivalent to --with-bdw-gc-include=PATH/include
> +		 plus --with-bdw-gc-lib=PATH/lib])])
> 
> missing “target” in the --with-bdw-gc-*

thanks, fixed.

>> gcc/
>>
>> 2016-11-19  Matthias Klose  <doko@ubuntu.com>
>>
>> 	* doc/install.texi: Document configure options --enable-objc-gc
>> 	and --with-target-bdw-gc.
> 
> As per Sandra’s comment,  should we understand the priority of options is
> 
> --with-target-bdw-gc-*
> 
> which overrides…
> 
> --with-target-bdw-gc=<list>
> 
> which overrides automatic discovery using pkg_config?

--with-target-bdw-gc=/opt/bdw-gc,32=/opt/bdw-gc32

sets the include and lib dirs by appending include and lib to the paths. If you
have options --with-target-bdw-gc-include= and --with-target-bdw-gc-lib= as
well, it overrides the settings done in --with-target-bdw-gc=. This is copied
from the setting of the gmp/mpfr options.

Any of these options override the automatic discovery using pkg-config.

Please suggest a better wording; I thought that was clear enough (and better
than the undocumented --enable-libobjc-gc anyway ;)

Matthias

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-11-21 12:57                                       ` Matthias Klose
@ 2016-11-21 16:23                                         ` Sandra Loosemore
  2016-11-21 16:40                                           ` Matthias Klose
  0 siblings, 1 reply; 86+ messages in thread
From: Sandra Loosemore @ 2016-11-21 16:23 UTC (permalink / raw)
  To: Matthias Klose, Iain Sandoe
  Cc: Mike Stump, Rainer Orth, Jeff Law, Andrew Haley, GCC Patches,
	GCJ-patches

On 11/21/2016 05:57 AM, Matthias Klose wrote:
>
> --with-target-bdw-gc=/opt/bdw-gc,32=/opt/bdw-gc32
>
> sets the include and lib dirs by appending include and lib to the paths. If you
> have options --with-target-bdw-gc-include= and --with-target-bdw-gc-lib= as
> well, it overrides the settings done in --with-target-bdw-gc=. This is copied
> from the setting of the gmp/mpfr options.
>
> Any of these options override the automatic discovery using pkg-config.
>
> Please suggest a better wording; I thought that was clear enough (and better
> than the undocumented --enable-libobjc-gc anyway ;)

FAOD, my complaint about your patch is that it essentially said

"The options --with-foo and --with-foo must also be specified together 
and override --with-foo."

I'm sure you didn't mean exactly the same --with-foo in all 3 places, 
but I'm a dummy about what you really intended to say here.

-Sandra


^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-11-21 16:23                                         ` Sandra Loosemore
@ 2016-11-21 16:40                                           ` Matthias Klose
  2016-11-21 17:16                                             ` Rainer Orth
  2016-11-21 17:16                                             ` [PATCH] Delete GCJ Peter Bergner
  0 siblings, 2 replies; 86+ messages in thread
From: Matthias Klose @ 2016-11-21 16:40 UTC (permalink / raw)
  To: Sandra Loosemore, Iain Sandoe
  Cc: Mike Stump, Rainer Orth, Jeff Law, Andrew Haley, GCC Patches,
	GCJ-patches

On 21.11.2016 17:23, Sandra Loosemore wrote:
> On 11/21/2016 05:57 AM, Matthias Klose wrote:
>>
>> --with-target-bdw-gc=/opt/bdw-gc,32=/opt/bdw-gc32
>>
>> sets the include and lib dirs by appending include and lib to the paths. If you
>> have options --with-target-bdw-gc-include= and --with-target-bdw-gc-lib= as
>> well, it overrides the settings done in --with-target-bdw-gc=. This is copied
>> from the setting of the gmp/mpfr options.
>>
>> Any of these options override the automatic discovery using pkg-config.
>>
>> Please suggest a better wording; I thought that was clear enough (and better
>> than the undocumented --enable-libobjc-gc anyway ;)
> 
> FAOD, my complaint about your patch is that it essentially said
> 
> "The options --with-foo and --with-foo must also be specified together and
> override --with-foo."
> 
> I'm sure you didn't mean exactly the same --with-foo in all 3 places, but I'm a
> dummy about what you really intended to say here.

ahh, didn't see that :-/ Now fixed, is this clearer now?

The options @option{--with-target-bdw-gc-include} and
@option{--with-target-bdw-gc-lib} must always specified together for
each multilib variant and take precedence over
@option{--with-target-bdw-gc}.  If none of these options are
specified, the values are taken from the @command{pkg-config}
@samp{bdw-gc} module.

Matthias

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-11-21 16:40                                           ` Matthias Klose
  2016-11-21 17:16                                             ` Rainer Orth
@ 2016-11-21 17:16                                             ` Peter Bergner
  1 sibling, 0 replies; 86+ messages in thread
From: Peter Bergner @ 2016-11-21 17:16 UTC (permalink / raw)
  To: Matthias Klose, Sandra Loosemore, Iain Sandoe
  Cc: Mike Stump, Rainer Orth, Jeff Law, Andrew Haley, GCC Patches,
	GCJ-patches

On 11/21/16 10:40 AM, Matthias Klose wrote:
> On 21.11.2016 17:23, Sandra Loosemore wrote:
>> On 11/21/2016 05:57 AM, Matthias Klose wrote:
>> I'm sure you didn't mean exactly the same --with-foo in all 3 places, but I'm a
>> dummy about what you really intended to say here.
>
> ahh, didn't see that :-/ Now fixed, is this clearer now?
>
> The options @option{--with-target-bdw-gc-include} and
> @option{--with-target-bdw-gc-lib} must always specified together for
> each multilib variant and take precedence over
> @option{--with-target-bdw-gc}.  If none of these options are
> specified, the values are taken from the @command{pkg-config}
> @samp{bdw-gc} module.

s/must always specified/must always be specified/

and possibly:

s/variant and take precedence/variant and they take precedence/ ???


Peter

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-11-21 16:40                                           ` Matthias Klose
@ 2016-11-21 17:16                                             ` Rainer Orth
  2016-11-21 23:23                                               ` Matthias Klose
  2016-11-21 17:16                                             ` [PATCH] Delete GCJ Peter Bergner
  1 sibling, 1 reply; 86+ messages in thread
From: Rainer Orth @ 2016-11-21 17:16 UTC (permalink / raw)
  To: Matthias Klose
  Cc: Sandra Loosemore, Iain Sandoe, Mike Stump, Jeff Law,
	Andrew Haley, GCC Patches, GCJ-patches

Hi Matthias,

> ahh, didn't see that :-/ Now fixed, is this clearer now?
>
> The options @option{--with-target-bdw-gc-include} and
> @option{--with-target-bdw-gc-lib} must always specified together for
                                               ^ be 
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-11-21 17:16                                             ` Rainer Orth
@ 2016-11-21 23:23                                               ` Matthias Klose
  2016-11-22 17:13                                                 ` Sandra Loosemore
  2016-11-29 21:23                                                 ` Jeff Law
  0 siblings, 2 replies; 86+ messages in thread
From: Matthias Klose @ 2016-11-21 23:23 UTC (permalink / raw)
  To: Rainer Orth, Matthias Klose
  Cc: Sandra Loosemore, Iain Sandoe, Mike Stump, Jeff Law,
	Andrew Haley, GCC Patches, GCJ-patches, Peter Bergner

[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]

On 21.11.2016 18:16, Rainer Orth wrote:
> Hi Matthias,
> 
>> ahh, didn't see that :-/ Now fixed, is this clearer now?
>>
>> The options @option{--with-target-bdw-gc-include} and
>> @option{--with-target-bdw-gc-lib} must always specified together for
>                                                ^ be 

thanks to all sorting out the documentation issues. Now attaching the updated
diff. Ok to commit?

Matthias

<toplevel>

2016-11-19  Matthias Klose  <doko@ubuntu.com>

        * Makefile.def: Remove reference to boehm-gc target module.
        * configure.ac: Include pkg.m4, check for --with-target-bdw-gc
        options and for the bdw-gc pkg-config module.
        * configure: Regenerate.
        * Makefile.in: Regenerate.

gcc/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

        * doc/install.texi: Document configure options --enable-objc-gc
        and --with-target-bdw-gc.

config/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

        * pkg.m4: New file.

libobjc/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

        * configure.ac (--enable-objc-gc): Allow to configure with a
        system provided boehm-gc.
        * configure: Regenerate.
        * Makefile.in (OBJC_BOEHM_GC_LIBS): Get value from configure.
        * gc.c: Include system bdw-gc headers.
        * memory.c: Likewise
        * objects.c: Likewise

boehm-gc/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

        Remove


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libobjc-bdw-gc.diff --]
[-- Type: text/x-diff; name="libobjc-bdw-gc.diff", Size: 48713 bytes --]

<toplevel>

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	* Makefile.def: Remove reference to boehm-gc target module.
  	* configure.ac: Include pkg.m4, check for --with-target-bdw-gc
	options and for the bdw-gc pkg-config module.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

gcc/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	* doc/install.texi: Document configure options --enable-objc-gc
	and --with-target-bdw-gc.

config/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	* pkg.m4: New file.

libobjc/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	* configure.ac (--enable-objc-gc): Allow to configure with a
	system provided boehm-gc.
	* configure: Regenerate.
	* Makefile.in (OBJC_BOEHM_GC_LIBS): Get value from configure.
	* gc.c: Include system bdw-gc headers.
	* memory.c: Likewise
	* objects.c: Likewise

boehm-gc/

2016-11-19  Matthias Klose  <doko@ubuntu.com>

	Remove

Index: Makefile.def
===================================================================
--- Makefile.def	(revision 242681)
+++ Makefile.def	(working copy)
@@ -166,7 +166,6 @@
 target_modules = { module= libgloss; no_check=true; };
 target_modules = { module= libffi; no_install=true; };
 target_modules = { module= zlib; };
-target_modules = { module= boehm-gc; };
 target_modules = { module= rda; };
 target_modules = { module= libada; };
 target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
@@ -543,7 +542,6 @@
 // a dependency on libgcc for native targets to configure.
 lang_env_dependencies = { module=libiberty; no_c=true; };
 
-dependencies = { module=configure-target-boehm-gc; on=all-target-libstdc++-v3; };
 dependencies = { module=configure-target-fastjar; on=configure-target-zlib; };
 dependencies = { module=all-target-fastjar; on=all-target-zlib; };
 dependencies = { module=configure-target-libgo; on=configure-target-libffi; };
@@ -551,8 +549,6 @@
 dependencies = { module=all-target-libgo; on=all-target-libbacktrace; };
 dependencies = { module=all-target-libgo; on=all-target-libffi; };
 dependencies = { module=all-target-libgo; on=all-target-libatomic; };
-dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; };
-dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
 dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; };
 dependencies = { module=configure-target-liboffloadmic; on=configure-target-libgomp; };
 dependencies = { module=configure-target-libsanitizer; on=all-target-libstdc++-v3; };
Index: config/pkg.m4
===================================================================
--- config/pkg.m4	(nonexistent)
+++ config/pkg.m4	(working copy)
@@ -0,0 +1,825 @@
+dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
+dnl serial 11 (pkg-config-0.29)
+dnl
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=m4_default([$1], [0.9.0])
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		PKG_CONFIG=""
+	fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_default([$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes ],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+   	AC_MSG_RESULT([no])
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+        ])
+elif test $pkg_failed = untried; then
+     	AC_MSG_RESULT([no])
+	m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+        ])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	$3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+    [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+    [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
+dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
+dnl serial 11 (pkg-config-0.29)
+dnl
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=m4_default([$1], [0.9.0])
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		PKG_CONFIG=""
+	fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_default([$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes ],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+   	AC_MSG_RESULT([no])
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+        ])
+elif test $pkg_failed = untried; then
+     	AC_MSG_RESULT([no])
+	m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+        ])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	$3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+    [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+    [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
+dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
+dnl serial 11 (pkg-config-0.29)
+dnl
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=m4_default([$1], [0.9.0])
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		PKG_CONFIG=""
+	fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_default([$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes ],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+   	AC_MSG_RESULT([no])
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+        ])
+elif test $pkg_failed = untried; then
+     	AC_MSG_RESULT([no])
+	m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+        ])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	$3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+    [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+    [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
Index: configure.ac
===================================================================
--- configure.ac	(revision 242681)
+++ configure.ac	(working copy)
@@ -29,6 +29,7 @@
 m4_include([ltversion.m4])
 m4_include([lt~obsolete.m4])
 m4_include([config/isl.m4])
+m4_include([config/pkg.m4])
 
 AC_INIT(move-if-change)
 AC_PREREQ(2.64)
@@ -161,7 +162,6 @@
 		target-libssp \
 		target-libquadmath \
 		target-libgfortran \
-		target-boehm-gc \
 		target-libffi \
 		target-libobjc \
 		target-libada \
@@ -2060,22 +2060,36 @@
 AC_ARG_ENABLE(objc-gc,
 [AS_HELP_STRING([--enable-objc-gc],
 		[enable use of Boehm's garbage collector with the
-		 GNU Objective-C runtime])],
-[case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
-  *,objc,*:*:yes:*target-boehm-gc*)
-    AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration])
-    ;;
-esac])
-
-# Make sure we only build Boehm's garbage collector if required.
-case ,${enable_languages},:${enable_objc_gc} in
-  *,objc,*:yes)
-    # Keep target-boehm-gc if requested for Objective-C.
-    ;;
-  *)
-    # Otherwise remove target-boehm-gc.
-    noconfigdirs="$noconfigdirs target-boehm-gc"
-    ;;
+		 GNU Objective-C runtime])])
+AC_ARG_WITH([target-bdw-gc],
+[AS_HELP_STRING([--with-target-bdw-gc=PATHLIST],
+		[specify prefix directory for installed bdw-gc package.
+		 Equivalent to --with-target-bdw-gc-include=PATH/include
+		 plus --with-target-bdw-gc-lib=PATH/lib])])
+AC_ARG_WITH([target-bdw-gc-include],
+[AS_HELP_STRING([--with-target-bdw-gc-include=PATHLIST],
+		[specify directories for installed bdw-gc include files])])
+AC_ARG_WITH([target-bdw-gc-lib],
+[AS_HELP_STRING([--with-target-bdw-gc-lib=PATHLIST],
+		[specify directories for installed bdw-gc library])])
+		  
+case ,${enable_languages},:${enable_objc_gc} in *,objc,*:yes|*,objc,*:auto)
+  AC_MSG_CHECKING([for bdw garbage collector])
+  if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then
+    dnl no bdw-gw options, fall back to the bdw-gc pkg-config module
+    PKG_CHECK_EXISTS(bdw-gc,
+      AC_MSG_RESULT([using bdw-gc pkg-config module]),
+      AC_MSG_ERROR([no --with-target-bdw-gc options and no bdw-gc pkg-config module found]))
+  else
+    dnl bdw-gw options, first error checking, complete checking in libobjc
+    if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then
+      AC_MSG_ERROR([found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing])
+    elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then
+      AC_MSG_ERROR([found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing])
+    else
+      AC_MSG_RESULT([using paths configured with --with-target-bdw-gc options])
+    fi
+  fi
 esac
 
 # Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi	(revision 242681)
+++ gcc/doc/install.texi	(working copy)
@@ -2143,6 +2143,37 @@
 overrides, you can pass a setting for @env{CONFIG_SITE} and set
 variables in the site file.
 
+@subheading Objective-C-Specific Options
+
+The following options apply to the build of the Objective-C runtime library.
+
+@table @code
+@item --enable-objc-gc
+Specify that an additional variant of the GNU Objective-C runtime library
+is built, using an external build of the Boehm-Demers-Weiser garbage
+collector (@uref{http://www.hboehm.info/gc/}).  This library needs to be
+available for each multilib variant, unless configured with
+@option{--enable-objc-gc=@samp{auto}} in which case the build of the
+additional runtime library is skipped when not available and the build
+continues.
+
+@item --with-target-bdw-gc=@var{list}
+@itemx --with-target-bdw-gc-include=@var{list}
+@itemx --with-target-bdw-gc-lib=@var{list}
+Specify search directories for the garbage collector header files and
+libraries. @var{list} is a comma separated list of key value pairs of the
+form @samp{@var{multilibdir}@=@var{path}}, where the default multilib key
+is named as @samp{.} (dot), or is omitted (e.g.
+@samp{--with-target-bdw-gc=/opt/bdw-gc,32=/opt-bdw-gc32}).
+
+The options @option{--with-target-bdw-gc-include} and
+@option{--with-target-bdw-gc-lib} must always be specified together
+for each multilib variant and they take precedence over
+@option{--with-target-bdw-gc}.  If none of these options are
+specified, the values are taken from the @command{pkg-config}
+@samp{bdw-gc} module.
+@end table
+
 @html
 <hr />
 <p>
Index: libobjc/Makefile.in
===================================================================
--- libobjc/Makefile.in	(revision 242681)
+++ libobjc/Makefile.in	(working copy)
@@ -47,8 +47,6 @@
 
 top_builddir = .
 
--include ../boehm-gc/threads.mk
-
 libdir = $(exec_prefix)/lib
 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
 
@@ -95,7 +93,7 @@
 OBJC_GCFLAGS=@OBJC_GCFLAGS@
 OBJC_BOEHM_GC=@OBJC_BOEHM_GC@
 OBJC_BOEHM_GC_INCLUDES=@OBJC_BOEHM_GC_INCLUDES@
-OBJC_BOEHM_GC_LIBS=../boehm-gc/libgcjgc_convenience.la $(thread_libs_and_flags)
+OBJC_BOEHM_GC_LIBS=@OBJC_BOEHM_GC_LIBS@
 
 INCLUDES = -I$(srcdir)/$(MULTISRCTOP)../gcc \
   -I$(srcdir)/$(MULTISRCTOP)../gcc/config \
Index: libobjc/configure.ac
===================================================================
--- libobjc/configure.ac	(revision 242681)
+++ libobjc/configure.ac	(working copy)
@@ -18,6 +18,8 @@
 #along with GCC; see the file COPYING3.  If not see
 #<http://www.gnu.org/licenses/>.
 
+m4_include([../config/pkg.m4])
+
 AC_PREREQ(2.64)
 AC_INIT(package-unused, version-unused,, libobjc)
 AC_CONFIG_SRCDIR([objc/objc.h])
@@ -57,26 +59,6 @@
 [version_specific_libs=no])
 AC_MSG_RESULT($version_specific_libs)
 
-AC_ARG_ENABLE(objc-gc,
-[  --enable-objc-gc       enable the use of Boehm's garbage collector with
-                          the GNU Objective-C runtime.],
-[case $enable_objc_gc in
-  no)
-    OBJC_GCFLAGS=''
-    OBJC_BOEHM_GC=''
-    OBJC_BOEHM_GC_INCLUDES=''
-    ;;
-  *)
-    OBJC_GCFLAGS='-DOBJC_WITH_GC=1'
-    OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la'
-    OBJC_BOEHM_GC_INCLUDES='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include'
-    ;;
-esac],
-[OBJC_GCFLAGS=''; OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES=''])
-AC_SUBST(OBJC_GCFLAGS)
-AC_SUBST(OBJC_BOEHM_GC)
-AC_SUBST(OBJC_BOEHM_GC_INCLUDES)
-
 # -----------
 # Directories
 # -----------
@@ -214,6 +196,163 @@
 
 gt_BITFIELD_TYPE_MATTERS
 
+# -----------
+# boehm-gc
+# -----------
+
+AC_ARG_ENABLE(objc-gc,
+[AS_HELP_STRING([--enable-objc-gc],
+		[enable use of Boehm's garbage collector with the
+		 GNU Objective-C runtime])])
+AC_ARG_WITH([target-bdw-gc],
+[AS_HELP_STRING([--with-target-bdw-gc=PATHLIST],
+		[specify prefix directory for installed bdw-gc package.
+		 Equivalent to --with-target-bdw-gc-include=PATH/include
+		 plus --with-target-bdw-gc-lib=PATH/lib])])
+AC_ARG_WITH([target-bdw-gc-include],
+[AS_HELP_STRING([--with-target-bdw-gc-include=PATHLIST],
+		[specify directories for installed bdw-gc include files])])
+AC_ARG_WITH([target-bdw-gc-lib],
+[AS_HELP_STRING([--with-target-bdw-gc-lib=PATHLIST],
+		[specify directories for installed bdw-gc library])])
+		  
+case "$enable_objc_gc" in
+no)
+  use_bdw_gc=no
+  ;;
+*)
+  AC_MSG_CHECKING([for bdw garbage collector])
+  if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then
+    dnl no bdw-gw options, fall back to the bdw-gc pkg-config module
+    PKG_CHECK_EXISTS(bdw-gc,
+      AC_MSG_RESULT([using bdw-gc pkg-config module]),
+      AC_MSG_ERROR([no --with-target-bdw-gc options and no bdw-gc pkg-config module found]))
+  else
+    dnl bdw-gw options, first error checking, complete checking in libobjc
+    if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then
+      AC_MSG_ERROR([found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing])
+    elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then
+      AC_MSG_ERROR([found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing])
+    else
+      AC_MSG_RESULT([using paths configured with --with-target-bdw-gc options])
+    fi
+  fi
+  mldir=`${CC-gcc} --print-multi-directory 2>/dev/null`
+  bdw_val=
+  if test "x$with_target_bdw_gc" != x; then
+    for i in `echo $with_target_bdw_gc | tr ',' ' '`; do
+      case "$i" in
+        *=*) sd=${i%%=*}; d=${i#*=} ;;
+        *) sd=.; d=$i ;;
+      esac
+      if test "$mldir" = "$sd"; then
+        bdw_val=$d
+      fi
+    done
+    if test "x$bdw_val" = x; then
+      AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc])
+    fi
+    bdw_inc_dir="$bdw_val/include"
+    bdw_lib_dir="$bdw_val/lib"
+  fi
+  bdw_val=
+  if test "x$with_target_bdw_gc_include" != x; then
+    for i in `echo $with_target_bdw_gc_include | tr ',' ' '`; do
+      case "$i" in
+        *=*) sd=${i%%=*}; d=${i#*=} ;;
+        *) sd=.; d=$i ;;
+      esac
+      if test "$mldir" = "$sd"; then
+        bdw_val=$d
+      fi
+    done
+    if test "x$bdw_val" = x; then
+      AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-include])
+    fi
+    bdw_inc_dir="$bdw_val"
+  fi
+  bdw_val=
+  if test "x$with_target_bdw_gc_lib" != x; then
+    for i in `echo $with_target_bdw_gc_lib | tr ',' ' '`; do
+      case "$i" in
+        *=*) sd=${i%%=*}; d=${i#*=} ;;
+        *) sd=.; d=$i ;;
+      esac
+      if test "$mldir" = "$sd"; then
+        bdw_val=$d
+      fi
+    done
+    if test "x$bdw_val" = x; then
+      AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-lib])
+    fi
+    bdw_lib_dir="$bdw_val"
+  fi
+  if test "x$bdw_inc_dir" = x; then
+    AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-include])
+  fi
+  if test "x$bdw_lib_dir" = x; then
+    AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-lib])
+  fi
+  BDW_GC_CFLAGS="-I$bdw_inc_dir"
+  BDW_GC_LIBS="-L$bdw_lib_dir -lgc"
+  AC_MSG_RESULT([found])
+  use_bdw_gc=maybe
+esac
+
+if test "$use_bdw_gc" = maybe; then
+  AC_MSG_CHECKING([for system boehm-gc])
+  save_CFLAGS=$CFLAGS
+  save_LIBS=$LIBS
+  CFLAGS="$CFLAGS $BDW_GC_CFLAGS"
+  LIBS="$LIBS $BDW_GC_LIBS"
+  dnl the link test is not good enough for ARM32 multilib detection,
+  dnl first check to link, then to run
+  AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM([#include <gc/gc.h>],[GC_init()])],
+    [
+      AC_RUN_IFELSE([AC_LANG_SOURCE([[
+        #include <gc/gc.h>
+        int main() {
+          GC_init();
+          return 0;
+        }
+        ]])],
+        [system_bdw_gc_found=yes],
+        [system_bdw_gc_found=no],
+        dnl assume no system boehm-gc for cross builds ...
+        [system_bdw_gc_found=no]
+      )
+    ],
+    [system_bdw_gc_found=no])
+  CFLAGS=$save_CFLAGS
+  LIBS=$save_LIBS
+  if test x$enable_objc_gc = xauto && test x$system_bdw_gc_found = xno; then
+    AC_MSG_WARN([system bdw-gc not found, not building libobjc_gc])
+    use_bdw_gc=no
+  elif test x$enable_objc_gc = xyes && test x$system_bdw_gc_found = xno; then
+    AC_MSG_ERROR([system bdw-gc required but not found])
+  else
+    use_bdw_gc=yes
+    AC_MSG_RESULT([found])
+  fi
+fi
+
+if test "$use_bdw_gc" = no; then
+  OBJC_GCFLAGS=''
+  OBJC_BOEHM_GC=''
+  OBJC_BOEHM_GC_INCLUDES=''
+  OBJC_BOEHM_GC_LIBS=''
+else
+  OBJC_GCFLAGS='-DOBJC_WITH_GC=1'
+  OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la'
+  OBJC_BOEHM_GC_INCLUDES=$BDW_GC_CFLAGS
+  OBJC_BOEHM_GC_LIBS=$BDW_GC_LIBS
+fi
+AC_SUBST(OBJC_GCFLAGS)
+AC_SUBST(OBJC_BOEHM_GC)
+AC_SUBST(OBJC_BOEHM_GC_INCLUDES)
+AC_SUBST(OBJC_BOEHM_GC_LIBS)
+
 # ------
 # Output
 # ------
Index: libobjc/gc.c
===================================================================
--- libobjc/gc.c	(revision 242681)
+++ libobjc/gc.c	(working copy)
@@ -36,7 +36,7 @@
 #include "objc/runtime.h"
 #include "objc-private/module-abi-8.h"
 
-#include <gc.h>
+#include <gc/gc.h>
 #include <limits.h>
 
 /* gc_typed.h uses the following but doesn't declare them */
@@ -44,7 +44,7 @@
 typedef GC_signed_word signed_word;
 #define BITS_PER_WORD (CHAR_BIT * sizeof (word))
 
-#include <gc_typed.h>
+#include <gc/gc_typed.h>
 
 /* The following functions set up in `mask` the corresponding pointers.
    The offset is incremented with the size of the type.  */
Index: libobjc/memory.c
===================================================================
--- libobjc/memory.c	(revision 242681)
+++ libobjc/memory.c	(working copy)
@@ -41,7 +41,7 @@
 #include "objc/runtime.h"
 
 #if OBJC_WITH_GC
-#include <gc.h>
+#include <gc/gc.h>
 
 void *
 objc_malloc (size_t size)
Index: libobjc/objects.c
===================================================================
--- libobjc/objects.c	(revision 242681)
+++ libobjc/objects.c	(working copy)
@@ -31,8 +31,8 @@
 #include <string.h>                     /* For memcpy()  */
 
 #if OBJC_WITH_GC
-# include <gc.h>
-# include <gc_typed.h>
+# include <gc/gc.h>
+# include <gc/gc_typed.h>
 #endif
 
 /* FIXME: The semantics of extraBytes are not really clear.  */

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-11-21 23:23                                               ` Matthias Klose
@ 2016-11-22 17:13                                                 ` Sandra Loosemore
  2016-11-29 21:23                                                 ` Jeff Law
  1 sibling, 0 replies; 86+ messages in thread
From: Sandra Loosemore @ 2016-11-22 17:13 UTC (permalink / raw)
  To: Matthias Klose, Rainer Orth
  Cc: Iain Sandoe, Mike Stump, Jeff Law, Andrew Haley, GCC Patches,
	GCJ-patches, Peter Bergner

On 11/21/2016 04:23 PM, Matthias Klose wrote:
> On 21.11.2016 18:16, Rainer Orth wrote:
>> Hi Matthias,
>>
>>> ahh, didn't see that :-/ Now fixed, is this clearer now?
>>>
>>> The options @option{--with-target-bdw-gc-include} and
>>> @option{--with-target-bdw-gc-lib} must always specified together for
>>                                                 ^ be
>
> thanks to all sorting out the documentation issues. Now attaching the updated
> diff. Ok to commit?

The documentation part is OK now.

-Sandra

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-11-21 23:23                                               ` Matthias Klose
  2016-11-22 17:13                                                 ` Sandra Loosemore
@ 2016-11-29 21:23                                                 ` Jeff Law
  2016-11-30  1:11                                                   ` Remove stray '@' from install.texi (was Re: [PATCH] Delete GCJ) David Malcolm
  1 sibling, 1 reply; 86+ messages in thread
From: Jeff Law @ 2016-11-29 21:23 UTC (permalink / raw)
  To: Matthias Klose, Rainer Orth
  Cc: Sandra Loosemore, Iain Sandoe, Mike Stump, Andrew Haley,
	GCC Patches, GCJ-patches, Peter Bergner

On 11/21/2016 04:23 PM, Matthias Klose wrote:
> On 21.11.2016 18:16, Rainer Orth wrote:
>> Hi Matthias,
>>
>>> ahh, didn't see that :-/ Now fixed, is this clearer now?
>>>
>>> The options @option{--with-target-bdw-gc-include} and
>>> @option{--with-target-bdw-gc-lib} must always specified together for
>>                                                ^ be
>
> thanks to all sorting out the documentation issues. Now attaching the updated
> diff. Ok to commit?
>
> Matthias
>
> <toplevel>
>
> 2016-11-19  Matthias Klose  <doko@ubuntu.com>
>
>         * Makefile.def: Remove reference to boehm-gc target module.
>         * configure.ac: Include pkg.m4, check for --with-target-bdw-gc
>         options and for the bdw-gc pkg-config module.
>         * configure: Regenerate.
>         * Makefile.in: Regenerate.
>
> gcc/
>
> 2016-11-19  Matthias Klose  <doko@ubuntu.com>
>
>         * doc/install.texi: Document configure options --enable-objc-gc
>         and --with-target-bdw-gc.
>
> config/
>
> 2016-11-19  Matthias Klose  <doko@ubuntu.com>
>
>         * pkg.m4: New file.
>
> libobjc/
>
> 2016-11-19  Matthias Klose  <doko@ubuntu.com>
>
>         * configure.ac (--enable-objc-gc): Allow to configure with a
>         system provided boehm-gc.
>         * configure: Regenerate.
>         * Makefile.in (OBJC_BOEHM_GC_LIBS): Get value from configure.
>         * gc.c: Include system bdw-gc headers.
>         * memory.c: Likewise
>         * objects.c: Likewise
>
> boehm-gc/
>
> 2016-11-19  Matthias Klose  <doko@ubuntu.com>
>
>         Remove
OK.

Jeff

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Remove stray '@' from install.texi (was Re: [PATCH] Delete GCJ)
  2016-11-29 21:23                                                 ` Jeff Law
@ 2016-11-30  1:11                                                   ` David Malcolm
  2016-11-30  1:20                                                     ` Sandra Loosemore
  0 siblings, 1 reply; 86+ messages in thread
From: David Malcolm @ 2016-11-30  1:11 UTC (permalink / raw)
  To: Jeff Law, Matthias Klose, Rainer Orth
  Cc: Sandra Loosemore, Iain Sandoe, Mike Stump, Andrew Haley,
	GCC Patches, GCJ-patches, Peter Bergner

[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]

On Tue, 2016-11-29 at 14:23 -0700, Jeff Law wrote:
> On 11/21/2016 04:23 PM, Matthias Klose wrote:
> > On 21.11.2016 18:16, Rainer Orth wrote:
> > > Hi Matthias,
> > > 
> > > > ahh, didn't see that :-/ Now fixed, is this clearer now?
> > > > 
> > > > The options @option{--with-target-bdw-gc-include} and
> > > > @option{--with-target-bdw-gc-lib} must always specified
> > > > together for
> > >                                                ^ be
> > 
> > thanks to all sorting out the documentation issues. Now attaching
> > the updated
> > diff. Ok to commit?
> > 
> > Matthias
> > 
> > 

[...]

> > gcc/
> > 
> > 2016-11-19  Matthias Klose  <doko@ubuntu.com>
> > 
> >         * doc/install.texi: Document configure options --enable
> > -objc-gc
> >         and --with-target-bdw-gc.

[...]

r242985 seems to have broken the build, for me at least (with texinfo
5.1):

../../src/gcc/doc/install.texi:2199: use braces to give a command as an argument to @=
make[2]: *** [doc/gccinstall.info] Error 1

The attached patch fixes it.

OK to commit?
Dave

[-- Attachment #2: 0001-Remove-stray-character-from-install.texi.patch --]
[-- Type: text/x-patch, Size: 1005 bytes --]

From 60ec369e17c898fb3cdcbca43ed77d450a30d074 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Tue, 29 Nov 2016 20:38:53 -0500
Subject: [PATCH] Remove stray character from install.texi

gcc/ChangeLog:
	* doc/install.texi (--with-target-bdw-gc): Remove stray '@'.
---
 gcc/doc/install.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 5d96e5f..140ff80 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -2196,7 +2196,7 @@ continues.
 @itemx --with-target-bdw-gc-lib=@var{list}
 Specify search directories for the garbage collector header files and
 libraries. @var{list} is a comma separated list of key value pairs of the
-form @samp{@var{multilibdir}@=@var{path}}, where the default multilib key
+form @samp{@var{multilibdir}=@var{path}}, where the default multilib key
 is named as @samp{.} (dot), or is omitted (e.g.
 @samp{--with-target-bdw-gc=/opt/bdw-gc,32=/opt-bdw-gc32}).
 
-- 
1.8.5.3


^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: Remove stray '@' from install.texi (was Re: [PATCH] Delete GCJ)
  2016-11-30  1:11                                                   ` Remove stray '@' from install.texi (was Re: [PATCH] Delete GCJ) David Malcolm
@ 2016-11-30  1:20                                                     ` Sandra Loosemore
  2016-11-30  1:26                                                       ` David Malcolm
  0 siblings, 1 reply; 86+ messages in thread
From: Sandra Loosemore @ 2016-11-30  1:20 UTC (permalink / raw)
  To: David Malcolm, Jeff Law, Matthias Klose, Rainer Orth
  Cc: Iain Sandoe, Mike Stump, Andrew Haley, GCC Patches, GCJ-patches,
	Peter Bergner

On 11/29/2016 06:10 PM, David Malcolm wrote:
>[snip]
>
> r242985 seems to have broken the build, for me at least (with texinfo
> 5.1):
>
> ../../src/gcc/doc/install.texi:2199: use braces to give a command as an argument to @=
> make[2]: *** [doc/gccinstall.info] Error 1
>
> The attached patch fixes it.
>
> OK to commit?

OK.  (This is so trivial it would qualify under the obvious patch rule 
anyway.)

-Sandra

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: Remove stray '@' from install.texi (was Re: [PATCH] Delete GCJ)
  2016-11-30  1:20                                                     ` Sandra Loosemore
@ 2016-11-30  1:26                                                       ` David Malcolm
  0 siblings, 0 replies; 86+ messages in thread
From: David Malcolm @ 2016-11-30  1:26 UTC (permalink / raw)
  To: Sandra Loosemore, Jeff Law, Matthias Klose, Rainer Orth
  Cc: Iain Sandoe, Mike Stump, Andrew Haley, GCC Patches, GCJ-patches,
	Peter Bergner

On Tue, 2016-11-29 at 18:20 -0700, Sandra Loosemore wrote:
> On 11/29/2016 06:10 PM, David Malcolm wrote:
> > [snip]
> > 
> > r242985 seems to have broken the build, for me at least (with
> > texinfo
> > 5.1):
> > 
> > ../../src/gcc/doc/install.texi:2199: use braces to give a command
> > as an argument to @=
> > make[2]: *** [doc/gccinstall.info] Error 1
> > 
> > The attached patch fixes it.
> > 
> > OK to commit?
> 
> OK.  (This is so trivial it would qualify under the obvious patch
> rule 
> anyway.)
> 
> -Sandra

My texinfo skills aren't as strong as yours, so I was half-wondering if
this was some syntax I wasn't aware of, or maybe a version issue. 

Thanks for the confirmation; committed to trunk as r242991.

Dave

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-30 16:11   ` Andrew Haley
@ 2017-01-22 18:00     ` Gerald Pfeifer
  2017-01-22 18:42       ` Per Bothner
  2017-01-22 18:41     ` Gerald Pfeifer
  1 sibling, 1 reply; 86+ messages in thread
From: Gerald Pfeifer @ 2017-01-22 18:00 UTC (permalink / raw)
  To: Andrew Haley; +Cc: GCC Patches, GCJ-patches

On Fri, 30 Sep 2016, Andrew Haley wrote:
>> Note I did not include all the removed java/* contents.  Is there
>> anything particular you'd like to retain there?
> No, please delete it all.

Okay, so I (finally) went ahead and removed all of java/papers:

cvs commit: Examining java/papers
cvs commit: Examining java/papers/cni
Removing java/papers/README.sgml;
/cvs/gcc/wwwdocs/htdocs/java/papers/README.sgml,v  <--  README.sgml
new revision: delete; previous revision: 1.1
done
Removing java/papers/cni.sgml;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni.sgml,v  <--  cni.sgml
new revision: delete; previous revision: 1.5
done
Removing java/papers/compcon97.ps.gz;
/cvs/gcc/wwwdocs/htdocs/java/papers/compcon97.ps.gz,v  <--  compcon97.ps.gz
new revision: delete; previous revision: 1.1
done
Removing java/papers/compiling.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/compiling.html,v  <--  compiling.html
new revision: delete; previous revision: 1.3
done
Removing java/papers/compjava.pdf;
/cvs/gcc/wwwdocs/htdocs/java/papers/compjava.pdf,v  <--  compjava.pdf
new revision: delete; previous revision: 1.1
done
Removing java/papers/compjava.ps.gz;
/cvs/gcc/wwwdocs/htdocs/java/papers/compjava.ps.gz,v  <--  compjava.ps.gz
new revision: delete; previous revision: 1.1
done
Removing java/papers/esc97.sgml;
/cvs/gcc/wwwdocs/htdocs/java/papers/esc97.sgml,v  <--  esc97.sgml
new revision: delete; previous revision: 1.1
done
Removing java/papers/esc97w-slides.ps.gz;
/cvs/gcc/wwwdocs/htdocs/java/papers/esc97w-slides.ps.gz,v  <--  esc97w-slides.ps.gz
new revision: delete; previous revision: 1.1
done
Removing java/papers/gcc-java.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/gcc-java.html,v  <--  gcc-java.html
new revision: delete; previous revision: 1.6
done
Removing java/papers/gcc-java.ps.gz;
/cvs/gcc/wwwdocs/htdocs/java/papers/gcc-java.ps.gz,v  <--  gcc-java.ps.gz
new revision: delete; previous revision: 1.1
done
Removing java/papers/native++.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/native++.html,v  <--  native++.html
new revision: delete; previous revision: 1.3
done
Removing java/papers/native++.sgml;
/cvs/gcc/wwwdocs/htdocs/java/papers/native++.sgml,v  <--  native++.sgml
new revision: delete; previous revision: 1.3
done
Removing java/papers/nosb.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/nosb.html,v  <--  nosb.html
new revision: delete; previous revision: 1.6
done
Removing java/papers/nosb.ps.gz;
/cvs/gcc/wwwdocs/htdocs/java/papers/nosb.ps.gz,v  <--  nosb.ps.gz
new revision: delete; previous revision: 1.1
done
Removing java/papers/page.png;
/cvs/gcc/wwwdocs/htdocs/java/papers/page.png,v  <--  page.png
new revision: delete; previous revision: 1.1
done
Removing java/papers/table.png;
/cvs/gcc/wwwdocs/htdocs/java/papers/table.png,v  <--  table.png
new revision: delete; previous revision: 1.1
done
Removing java/papers/cni/HTML.manifest;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/HTML.manifest,v  <--  HTML.manifest
new revision: delete; previous revision: 1.3
done
Removing java/papers/cni/t1.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1.html,v  <--  t1.html
new revision: delete; previous revision: 1.3
done
Removing java/papers/cni/t1178.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1178.html,v  <--  t1178.html
new revision: delete; previous revision: 1.2
done
Removing java/papers/cni/t1215.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1215.html,v  <--  t1215.html
new revision: delete; previous revision: 1.2
done
Removing java/papers/cni/t1262.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1262.html,v  <--  t1262.html
new revision: delete; previous revision: 1.3
done
Removing java/papers/cni/t1308.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1308.html,v  <--  t1308.html
new revision: delete; previous revision: 1.2
done
Removing java/papers/cni/t1324.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1324.html,v  <--  t1324.html
new revision: delete; previous revision: 1.2
done
Removing java/papers/cni/t1331.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1331.html,v  <--  t1331.html
new revision: delete; previous revision: 1.2
done
Removing java/papers/cni/t134.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t134.html,v  <--  t134.html
new revision: delete; previous revision: 1.3
done
Removing java/papers/cni/t1405.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1405.html,v  <--  t1405.html
new revision: delete; previous revision: 1.2
done
Removing java/papers/cni/t1421.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1421.html,v  <--  t1421.html
new revision: delete; previous revision: 1.3
done
Removing java/papers/cni/t1431.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1431.html,v  <--  t1431.html
new revision: delete; previous revision: 1.2
done
Removing java/papers/cni/t1457.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1457.html,v  <--  t1457.html
new revision: delete; previous revision: 1.1
done
Removing java/papers/cni/t1467.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1467.html,v  <--  t1467.html
new revision: delete; previous revision: 1.2
done
Removing java/papers/cni/t187.html;
/cvs/gcc/wwwdocs/htdocs/java/papers/cni/t187.html,v  <--  t187.html
new revision: delete; previous revision: 1.2
done

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-30 16:11   ` Andrew Haley
  2017-01-22 18:00     ` Gerald Pfeifer
@ 2017-01-22 18:41     ` Gerald Pfeifer
  1 sibling, 0 replies; 86+ messages in thread
From: Gerald Pfeifer @ 2017-01-22 18:41 UTC (permalink / raw)
  To: java-patches; +Cc: gcc-patches

And here is more or less the last patch in this series, removing
java/libgcj2.html and two images (gcj.jpg and swingshot.png).

The only thing left in wwwdocs is a potential merge of java/news.html
into our general news.html that I am considering.  That'd take a bit
more time, and I'll see whether I can do that before the GCC 7.1 release.

Gerald

Index: java/libgcj2.html
===================================================================
RCS file: java/libgcj2.html
diff -N java/libgcj2.html
--- java/libgcj2.html	30 Jun 2014 09:29:09 -0000	1.12
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,38 +0,0 @@
-<html>
-
-<head>
-<title>The libgcj home page</title>
-</head>
-
-<body>
-
-    <h1>The libgcj home page</h1>
-
-    <h2>What is it?</h2>
-    
-    <p>``libgcj'' is the runtime that goes along with the <a
-    href="gcj2.html">gcj</a> front end to GCC.  libgcj includes parts
-    of the Java Class Libraries, plus glue to connect the libraries to
-    the compiler and the underlying OS.</p>
-
-    <h2>What you get</h2>
-
-    <p>libgcj eventually builds a couple of libraries (one for the
-    runtime and one for the garbage collector), a ``zip'' version of
-    the class libraries, and a program called ``jv-convert'' which can
-    be used to do character encoding transformations.</p>
-
-    <h2>What is missing?</h2>
-
-    <p>The runtime is not yet fully complete.  Parts of the standard
-    class libraries are missing (most notably AWT), though much of the
-    equivalent of JDK 1.2 has been supported.
-    Also, the bytecode interpreter available only on certain platforms.</p>
-
-    <h2>How to build it</h2>
-
-    <p>Just follow our <a href="https://gcc.gnu.org/install/">installation
-    instructions</a>.</p>
-
-</body>
-</html>
Index: java/gcj.jpg
===================================================================
RCS file: java/gcj.jpg
diff -N java/gcj.jpg
Binary files /tmp/cvseTgpza and /dev/null differ
Index: java/swingshot.png
===================================================================
RCS file: java/swingshot.png
diff -N java/swingshot.png
Binary files /tmp/cvsGkz1jF and /dev/null differ

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2017-01-22 18:00     ` Gerald Pfeifer
@ 2017-01-22 18:42       ` Per Bothner
  2017-01-23  9:03         ` Andrew Haley
  0 siblings, 1 reply; 86+ messages in thread
From: Per Bothner @ 2017-01-22 18:42 UTC (permalink / raw)
  To: Gerald Pfeifer, Andrew Haley; +Cc: GCC Patches, GCJ-patches

In my opinion, all/most of these should be restored.

On 01/22/2017 08:51 AM, Gerald Pfeifer wrote:
> On Fri, 30 Sep 2016, Andrew Haley wrote:
>>> Note I did not include all the removed java/* contents.  Is there
>>> anything particular you'd like to retain there?
>> No, please delete it all.
>
> Okay, so I (finally) went ahead and removed all of java/papers:
>
> cvs commit: Examining java/papers
> cvs commit: Examining java/papers/cni
> Removing java/papers/README.sgml;
> /cvs/gcc/wwwdocs/htdocs/java/papers/README.sgml,v  <--  README.sgml
> new revision: delete; previous revision: 1.1
> done
> Removing java/papers/cni.sgml;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni.sgml,v  <--  cni.sgml
> new revision: delete; previous revision: 1.5
> done
> Removing java/papers/compcon97.ps.gz;
> /cvs/gcc/wwwdocs/htdocs/java/papers/compcon97.ps.gz,v  <--  compcon97.ps.gz
> new revision: delete; previous revision: 1.1
> done
> Removing java/papers/compiling.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/compiling.html,v  <--  compiling.html
> new revision: delete; previous revision: 1.3
> done
> Removing java/papers/compjava.pdf;
> /cvs/gcc/wwwdocs/htdocs/java/papers/compjava.pdf,v  <--  compjava.pdf
> new revision: delete; previous revision: 1.1
> done
> Removing java/papers/compjava.ps.gz;
> /cvs/gcc/wwwdocs/htdocs/java/papers/compjava.ps.gz,v  <--  compjava.ps.gz
> new revision: delete; previous revision: 1.1
> done
> Removing java/papers/esc97.sgml;
> /cvs/gcc/wwwdocs/htdocs/java/papers/esc97.sgml,v  <--  esc97.sgml
> new revision: delete; previous revision: 1.1
> done
> Removing java/papers/esc97w-slides.ps.gz;
> /cvs/gcc/wwwdocs/htdocs/java/papers/esc97w-slides.ps.gz,v  <--  esc97w-slides.ps.gz
> new revision: delete; previous revision: 1.1
> done
> Removing java/papers/gcc-java.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/gcc-java.html,v  <--  gcc-java.html
> new revision: delete; previous revision: 1.6
> done
> Removing java/papers/gcc-java.ps.gz;
> /cvs/gcc/wwwdocs/htdocs/java/papers/gcc-java.ps.gz,v  <--  gcc-java.ps.gz
> new revision: delete; previous revision: 1.1
> done
> Removing java/papers/native++.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/native++.html,v  <--  native++.html
> new revision: delete; previous revision: 1.3
> done
> Removing java/papers/native++.sgml;
> /cvs/gcc/wwwdocs/htdocs/java/papers/native++.sgml,v  <--  native++.sgml
> new revision: delete; previous revision: 1.3
> done
> Removing java/papers/nosb.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/nosb.html,v  <--  nosb.html
> new revision: delete; previous revision: 1.6
> done
> Removing java/papers/nosb.ps.gz;
> /cvs/gcc/wwwdocs/htdocs/java/papers/nosb.ps.gz,v  <--  nosb.ps.gz
> new revision: delete; previous revision: 1.1
> done
> Removing java/papers/page.png;
> /cvs/gcc/wwwdocs/htdocs/java/papers/page.png,v  <--  page.png
> new revision: delete; previous revision: 1.1
> done
> Removing java/papers/table.png;
> /cvs/gcc/wwwdocs/htdocs/java/papers/table.png,v  <--  table.png
> new revision: delete; previous revision: 1.1
> done
> Removing java/papers/cni/HTML.manifest;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/HTML.manifest,v  <--  HTML.manifest
> new revision: delete; previous revision: 1.3
> done
> Removing java/papers/cni/t1.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1.html,v  <--  t1.html
> new revision: delete; previous revision: 1.3
> done
> Removing java/papers/cni/t1178.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1178.html,v  <--  t1178.html
> new revision: delete; previous revision: 1.2
> done
> Removing java/papers/cni/t1215.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1215.html,v  <--  t1215.html
> new revision: delete; previous revision: 1.2
> done
> Removing java/papers/cni/t1262.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1262.html,v  <--  t1262.html
> new revision: delete; previous revision: 1.3
> done
> Removing java/papers/cni/t1308.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1308.html,v  <--  t1308.html
> new revision: delete; previous revision: 1.2
> done
> Removing java/papers/cni/t1324.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1324.html,v  <--  t1324.html
> new revision: delete; previous revision: 1.2
> done
> Removing java/papers/cni/t1331.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1331.html,v  <--  t1331.html
> new revision: delete; previous revision: 1.2
> done
> Removing java/papers/cni/t134.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t134.html,v  <--  t134.html
> new revision: delete; previous revision: 1.3
> done
> Removing java/papers/cni/t1405.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1405.html,v  <--  t1405.html
> new revision: delete; previous revision: 1.2
> done
> Removing java/papers/cni/t1421.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1421.html,v  <--  t1421.html
> new revision: delete; previous revision: 1.3
> done
> Removing java/papers/cni/t1431.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1431.html,v  <--  t1431.html
> new revision: delete; previous revision: 1.2
> done
> Removing java/papers/cni/t1457.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1457.html,v  <--  t1457.html
> new revision: delete; previous revision: 1.1
> done
> Removing java/papers/cni/t1467.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t1467.html,v  <--  t1467.html
> new revision: delete; previous revision: 1.2
> done
> Removing java/papers/cni/t187.html;
> /cvs/gcc/wwwdocs/htdocs/java/papers/cni/t187.html,v  <--  t187.html
> new revision: delete; previous revision: 1.2
> done
>

-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-02 13:27         ` [PATCH] Delete GCJ Andreas Schwab
                             ` (2 preceding siblings ...)
  2016-10-28 20:57           ` [PATCH] Delete GCJ Eric Botcazou
@ 2017-01-22 23:06           ` Gerald Pfeifer
  3 siblings, 0 replies; 86+ messages in thread
From: Gerald Pfeifer @ 2017-01-22 23:06 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Andrew Haley, Marek Polacek, gcc-patches

On Sun, 2 Oct 2016, Andreas Schwab wrote:
> Things we may want to remove:
> 
> - references to java in contrib (download_ecj, gcc_update,
>   patch_tester.sh, update-copyright.py)

I have taken care of these (patch_tester.sh to follow shortly)...

> - GCJ, GCJ_FOR_BUILD, GCJ_FOR_TARGET in Makefiles.tpl and configure.ac
> - LIBGCJ_SONAME in config/i386/{cygwin.h,mingw32.h}
> - references to java in install.texi

...and config/i386 as well as libgcc and install.texi, plus a
number of changes on the web pages.

Is there anything else you see?  Anything you might help tackle?

Gerald

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2017-01-22 18:42       ` Per Bothner
@ 2017-01-23  9:03         ` Andrew Haley
  2017-01-23  9:10           ` Jakub Jelinek
  0 siblings, 1 reply; 86+ messages in thread
From: Andrew Haley @ 2017-01-23  9:03 UTC (permalink / raw)
  To: Per Bothner, Gerald Pfeifer; +Cc: GCC Patches, GCJ-patches

On 22/01/17 18:41, Per Bothner wrote:
> In my opinion, all/most of these should be restored.

Because of the historical interest?  That's a good point, and perhaps
I was too hasty.  Sorry.

Andrew.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2017-01-23  9:03         ` Andrew Haley
@ 2017-01-23  9:10           ` Jakub Jelinek
  2017-01-23 13:04             ` Per Bothner
  0 siblings, 1 reply; 86+ messages in thread
From: Jakub Jelinek @ 2017-01-23  9:10 UTC (permalink / raw)
  To: Andrew Haley; +Cc: Per Bothner, Gerald Pfeifer, GCC Patches, GCJ-patches

On Mon, Jan 23, 2017 at 09:01:24AM +0000, Andrew Haley wrote:
> On 22/01/17 18:41, Per Bothner wrote:
> > In my opinion, all/most of these should be restored.
> 
> Because of the historical interest?  That's a good point, and perhaps
> I was too hasty.  Sorry.

But then it should be probably moved somewhere where Gerald won't have to
spent time maintaining those pages (verification of URLs in there, updating
them when they are moved etc.).  Also to make it clear that GCJ is no longer
supported.

	Jakub

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2017-01-23  9:10           ` Jakub Jelinek
@ 2017-01-23 13:04             ` Per Bothner
  2017-01-23 13:49               ` Jakub Jelinek
  0 siblings, 1 reply; 86+ messages in thread
From: Per Bothner @ 2017-01-23 13:04 UTC (permalink / raw)
  To: Jakub Jelinek, Andrew Haley; +Cc: Gerald Pfeifer, GCC Patches, GCJ-patches

On 01/23/2017 01:05 AM, Jakub Jelinek wrote:
> On Mon, Jan 23, 2017 at 09:01:24AM +0000, Andrew Haley wrote:
>> On 22/01/17 18:41, Per Bothner wrote:
>>> In my opinion, all/most of these should be restored.
>>
>> Because of the historical interest?  That's a good point, and perhaps
>> I was too hasty.  Sorry.
>
> But then it should be probably moved somewhere where Gerald won't have to
> spent time maintaining those pages (verification of URLs in there, updating
> them when they are moved etc.).

The last part is moot, as we should strive to not move pages and thus break links.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2017-01-23 13:04             ` Per Bothner
@ 2017-01-23 13:49               ` Jakub Jelinek
  2017-01-23 15:05                 ` Andrew Haley
  0 siblings, 1 reply; 86+ messages in thread
From: Jakub Jelinek @ 2017-01-23 13:49 UTC (permalink / raw)
  To: Per Bothner; +Cc: Andrew Haley, Gerald Pfeifer, GCC Patches, GCJ-patches

On Mon, Jan 23, 2017 at 04:51:44AM -0800, Per Bothner wrote:
> On 01/23/2017 01:05 AM, Jakub Jelinek wrote:
> > On Mon, Jan 23, 2017 at 09:01:24AM +0000, Andrew Haley wrote:
> > > On 22/01/17 18:41, Per Bothner wrote:
> > > > In my opinion, all/most of these should be restored.
> > > 
> > > Because of the historical interest?  That's a good point, and perhaps
> > > I was too hasty.  Sorry.
> > 
> > But then it should be probably moved somewhere where Gerald won't have to
> > spent time maintaining those pages (verification of URLs in there, updating
> > them when they are moved etc.).
> 
> The last part is moot, as we should strive to not move pages and thus break links.

I meant updating URLs in the pages when they refer to external web pages
which move over time (or switch from http to https, or disappear, etc.).  Gerald
does a great job handling that, but if there are too many pages for
historical purpose only, it will make his work harder.

	Jakub

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2017-01-23 13:49               ` Jakub Jelinek
@ 2017-01-23 15:05                 ` Andrew Haley
  0 siblings, 0 replies; 86+ messages in thread
From: Andrew Haley @ 2017-01-23 15:05 UTC (permalink / raw)
  To: Jakub Jelinek, Per Bothner; +Cc: Gerald Pfeifer, GCC Patches, GCJ-patches

On 23/01/17 13:41, Jakub Jelinek wrote:
> On Mon, Jan 23, 2017 at 04:51:44AM -0800, Per Bothner wrote:

>> The last part is moot, as we should strive to not move pages and thus break links.
> 
> I meant updating URLs in the pages when they refer to external web pages
> which move over time (or switch from http to https, or disappear, etc.).  Gerald
> does a great job handling that, but if there are too many pages for
> historical purpose only, it will make his work harder.

We can redirect to somewhere else.

Andrew.


^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-10-29  9:07 Bernd Edlinger
@ 2016-10-29  9:13 ` Jakub Jelinek
  0 siblings, 0 replies; 86+ messages in thread
From: Jakub Jelinek @ 2016-10-29  9:13 UTC (permalink / raw)
  To: Bernd Edlinger; +Cc: Andreas Schwab, GCC Patches, Andrew Haley, Marek Polacek

On Sat, Oct 29, 2016 at 09:07:42AM +0000, Bernd Edlinger wrote:
> > Things we may want to remove:
> > 
> > - references to java in contrib (download_ecj, gcc_update,
> >   patch_tester.sh, update-copyright.py)
> > - GCJ, GCJ_FOR_BUILD, GCJ_FOR_TARGET in Makefiles.tpl and configure.ac
> > - LIBGCJ_SONAME in config/i386/{cygwin.h,mingw32.h}
> > - references to java in install.texi
> 
> Probably also gcc/jit/* and gcc/testsuite/jit.dg/* ?

??  gccjit has nothing to do with Java, it is a general purpose GIT for
whatever program wants to use it.

	Jakub

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
@ 2016-10-29  9:07 Bernd Edlinger
  2016-10-29  9:13 ` Jakub Jelinek
  0 siblings, 1 reply; 86+ messages in thread
From: Bernd Edlinger @ 2016-10-29  9:07 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: GCC Patches, Andrew Haley, Marek Polacek

> Things we may want to remove:
> 
> - references to java in contrib (download_ecj, gcc_update,
>   patch_tester.sh, update-copyright.py)
> - GCJ, GCJ_FOR_BUILD, GCJ_FOR_TARGET in Makefiles.tpl and configure.ac
> - LIBGCJ_SONAME in config/i386/{cygwin.h,mingw32.h}
> - references to java in install.texi

Probably also gcc/jit/* and gcc/testsuite/jit.dg/* ?

Bernd.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
  2016-09-05 23:20 Bernd Edlinger
@ 2016-09-06  0:24 ` Eric Gallager
  0 siblings, 0 replies; 86+ messages in thread
From: Eric Gallager @ 2016-09-06  0:24 UTC (permalink / raw)
  To: Bernd Edlinger; +Cc: Andrew Haley, gcc-patches, java-patches

On 9/5/16, Bernd Edlinger <bernd.edlinger@hotmail.de> wrote:
> On 05.09.2016 17:13, Andrew Haley wrote:
>  > As discussed.  I think I should ask a Global reviewer to approve this
>  > one.  For obvious reasons I haven't included the diffs to the deleted
>  > gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
>  > is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
>  > if anyone would like to try it.
>  >
>  > Andrew.
>  >
>  >
>  > 2016-09-05  Andrew Haley  <aph@redhat.com>
>  >
>  > 	* Makefile.def: Remove libjava.
>  > 	* Makefile.tpl: Likewise.
>  > 	* Makefile.in: Regenerate.
>  > 	* configure.ac: Likewise.
>  > 	* configure: Likewise.
>  > 	* gcc/java: Remove.
>  > 	* libjava: Likewise.
>
>
> I think you can remove libffi as well, right?
>
>


I think Go uses libffi as well; for further discussion see bug 11660:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11660
(people there seem to think ObjC uses libffi, too, but I haven't
noticed it doing that myself)

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [PATCH] Delete GCJ
@ 2016-09-05 23:20 Bernd Edlinger
  2016-09-06  0:24 ` Eric Gallager
  0 siblings, 1 reply; 86+ messages in thread
From: Bernd Edlinger @ 2016-09-05 23:20 UTC (permalink / raw)
  To: Andrew Haley, gcc-patches, java-patches

On 05.09.2016 17:13, Andrew Haley wrote:
 > As discussed.  I think I should ask a Global reviewer to approve this
 > one.  For obvious reasons I haven't included the diffs to the deleted
 > gcc/java and libjava directories.  The whole tree, post GCJ-deletion,
 > is at svn+ssh://gcc.gnu.org/svn/gcc/branches/gcj/gcj-deletion-branch
 > if anyone would like to try it.
 >
 > Andrew.
 >
 >
 > 2016-09-05  Andrew Haley  <aph@redhat.com>
 >
 > 	* Makefile.def: Remove libjava.
 > 	* Makefile.tpl: Likewise.
 > 	* Makefile.in: Regenerate.
 > 	* configure.ac: Likewise.
 > 	* configure: Likewise.
 > 	* gcc/java: Remove.
 > 	* libjava: Likewise.


I think you can remove libffi as well, right?


Bernd.

^ permalink raw reply	[flat|nested] 86+ messages in thread

end of thread, other threads:[~2017-01-23 14:51 UTC | newest]

Thread overview: 86+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05 15:29 [PATCH] Delete GCJ Andrew Haley
2016-09-05 15:31 ` Matthias Klose
2016-09-05 15:32   ` Andrew Haley
2016-09-05 18:38   ` Eric Gallager
2016-09-05 15:55 ` Matthew Fortune
     [not found] ` <FB08E20B-5ED1-45BA-BFA0-11E7807840D2@gmail.com>
2016-09-05 16:26   ` Andrew Haley
2016-09-06  9:08     ` Richard Biener
2016-09-06  9:11       ` Jakub Jelinek
2016-09-06 21:24         ` Jeff Law
2016-09-07 11:52           ` Richard Earnshaw (lists)
2016-09-09 11:47       ` Ian Lance Taylor
2016-09-05 16:35 ` Gerald Pfeifer
2016-09-05 18:58   ` Eric Gallager
2016-09-30 16:11   ` Andrew Haley
2017-01-22 18:00     ` Gerald Pfeifer
2017-01-22 18:42       ` Per Bothner
2017-01-23  9:03         ` Andrew Haley
2017-01-23  9:10           ` Jakub Jelinek
2017-01-23 13:04             ` Per Bothner
2017-01-23 13:49               ` Jakub Jelinek
2017-01-23 15:05                 ` Andrew Haley
2017-01-22 18:41     ` Gerald Pfeifer
2016-09-10 12:22 ` NightStrike
2016-09-11 13:03   ` Andrew Haley
2016-09-30 10:42     ` Marek Polacek
2016-09-30 13:11       ` Andrew Haley
2016-09-30 19:08         ` [PATCH] Fix bootstrap with --enable-languages=all,go Jakub Jelinek
2016-09-30 20:06           ` Eric Gallager
2016-09-30 23:52             ` Rainer Orth
2016-10-01  7:58               ` Andrew Haley
2016-10-03 12:53                 ` Rainer Orth
2016-10-04 15:28                   ` Jeff Law
2016-10-04  9:23               ` Jakub Jelinek
2016-10-19 12:14                 ` Rainer Orth
2016-10-24 18:51                   ` Jeff Law
2016-10-27 12:02                     ` Rainer Orth
2016-10-27 12:02                     ` Rainer Orth
2016-10-27 16:00                       ` Jeff Law
2016-10-27 12:02                     ` Rainer Orth
2016-10-27 12:02                     ` Rainer Orth
2016-09-30 23:54           ` Ian Lance Taylor
2016-10-02 13:27         ` [PATCH] Delete GCJ Andreas Schwab
2016-10-02 16:51           ` Andrew Haley
2016-10-02 19:59           ` [C++ PATCH] Delete GCJ - C++ part Jakub Jelinek
2016-10-04 15:20             ` Jason Merrill
2016-10-05  9:04             ` Andreas Schwab
2016-10-05  9:07               ` Jakub Jelinek
2016-10-05 16:22                 ` Jeff Law
2016-10-28 20:57           ` [PATCH] Delete GCJ Eric Botcazou
2017-01-22 23:06           ` Gerald Pfeifer
2016-10-03 23:12 ` Matthias Klose
2016-10-04  8:40   ` Rainer Orth
2016-10-04  8:41     ` Andrew Haley
2016-10-04 17:23       ` Mike Stump
2016-10-04 17:25         ` Andrew Pinski
2016-10-04 18:40         ` Iain Sandoe
2016-10-05 16:28           ` Jeff Law
     [not found]             ` <2b5de569-1efd-f407-49c2-c9fa84cc5315@ubuntu.com>
2016-10-06 16:16               ` Matthias Klose
2016-10-06 16:43                 ` Rainer Orth
2016-10-06 16:47                   ` Iain Sandoe
2016-10-06 16:54                     ` Matthias Klose
2016-10-06 16:56                       ` Rainer Orth
2016-10-06 17:10                         ` Iain Sandoe
2016-10-06 18:01                         ` Mike Stump
2016-10-06 23:59                           ` Matthias Klose
2016-10-07  8:31                             ` Iain Sandoe
2016-10-10  4:03                               ` Matthias Klose
2016-10-10  7:58                                 ` Iain Sandoe
2016-11-20 20:42                                   ` Matthias Klose
2016-11-21  5:34                                     ` Sandra Loosemore
2016-11-21 10:24                                     ` Iain Sandoe
2016-11-21 12:57                                       ` Matthias Klose
2016-11-21 16:23                                         ` Sandra Loosemore
2016-11-21 16:40                                           ` Matthias Klose
2016-11-21 17:16                                             ` Rainer Orth
2016-11-21 23:23                                               ` Matthias Klose
2016-11-22 17:13                                                 ` Sandra Loosemore
2016-11-29 21:23                                                 ` Jeff Law
2016-11-30  1:11                                                   ` Remove stray '@' from install.texi (was Re: [PATCH] Delete GCJ) David Malcolm
2016-11-30  1:20                                                     ` Sandra Loosemore
2016-11-30  1:26                                                       ` David Malcolm
2016-11-21 17:16                                             ` [PATCH] Delete GCJ Peter Bergner
2016-09-05 23:20 Bernd Edlinger
2016-09-06  0:24 ` Eric Gallager
2016-10-29  9:07 Bernd Edlinger
2016-10-29  9:13 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).