libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: branch-1-5: root-owned libtool files in build tree after relink


From: Ralf Wildenhues
Subject: FYI: branch-1-5: root-owned libtool files in build tree after relink
Date: Fri, 8 Jul 2005 17:20:00 +0200
User-agent: Mutt/1.4.1i

* Ralf Wildenhues wrote on Sun, Jul 03, 2005 at 10:39:46AM CEST:
> 
> I noted a work-around in the MirBSD port of Libtool for root-created
> leftovers in .libs after a `make install' which requires relinking,
*snip*
> Could you confirm that this patch below fixes the issue instead?

FYI: I have applied this patch to branch-1-5 (it's already in the other
branches).

I like the idea of not writing to the build tree at all during relinking
(and also relinking in less situations), but both of these issues are
orthogonal to the question whether the relink step, if done, needs to
clean up after itself.  So they will be addressed in another patch..

Regards,
Ralf

> 2005-07-03  Albert Chin-A-Young  <address@hidden>
> 
>         * ltmain.in: When a library is installed, dependent on a
>         convenience library, and it involves relinking, the object
>         files extracted from the convenience library are not removed
>         after the relink. This is a problem if you build as non-root,
>         install as root, then try to remove the build directory as
>         non-root; Clean up properly if relink fails; Change
>         "$realname"U to ${realname}T to be consistent.
>         Missing backport of 2004-03-24 patch reported against MirLibtool
>         by Marc Matteo <address@hidden>.
> 
> Index: ltmain.in
> ===================================================================
> RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
> retrieving revision 1.334.2.74
> diff -u -r1.334.2.74 ltmain.in
> --- ltmain.in 1 Jul 2005 02:23:01 -0000       1.334.2.74
> +++ ltmain.in 3 Jul 2005 08:31:39 -0000
> @@ -4009,13 +4009,30 @@
>         IFS="$save_ifs"
>         eval cmd=\"$cmd\"
>         $show "$cmd"
> -       $run eval "$cmd" || exit $?
> +       $run eval "$cmd" || {
> +         lt_exit=$?
> +
> +         # Restore the uninstalled library and exit
> +         if test "$mode" = relink; then
> +           $run eval '(cd $output_objdir && $rm ${realname}T && $mv 
> ${realname}U $realname)'
> +         fi
> +
> +         exit $lt_exit
> +       }
>       done
>       IFS="$save_ifs"
>  
>       # Restore the uninstalled library and exit
>       if test "$mode" = relink; then
>         $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname 
> ${realname}T && $mv "$realname"U $realname)' || exit $?
> +
> +       if test -n "$convenience"; then
> +         if test -z "$whole_archive_flag_spec"; then
> +           $show "${rm}r $gentop"
> +           $run ${rm}r "$gentop"
> +         fi
> +       fi
> +
>         exit $EXIT_SUCCESS
>       fi
>  
> @@ -5615,7 +5632,16 @@
>           IFS="$save_ifs"
>           eval cmd=\"$cmd\"
>           $show "$cmd"
> -         $run eval "$cmd" || exit $?
> +         $run eval "$cmd" || {
> +           lt_exit=$?
> +
> +           # Restore the uninstalled library and exit
> +           if test "$mode" = relink; then
> +             $run eval '(cd $output_objdir && $rm ${realname}T && $mv 
> ${realname}U $realname)'
> +           fi
> +
> +           exit $lt_exit
> +         }
>         done
>         IFS="$save_ifs"
>       fi
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]