https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91947

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org

--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Isn't the creation of these files in ${host_builddir} with >> racy though?
We recently had a build failure because largefile-config.h was truncated.

Here's an example from the GCC Makefile:

# all-tree.def includes all the tree.def files.
all-tree.def: s-alltree; @true
s-alltree: Makefile
        rm -f tmp-all-tree.def
        echo '#include "tree.def"' > tmp-all-tree.def
        echo 'END_OF_BASE_TREE_CODES' >> tmp-all-tree.def
        echo '#include "c-family/c-common.def"' >> tmp-all-tree.def
        ltf="$(lang_tree_files)"; for f in $$ltf; do \
          echo "#include \"$$f\""; \
        done | sed 's|$(srcdir)/||' >> tmp-all-tree.def
        $(SHELL) $(srcdir)/../move-if-change tmp-all-tree.def all-tree.def
        $(STAMP) s-alltree

which looks more robust.

Reply via email to