diff mbox

gcc make clean fixes

Message ID CABXYE2UcFN1AugwUag30UUD_mB+jZ4-ymvH+JiJ9=h--uq4StQ@mail.gmail.com
State New
Headers show

Commit Message

Jim Wilson April 24, 2015, 3:34 a.m. UTC
I noticed that make clean isn't removing C++ binaries.  It was broken here
    https://gcc.gnu.org/ml/gcc-patches/2007-01/msg00214.html
Removing stagestuff accidentally removed those items from the
mostlyclean rule.  They need to be re-added to the language dependent
mostlyclean rules.  All of the old languages are affected, except for
java which someone already fixed.  And plus the new language go which
inherits the same mistake from the older languages.

Also the new language jit which has no clean rules at all, so I added the bare
minimum that we should have.

This was tested by building every language except ada, running make
clean, and looking at what was left.  This gave the expected result.
There are still a few misc things around, but this patch gets most of
it.

I didn't build ada because when I try to install gnat, apt-get tells
me it has to remove gdb.  I'm not willing to try that on my main
development machine.  But the ada patch follows the exact same rule as
the others, which is to add stuff that used to be in stagestuff, and
appears to be trivially correct.

Jim

Comments

Jim Wilson April 27, 2015, 11:03 p.m. UTC | #1
On Mon, Apr 27, 2015 at 12:30 PM, Jeff Law <law@redhat.com> wrote:
> Looks good to me.  Please install if you haven't already done so.

Thanks, I checked in the patch.  I'm not maintainer of anything
currently, so I'm assuming all of my patches need to be approved
before check in.  I'm pretty rusty, so that is probably a good thing
for now.  FYI, I tested the ada part over the weekend with a fresh
linux install on a spare machine.

Jim
diff mbox

Patch

Index: ada/ChangeLog
===================================================================
--- ada/ChangeLog	(revision 222394)
+++ ada/ChangeLog	(working copy)
@@ -1,3 +1,8 @@ 
+2015-04-23  Jim Wilson  <jim.wilson@linaro.org>
+
+	* gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
+	and gnat1.
+
 2015-04-13  Eric Botcazou  <ebotcazou@adacore.com>
 
 	* gnatvsn.ads (Library_Version): Bump to 6.
