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]

[Toplevel] Pass $CONFIG_SHELL down to gcc


In trying to workaround what is likely an obscure sh bug in cygwin, I noticed that specifying a configure line like:

CONFIG_SHELL="/bin/bash" srcdir/configure;make bootstrap

does not affect the shell used in the gcc directory at all, since the gcc/Makefile that is eventually created will incorrectly have "SHELL=/bin/sh"

This is a regression from GCC 3.3.

This appears to be since autoconf 2.13 is at some point automatically defining a default value of SHELL based upon CONFIG_SHELL. However, since GCC 3.4 no longer configures subdirectories at the same time as it configures the toplevel that particular variable is not going to be set when gcc's configure is run.

Not being a Makefile guru, there quite likely is a more correct way to fix this, but this one-liner patch does correct the problem.

OK?

Kelley Cook

2003-11-17  Kelley Cook  <kcook@gcc.gnu.org>

	* Makefile.tpl (configure-gcc): Pass along $(CONFIG_SHELL).
	* Makefile.in: Regenerate.

diff -up gcc-orig/Makefile.tpl gcc-snapshot/Makefile.tpl
--- gcc-orig/Makefile.tpl	2003-10-13 17:43:32.000000000 -0400
+++ gcc-snapshot/Makefile.tpl	2003-11-17 12:03:35.919352000 -0500
@@ -1086,6 +1086,7 @@ configure-gcc:
 	WINDRES="$(WINDRES)"; export WINDRES; \
 	OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
 	OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
 	echo Configuring in gcc; \
 	cd gcc || exit 1; \
 	case $(srcdir) in \

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