This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Makefile.in: Fix stamp-collect-ld and stamp-nm.


Hi,

Attached is a patch to fix stamp-collect-ld and stamp-nm.

This patch does the same thing as

http://gcc.gnu.org/ml/gcc-patches/2005-06/msg02257.html

to stamp-collect-ld and stamp-nm.

Tested on x86_64-pc-linux-gnu.  Committed as preapproved.

Kazu Hirata

2005-07-06  Kazu Hirata  <kazu@codesourcery.com>

	* Makefile.in (stamp-collect-ld): Use
	$(ORIGINAL_LD_FOR_TARGET) instead of $<.  Don't remove
	./collect-ld if it already exists.
	(stamp-nm): Use $(ORIGINAL_NM_FOR_TARGET) instead of $<.
	Don't remove ./nm if it already exists.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1515
diff -c -d -p -r1.1515 Makefile.in
*** Makefile.in	5 Jul 2005 06:56:55 -0000	1.1515
--- Makefile.in	5 Jul 2005 07:03:33 -0000
*************** stamp-as: $(ORIGINAL_AS_FOR_TARGET)
*** 1222,1246 ****
  	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 > $@
--- 1222,1254 ----
  	echo timestamp > $@
  
  stamp-collect-ld: $(ORIGINAL_LD_FOR_TARGET)
! 	@echo creating collect-ld; \
! 	case "$(ORIGINAL_LD_FOR_TARGET)" in \
! 	  ./collect-ld) ;; \
  	  ../*) \
+ 	     rm -f collect-ld$(exeext); \
  	     echo $(LN) $< collect-ld$(exeext); \
  	     $(LN) $< collect-ld$(exeext) || cp $< collect-ld$(exeext) ;; \
! 	  *) \
! 	     rm -f collect-ld$(exeext); \
! 	     echo '#!$(SHELL)' > collect-ld; \
! 	     echo 'exec $(ORIGINAL_LD_FOR_TARGET) "$$@"' >> collect-ld ; \
  	     chmod +x collect-ld ;; \
  	esac
  	echo timestamp > $@
  
  stamp-nm: $(ORIGINAL_NM_FOR_TARGET)
! 	@echo creating nm; \
! 	case "$(ORIGINAL_NM_FOR_TARGET)" in \
! 	  ./nm) ;; \
  	  ../*) \
+ 	     rm -f nm$(exeext); \
  	     echo $(LN) $< nm$(exeext); \
  	     $(LN) $< nm$(exeext) || cp $< nm$(exeext) ;; \
! 	  *) \
! 	     rm -f nm$(exeext); \
! 	     echo '#!$(SHELL)' > nm; \
! 	     echo 'exec $(ORIGINAL_NM_FOR_TARGET) "$$@"' >> nm ; \
  	     chmod +x nm ;; \
  	esac
  	echo timestamp > $@


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]