Index: ada/gcc-interface/Make-lang.in
===================================================================
--- ada/gcc-interface/Make-lang.in	(revision 222394)
+++ ada/gcc-interface/Make-lang.in	(working copy)
@@ -811,6 +811,7 @@ 
 	-$(RM) ada/*$(coverageexts)
 	-$(RM) ada/sdefault.adb ada/stamp-sdefault ada/stamp-snames
 	-$(RMDIR) ada/tools
+	-$(RM) gnatbind$(exeext) gnat1$(exeext)
 ada.clean:
 ada.distclean:
 	-$(RM) ada/Makefile
Index: cp/ChangeLog
===================================================================
--- cp/ChangeLog	(revision 222394)
+++ cp/ChangeLog	(working copy)
@@ -1,3 +1,7 @@ 
+2015-04-23  Jim Wilson  <jim.wilson@linaro.org>
+
+	* Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
+
 2015-04-23  Jason Merrill  <jason@redhat.com>
 
 	PR c++/65646
Index: cp/Make-lang.in
===================================================================
--- cp/Make-lang.in	(revision 222394)
+++ cp/Make-lang.in	(working copy)
@@ -221,6 +221,7 @@ 
 	-rm -f doc/g++.1
 	-rm -f cp/*$(objext)
 	-rm -f cp/*$(coverageexts)
+	-rm -f xg++$(exeext) g++-cross$(exeext) cc1plus$(exeext)
 c++.clean:
 c++.distclean:
 	-rm -f cp/config.status cp/Makefile
Index: fortran/ChangeLog
===================================================================
--- fortran/ChangeLog	(revision 222394)
+++ fortran/ChangeLog	(working copy)
@@ -1,3 +1,8 @@ 
+2015-04-23  Jim Wilson  <jim.wilson@linaro.org>
+
+	* Make-lang.in (fortran.mostlyclean): Remove gfortran and
+	gfortran-cross.
+
 2015-04-23  Andre Vehreschild  <vehre@gmx.de>
 
 	PR fortran/60322
Index: fortran/Make-lang.in
===================================================================
--- fortran/Make-lang.in	(revision 222394)
+++ fortran/Make-lang.in	(working copy)
@@ -275,7 +275,7 @@ 
 # We just have to delete files specific to us.
 
 fortran.mostlyclean:
-	-rm -f f951$(exeext)
+	-rm -f gfortran$(exeext) gfortran-cross$(exeext) f951$(exeext)
 	-rm -f fortran/*.o
 
 fortran.clean:
Index: go/ChangeLog
===================================================================
--- go/ChangeLog	(revision 222394)
+++ go/ChangeLog	(working copy)
@@ -1,3 +1,7 @@ 
+2015-04-23  Jim Wilson  <jim.wilson@linaro.org>
+
+	* Make-lang.in (go.mostlyclean): Remove gccgo, gccgo-cross, and go1.
+
 2015-04-17  Chris Manghane  <cmang@google.com>
 
 	* Make-lang.in (GO_OBJS): Add go/escape.o.
Index: go/Make-lang.in
===================================================================
--- go/Make-lang.in	(revision 222394)
+++ go/Make-lang.in	(working copy)
@@ -198,6 +198,7 @@ 
 go.mostlyclean:
 	-rm -f go/*$(objext)
 	-rm -f go/*$(coverageexts)
+	-rm -f gccgo$(exeext) gccgo-cross$(exeext) go1$(exeext)
 go.clean:
 go.distclean:
 go.maintainer-clean:
Index: jit/ChangeLog
===================================================================
--- jit/ChangeLog	(revision 222394)
+++ jit/ChangeLog	(working copy)
@@ -1,3 +1,8 @@ 
+2015-04-23  Jim Wilson  <jim.wilson@linaro.org>
+
+	* Make-lang.in (jit.mostlyclean): Remove shared libraries and object
+	files.
+
 2015-04-09  David Malcolm  <dmalcolm@redhat.com>
 
 	PR jit/65691
Index: jit/Make-lang.in
===================================================================
--- jit/Make-lang.in	(revision 222394)
+++ jit/Make-lang.in	(working copy)
@@ -285,6 +285,10 @@ 
 # We just have to delete files specific to us.
 
 jit.mostlyclean:
+	-rm -f $(LIBGCCJIT_FILENAME) $(LIBGCCJIT_SYMLINK)
+	-rm -f $(LIBGCCJIT_LINKER_NAME_SYMLINK) $(FULL_DRIVER_NAME)
+	-rm -f $(LIBGCCJIT_SONAME)
+	-rm -f $(jit_OBJS)
 
 jit.clean:
 
Index: objc/ChangeLog
===================================================================
--- objc/ChangeLog	(revision 222394)
+++ objc/ChangeLog	(working copy)
@@ -1,3 +1,7 @@ 
+2015-04-23  Jim Wilson  <jim.wilson@linaro.org>
+
+	* Make-lang.in (objc.mostlyclean): Remove cc1obj.
+
 2015-04-18  Trevor Saunders  <tsaunders@mozilla.com>
 
 	* objc-act.c: Adjust for hash_table changes.
Index: objc/Make-lang.in
===================================================================
--- objc/Make-lang.in	(revision 222394)
+++ objc/Make-lang.in	(working copy)
@@ -114,6 +114,7 @@ 
 objc.mostlyclean:
 	-rm -f objc/*$(objext) objc/xforward objc/fflags
 	-rm -f objc/*$(coverageexts)
+	-rm -f cc1obj$(exeext)
 objc.clean: objc.mostlyclean
 	-rm -rf objc-headers
 objc.distclean:
Index: objcp/ChangeLog
===================================================================
--- objcp/ChangeLog	(revision 222394)
+++ objcp/ChangeLog	(working copy)
@@ -1,3 +1,7 @@ 
+2015-04-23  Jim Wilson  <jim.wilson@linaro.org>
+
+	* Make-lang.in (obj-c++.mostlyclean): Remove cc1objplus.
+
 2015-01-09  Michael Collison  <michael.collison@linaro.org>
 
 	* objcp-decl.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
Index: objcp/Make-lang.in
===================================================================
--- objcp/Make-lang.in	(revision 222394)
+++ objcp/Make-lang.in	(working copy)
@@ -142,6 +142,7 @@ 
 obj-c++.mostlyclean:
 	-rm -f objcp/*$(objext)
 	-rm -f objcp/*$(coverageexts)
+	-rm -f cc1objplus$(exeext)
 obj-c++.clean: obj-c++.mostlyclean
 obj-c++.distclean:
 	-rm -f objcp/config.status objcp/Makefile