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]

[4.1 regression, patch] build i686-pc-mingw32


Hi all,

Paolo Bonzini's recent patch to use as, collect-ld and nm scripts in the build tree breaks building with $build=i686-pc-mingw32. (This is PR 22259).

Attached patch makes a exception to this for mingw32, where it just copies the real as, ld and nm executables in the tree. This fixes build on i686-pc-mingw32. OK to commit?

FX
Index: gcc/Makefile.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1513
diff -p -u -r1.1513 Makefile.in
--- gcc/Makefile.in	28 Jun 2005 19:51:23 -0000	1.1513
+++ gcc/Makefile.in	2 Jul 2005 09:24:24 -0000
@@ -1207,38 +1207,53 @@ cpp$(exeext): gcc.o cppspec.o version.o 
 # (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 ;; \
+	case "$(build)" in \
+	  *mingw32*) \
+	    cp $< as$(exeext) ;; \
+	  *) \
+	    case "$<" in \
+	      ./*) ;; \
+	      ../*) \
+	        echo $(LN) $< as$(exeext); \
+	        $(LN) $< as$(exeext) || cp $< as$(exeext) ;; \
+	      *) echo '#!$(SHELL)' > as; echo 'exec $< "$$@"' >> as ; \
+	        chmod +x as ;; \
+	    esac \
 	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 ;; \
+	case "$(build)" in \
+	  *mingw32*) \
+	    cp $< collect-ld$(exeext) ;; \
+	  *) \
+	    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 \
 	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 ;; \
+	case "$(build)" in \
+          *mingw32*) \
+            cp $< nm$(exeext) ;; \
+          *) \
+	    case "$<" in \
+	      ./*) ;; \
+	      ../*) \
+	        echo $(LN) $< nm$(exeext); \
+	        $(LN) $< nm$(exeext) || cp $< nm$(exeext) ;; \
+	      *) echo '#!$(SHELL)' > nm; echo 'exec $< "$$@"' >> nm ; \
+	        chmod +x nm ;; \
+	    esac \
 	esac
 	echo timestamp > $@
 

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