This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Running ranlib after installation - okay or not?
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>, Peter O'Gorman <peter at pogma dot com>
- Cc: gcc-patches at gcc dot gnu dot org, DJ Delorie <dj at redhat dot com>
- Date: Sun, 2 Jul 2006 18:27:24 +0200 (CEST)
- Subject: Re: Running ranlib after installation - okay or not?
- References: <Pine.BSF.4.62.0508311718400.22973@pulcherrima.dbai.tuwien.ac.at> <431AA840.6010203@pogma.com> <Pine.BSF.4.62.0509241936010.39955@pulcherrima.dbai.tuwien.ac.at> <433B6DC5.4090102@pogma.com> <oroe5xcjxn.fsf@livre.oliva.athome.lsd.ic.unicamp.br> <434BE045.9020705@pogma.com>
Alexandre,
I noticed the following patch (attached) apparently still is not
in our trees. Would you mind having a look?
This addresses a real problem seen by some users -- as far as I
recall, all users of the FreeBSD Ports Collection starting about
nine months ago.
It would be nice to have this on mainline and the 4.1 branch, at
least, ideally also the 4.0 branch.
Thanks,
Gerald
On Wed, 12 Oct 2005, Peter O'Gorman wrote:
I posted a patch that nobody has had time to look at for this, even if
it is not acceptable (it would probably be better if it reset the
permissions after calling ranlib) I'd appreciate some feedback :)
><http://gcc.gnu.org/ml/gcc-patches/2005-09/msg00201.html>
I'd missed it, sorry.
The patch is ok, but it's not in yet because the format of the
ChangeLog entries will require manual application in every one of the
files, and that takes time. If you'd repost the patch in a format
that enables it to be installed with say cl2patch, or even with the
raw ChangeLog diffs such that I use clcleanup and cl2patch to apply it
to the current tree, I'll check it in when the mainline policy allows
it.
Attached. Sorry I didn't do this in the first place.
Thank you,
Peter
Index: ChangeLog
2005-10-11 Peter O'Gorman <peter@pogma.com>
* ltconfig: chmod 644 before ranlib during install.
Index: ltconfig
===================================================================
RCS file: /cvs/gcc/gcc/ltconfig,v
retrieving revision 1.34
diff -u -3 -p -u -r1.34 ltconfig
--- ltconfig 16 Jul 2005 02:30:52 -0000 1.34
+++ ltconfig 11 Oct 2005 15:34:41 -0000
@@ -626,7 +626,7 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ old_postinstall_cmds="~$old_postinstall_cmds~\$RANLIB \$oldlib"
fi
# Source the script associated with the $tagname tag configuration.
Index: gcc/ChangeLog
2005-10-11 Peter O'Gorman <peter@pogma.com>
* mklibgcc.in: chmod 644 before ranlib during install.
Index: gcc/mklibgcc.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/mklibgcc.in,v
retrieving revision 1.89
diff -u -3 -p -u -r1.89 mklibgcc.in
--- gcc/mklibgcc.in 2 Jul 2005 08:51:52 -0000 1.89
+++ gcc/mklibgcc.in 11 Oct 2005 15:34:43 -0000
@@ -796,12 +796,15 @@ for ml in $MULTILIBS; do
ldir='$(DESTDIR)$(libsubdir)'
fi
echo ' $(INSTALL_DATA)' ${dir}/libgcc.a ${ldir}/
+ echo ' chmod 644' ${ldir}/libgcc.a
echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc.a
echo ' $(INSTALL_DATA)' ${dir}/libgcov.a ${ldir}/
+ echo ' chmod 644' ${ldir}/libgcov.a
echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcov.a
if [ "$SHLIB_LINK" ]; then
echo ' $(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/
+ echo ' chmod 644' ${ldir}/libgcc_eh.a
echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a
shlib_slibdir_qual=
@@ -820,6 +823,7 @@ for ml in $MULTILIBS; do
-e "s%@shlib_slibdir_qual@%$shlib_slibdir_qual%g"
libunwinddir='$(DESTDIR)$(slibdir)$(shlib_slibdir_qual)/$(shlib_dir)'
echo ' $(INSTALL_DATA)' ${dir}/libunwind.a ${libunwinddir}/
+ echo ' chmod 644' ${dir}/libunwind.a
echo ' $(RANLIB_FOR_TARGET)' ${libunwinddir}/libunwind.a
fi
fi
Index: libiberty/ChangeLog
2005-10-11 Peter O'Gorman <peter@pogma.com>
* Makefile.in: chmod 644 before ranlib during install.
Index: libiberty/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/Makefile.in,v
retrieving revision 1.117
diff -u -3 -p -u -r1.117 Makefile.in
--- libiberty/Makefile.in 26 Sep 2005 20:55:10 -0000 1.117
+++ libiberty/Makefile.in 11 Oct 2005 15:34:56 -0000
@@ -280,7 +280,7 @@ install: install_to_$(INSTALL_DEST) inst
install_to_libdir: all
${mkinstalldirs} $(DESTDIR)$(libdir)$(MULTISUBDIR)
$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
- ( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
+ ( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n )
mv -f $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)
if test -n "${target_header_dir}"; then \
case "${target_header_dir}" in \
@@ -302,7 +302,7 @@ MULTIOSDIR = `$(CC) $(LIBCFLAGS) -print-
install_to_tooldir: all
${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)
$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n
- ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; $(RANLIB) $(TARGETLIB)n )
+ ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n; $(RANLIB) $(TARGETLIB)n )
mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
Index: libjava/classpath/ChangeLog
2005-10-11 Peter O'Gorman <peter@pogma.com>
* ltconfig: chmod 642 before ranlib during install.
Index: libjava/classpath/ltconfig
===================================================================
RCS file: /cvs/gcc/gcc/libjava/classpath/ltconfig,v
retrieving revision 1.3
diff -u -3 -p -u -r1.3 ltconfig
--- libjava/classpath/ltconfig 23 Sep 2005 21:30:30 -0000 1.3
+++ libjava/classpath/ltconfig 11 Oct 2005 15:35:03 -0000
@@ -626,7 +626,7 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ old_postinstall_cmds="\$old_postinstall_cmds~$RANLIB \$oldlib"
fi
# Source the script associated with the $tagname tag configuration.