libtool-patches
[Top][All Lists]
Advanced

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

Re: No need for object file removal before compilation


From: Bob Friesenhahn
Subject: Re: No need for object file removal before compilation
Date: Wed, 9 Apr 2008 19:45:30 -0500 (CDT)

On Thu, 10 Apr 2008, Ralf Wildenhues wrote:

OK to apply?  I fail to see why it's necessary to remove these files.
If they existed from a previous compile, they are outdated, so what.
But I may be overlooking something here.

Removing the object file in advance accomplishes several things:

  o It ensures that the output object file is the result of the
    current compile.

  o It ensures that the output object file is owned by the person
    doing the build.

  o If the existing object file was a link, then it assures that an
    object file is written in place of the link rather than overwriting
    the file pointed to by the link.

The above assumes that the compiler may not be completely well behaved in that it might not unlink the output file in advance.

I am familiar with the link issue since years ago I implemented a build system for a project so large that the built product was larger than the individual developer's hard drives could support. So there was a central weekly build that developers built link trees to, and then any updated objects were written to the developer's drives. It worked amazingly well.

I think that removing the object file in advance is a wise idea so this patch should not be applied even if it makes libtool slower.

Bob


Thanks,
Ralf

2008-04-10  Ralf Wildenhues  <address@hidden>

        * libltdl/config/ltmain.m4sh (func_mode_compile): No need to
        remove old output files before compilation.

Index: libltdl/config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.102
diff -u -r1.102 ltmain.m4sh
--- libltdl/config/ltmain.m4sh  16 Mar 2008 08:34:25 -0000      1.102
+++ libltdl/config/ltmain.m4sh  9 Apr 2008 23:33:43 -0000
@@ -1437,7 +1423,6 @@
      removelist="$lobj $libobj ${libobj}T"
    fi

-    $opt_dry_run || $RM $removelist
    trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15

    # On Cygwin there's no "real" PIC flag so we must build both object types
@@ -1568,7 +1553,6 @@

      # Suppress compiler output if we already did a PIC compilation.
      command="$command$suppress_output"
-      $opt_dry_run || $RM "$obj" "$output_obj"
      func_show_eval_locale "$command" \
        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'




======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/





reply via email to

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