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.  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?


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