+# Create links to binutils, especially for in-tree builds, to make -B.
+# use them. We need hard links so that directories can be shuffled
+# during toplevel bootstrap.
+# Go through an additional indirection, because the file we create
+# can be either `sometool' (if it is a script) or `sometool$(exeext)'
+# (if it is a hard link).
+stamp-as: $(ORIGINAL_AS_FOR_TARGET)
+ @echo creating as; rm -f as; \
+ case "$<" in \
+ ./*) ;; \
+ ../*) \
+ echo $(LN) $< as$(exeext); \
+ $(LN) $< as$(exeext) || cp $< as$(exeext) ;; \
+ *) echo '#!$(SHELL)' > as; echo 'exec $< "$$@"' >> as ; \
+ chmod +x as ;; \
+ esac
+ echo timestamp > $@
+
+stamp-collect-ld: $(ORIGINAL_LD_FOR_TARGET)
+ @echo creating collect-ld; rm -f collect-ld; \
+ case "$<" in \
+ ./*) ;; \
+ ../*) \
+ echo $(LN) $< collect-ld$(exeext); \
+ $(LN) $< collect-ld$(exeext) || cp $< collect-ld$(exeext) ;; \
+ *) echo '#!$(SHELL)' > collect-ld; echo 'exec $< "$$@"' >> collect-ld ; \
+ chmod +x collect-ld ;; \
+ esac
+ echo timestamp > $@
+
+stamp-nm: $(ORIGINAL_NM_FOR_TARGET)
+ @echo creating nm; rm -f nm; \
+ case "$<" in \
+ ./*) ;; \
+ ../*) \
+ echo $(LN) $< nm$(exeext); \
+ $(LN) $< nm$(exeext) || cp $< nm$(exeext) ;; \
+ *) echo '#!$(SHELL)' > nm; echo 'exec $< "$$@"' >> nm ; \
+ chmod +x nm ;; \
+ esac
+ echo timestamp > $@
+