This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix i386-mingw32 build failure
- From: FX Coudert <fxcoudert at gmail dot com>
- To: patch <gcc-patches at gcc dot gnu dot org>, gcc at gcc dot gnu dot org
- Date: Sat, 06 Aug 2005 13:37:44 +0200
- Subject: [patch] Fix i386-mingw32 build failure
PING ** 2
Attached patch fixes PR bootstrap/22259 (right now, a simple ./configure
&& make build fails on i386-mingw32). It creates a special case for
in-tree as, collect-ld and nm scripts: since mingw32 cannot spawn shell
scripts, it copies $(ORIGINAL_AS_FOR_TARGET), $(ORIGINAL_LD_FOR_TARGET)
and $(ORIGINAL_NM_FOR_TARGET) in the tree.
There has been discussion on whether this is the best way to do things
(see thread from
http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01193.html), but nobody
suggested another patch that actually makes build possible on
i386-mingw32. And, from what I have understood, none of the mingw
maintainers have anything against the patch, but they can't approve it.
Can someone with approval privilege over the build system look at this,
and OK it? (it's a very simple patch)
Thanks,
FX
:ADDPATCH build:
2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR bootstrap/22259
* Makfile.in (stamp-as, stamp-collect-ld, stamp-nm): Add special
case for mingw32 since it cannot spawn shell scripts.
Index: gcc/Makefile.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1534
diff -p -u -r1.1534 Makefile.in
--- gcc/Makefile.in 3 Aug 2005 14:18:34 -0000 1.1534
+++ gcc/Makefile.in 6 Aug 2005 11:29:02 -0000
@@ -1228,10 +1228,15 @@ stamp-as: $(ORIGINAL_AS_FOR_TARGET)
echo $(LN) $< as$(exeext); \
$(LN) $< as$(exeext) || cp $< as$(exeext) ;; \
*) \
- rm -f as; \
- echo '#!$(SHELL)' > as; \
- echo 'exec $(ORIGINAL_AS_FOR_TARGET) "$$@"' >> as ; \
- chmod +x as ;; \
+ rm -f as$(exeext); \
+ case "$(build)" in \
+ *mingw32*) \
+ cp $(ORIGINAL_AS_FOR_TARGET) as$(exeext) ;; \
+ *) \
+ echo '#!$(SHELL)' > as; \
+ echo 'exec $(ORIGINAL_AS_FOR_TARGET) "$$@"' >> as ; \
+ chmod +x as ;; \
+ esac \
esac
echo timestamp > $@
@@ -1245,9 +1250,14 @@ stamp-collect-ld: $(ORIGINAL_LD_FOR_TARG
$(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 ;; \
+ case "$(build)" in \
+ *mingw32*) \
+ cp $(ORIGINAL_LD_FOR_TARGET) collect-ld$(exeext) ;; \
+ *) \
+ echo '#!$(SHELL)' > collect-ld; \
+ echo 'exec $(ORIGINAL_LD_FOR_TARGET) "$$@"' >> collect-ld ; \
+ chmod +x collect-ld ;; \
+ esac \
esac
echo timestamp > $@
@@ -1261,9 +1271,14 @@ stamp-nm: $(ORIGINAL_NM_FOR_TARGET)
$(LN) $< nm$(exeext) || cp $< nm$(exeext) ;; \
*) \
rm -f nm$(exeext); \
- echo '#!$(SHELL)' > nm; \
- echo 'exec $(ORIGINAL_NM_FOR_TARGET) "$$@"' >> nm ; \
- chmod +x nm ;; \
+ case "$(build)" in \
+ *mingw32*) \
+ cp $(ORIGINAL_NM_FOR_TARGET) nm$(exeext) ;; \
+ *) \
+ echo '#!$(SHELL)' > nm; \
+ echo 'exec $(ORIGINAL_NM_FOR_TARGET) "$$@"' >> nm ; \
+ chmod +x nm ;; \
+ esac \
esac
echo timestamp > $@