Can someone with approval privilege over the build system look at this, and OK it? (it's a very simple patch)

I must apologize for the delay in handling this. This alternative patch avoids that mingw is hardcoded in the makefiles. FWIW, it is also even smaller,

 3 files changed, 19 insertions(+), 12 deletions(-)

vs.

 1 files changed, 25 insertions(+), 10 deletions(-)

:ADDPATCH build:

I have only tested it on Linux, can you give it a try? Ok if FX's testing succeeds?

Paolo
2005-08-09  Paolo Bonzini  <[EMAIL PROTECTED]>

        * config.build (build_have_sh_scripts): Default to yes,
        set to no for mingw32.
        * configure.ac (build_have_sh_scripts): AC_SUBST it.
        * Makefile.in (stamp-as, stamp-collect-ld, stamp-nm): If
        build_have_sh_scripts is false, rely on $(LN).
        * configure: Regenerate.

Index: config.build
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.build,v
retrieving revision 1.4
diff -p -u -r1.4 config.build
--- config.build        25 Jun 2005 01:59:35 -0000      1.4
+++ config.build        9 Aug 2005 07:25:42 -0000
@@ -42,12 +42,17 @@
 #
 #  build_exeext                Set to the suffix, if the build machine requires
 #                      executables to have a file name suffix.
+#
+#  build_have_sh_scripts
+#                       Set to yes or no, depending on whether the built
+#                       compiler can run Bourne shell scripts.
 
 # Default settings.
 build_xm_file=
 build_xm_defines=
 build_exeext=
 build_install_headers_dir=install-headers-tar
+build_have_sh_scripts=yes
 
 # System-specific settings.
 case $build in
@@ -80,6 +85,7 @@ case $build in
   i[34567]86-*-mingw32*)
     build_xm_file=i386/xm-mingw32.h
     build_exeext=.exe
+    build_have_sh_scripts=no
     ;;
   i[34567]86-pc-msdosdjgpp*)
     build_xm_file=i386/xm-djgpp.h
Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.125
diff -p -u -r2.125 configure.ac
--- configure.ac        29 Jul 2005 19:20:44 -0000      2.125
+++ configure.ac        9 Aug 2005 07:25:43 -0000
@@ -3335,6 +3335,7 @@ AC_SUBST(all_lang_makefiles)
 AC_SUBST(all_languages)
 AC_SUBST(all_stagestuff)
 AC_SUBST(build_exeext)
+AC_SUBST(build_have_sh_scripts)
 AC_SUBST(build_install_headers_dir)
 AC_SUBST(build_xm_file_list)
 AC_SUBST(build_xm_include_list)
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1535
diff -p -u -r1.1535 Makefile.in
--- Makefile.in 6 Aug 2005 13:25:52 -0000       1.1535
+++ Makefile.in 9 Aug 2005 07:25:43 -0000
@@ -1221,13 +1221,13 @@ cpp$(exeext): gcc.o cppspec.o version.o 
 # (if it is a hard link).
 stamp-as: $(ORIGINAL_AS_FOR_TARGET)
        @echo creating as; \
-       case "$(ORIGINAL_AS_FOR_TARGET)" in \
-         ./as) ;; \
-         ../*) \
+       case "$(ORIGINAL_AS_FOR_TARGET):@build_have_sh_scripts@" in \
+         ./as:*) ;; \
+         ../*:* | *:no) \
             rm -f as$(exeext); \
             echo $(LN) $< as$(exeext); \
             $(LN) $< as$(exeext) || cp $< as$(exeext) ;; \
-         *) \
+         *:yes) \
             rm -f as; \
             echo '#!$(SHELL)' > as; \
             echo 'exec $(ORIGINAL_AS_FOR_TARGET) "$$@"' >> as ; \
@@ -1237,13 +1237,13 @@ stamp-as: $(ORIGINAL_AS_FOR_TARGET)
 
 stamp-collect-ld: $(ORIGINAL_LD_FOR_TARGET)
        @echo creating collect-ld; \
-       case "$(ORIGINAL_LD_FOR_TARGET)" in \
-         ./collect-ld) ;; \
-         ../*) \
+       case "$(ORIGINAL_LD_FOR_TARGET):@build_have_sh_scripts@" in \
+         ./collect-ld:*) ;; \
+         ../*:* | *:no) \
             rm -f collect-ld$(exeext); \
             echo $(LN) $< collect-ld$(exeext); \
             $(LN) $< collect-ld$(exeext) || cp $< collect-ld$(exeext) ;; \
-         *) \
+         *:yes) \
             rm -f collect-ld$(exeext); \
             echo '#!$(SHELL)' > collect-ld; \
             echo 'exec $(ORIGINAL_LD_FOR_TARGET) "$$@"' >> collect-ld ; \
@@ -1253,13 +1253,13 @@ stamp-collect-ld: $(ORIGINAL_LD_FOR_TARG
 
 stamp-nm: $(ORIGINAL_NM_FOR_TARGET)
        @echo creating nm; \
-       case "$(ORIGINAL_NM_FOR_TARGET)" in \
-         ./nm) ;; \
-         ../*) \
+       case "$(ORIGINAL_NM_FOR_TARGET):@build_have_sh_scripts@" in \
+         ./nm:*) ;; \
+         ../*:* | *:no) \
             rm -f nm$(exeext); \
             echo $(LN) $< nm$(exeext); \
             $(LN) $< nm$(exeext) || cp $< nm$(exeext) ;; \
-         *) \
+         *:yes) \
             rm -f nm$(exeext); \
             echo '#!$(SHELL)' > nm; \
             echo 'exec $(ORIGINAL_NM_FOR_TARGET) "$$@"' >> nm ; \

Reply via email to