This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

[Patch libgcc build] cater for static archives as 'extra parts'


Hi,

It would tidy up cases where several "extra parts" objects are used if they could be made into a static archive.

At present, although "extra parts" can be built as static archives, libgcc's build process does not carry out the additional ranlib needed by some targets after installing them.

This patch looks for static archives in the list and applies the ranlib.

(I have a tidy-up patch for darwin which would like to use this facility),

OK for trunk?
Iain

libgcc:

* Makefile.in (libgcc-extra-parts): Check for static archives and ranlib after installing.
(gcc-extra-parts): Likewise.
(install-leaf): LIkewise.


Index: libgcc/Makefile.in
===================================================================
--- libgcc/Makefile.in	(revision 164304)
+++ libgcc/Makefile.in	(working copy)
@@ -870,6 +870,9 @@ endif
 	for file in $$parts; do					\
 	  rm -f $(gcc_objdir)$(MULTISUBDIR)/$$file;		\
 	  $(INSTALL_DATA) $$file $(gcc_objdir)$(MULTISUBDIR)/;	\
+	  if [ $${file##*.} = "a" ] ; then 			\
+	    $(RANLIB) $(gcc_objdir)$(MULTISUBDIR)/$$file;	\
+	  fi;							\
 	done

 # Build extra startfiles in the gcc directory, for unconverted
@@ -903,6 +906,9 @@ gcc-extra-parts:
 	for file in $$parts; do					\
 	  rm -f $(gcc_objdir)$(MULTISUBDIR)/$$file;		\
 	  $(INSTALL_DATA) $$file $(gcc_objdir)$(MULTISUBDIR)/;	\
+	  if [ $${file##*.} = "a" ] ; then 			\
+	    $(RANLIB) $(gcc_objdir)$(MULTISUBDIR)/$$file;	\
+	  fi;							\
 	done

 all: $(extra-parts)
@@ -958,6 +964,9 @@ install-leaf: $(install-shared) $(install-libunwin
 	for file in $$parts; do					\
 	  rm -f $(DESTDIR)$(inst_libdir)/$$file;		\
 	  $(INSTALL_DATA) $$file $(DESTDIR)$(inst_libdir)/;	\
+	  if [ $${file##*.} = "a" ] ; then 			\
+	    $(RANLIB) $(gcc_objdir)$(MULTISUBDIR)/$$file;	\
+	  fi;							\
 	done

install: install-leaf


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