On Mon, 2014-12-01 at 19:31 -0500, Ulrich Drepper wrote:
> I think the jit patches introduced a problem when you rebuild within a
> directory that contains an old build (i.e., no brand new build
> directory).  The  gcc/Makefile creates a symlink for xgcc with the full
> driver name without first removing the symlink.

I think you're right.  Sorry about this.  I've been occasionally seeing
this.  It appears to be an issue if rebuilding, having run the jit
testsuite, having touched something that affects ./xgcc.

> The right procedure
> (gathered from other Makefiles) seems to be to just use rm first.  This
> is what the patch below does.
> 
> In addition I took the liberty of changing the Makefile to us $(LN_S)
> instead on $(LN) -s.
> 
> OK?

I don't know if I'm qualified to review this [1], but the patch looks
good to me.  I've tested it at this end.

Thanks
Dave

[1] fwiw FULL_DRIVER_NAME is AFAIK only used by the jit, and I'm jit
maintainer.


> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index c42c2e4..eaf3ee8 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,8 @@
> +2014-12-01  Ulrich Drepper  <drep...@gmail.com>
> +
> +     * Makefile.in: Use LN_S instead of ln -s and remove file first
> +     if it exists.
> +
>  2014-12-01  Segher Boessenkool  <seg...@kernel.crashing.org>
>  
>       * combine.c (try_combine): Use is_parallel_of_n_reg_sets some more.
> diff --git a/gcc/Makefile.in b/gcc/Makefile.in
> index 204bd85..60cfa54 100644
> --- a/gcc/Makefile.in
> +++ b/gcc/Makefile.in
> @@ -1545,7 +1545,8 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h 
> insn-codes.h \
>  # from within the *build* directory, for use when running the JIT library
>  # from there (e.g. when running its testsuite).
>  $(FULL_DRIVER_NAME): ./xgcc
> -     $(LN) -s $< $@
> +     rm -f $@
> +     $(LN_S) $< $@
>  
>  #
>  # Language makefile fragments.


Reply via email to