Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [toplevel patch] Remove bogus conditional
@ 2003-06-10  1:01 Nathanael Nerode
  2003-06-10  1:07 ` DJ Delorie
  0 siblings, 1 reply; 4+ messages in thread
From: Nathanael Nerode @ 2003-06-10  1:01 UTC (permalink / raw)
  To: gcc-patches, binutils, gdb-patches

Due to a long-standing typo, which I introduced back when I first moved
host subconfigures into the Makefile, the condition
	if [ z$(build_canonical) !=  z$(host_canoncial) ] ; then \
always evaluates true.

Nobody noticed. :-)

So I propose to remove the conditional entirely, and pass the correspoding
things down always.  I believe that this is more correct in any case (now
that the top level is handled by autoconf).

Tested on i686-pc-linux-gnu.

	* Makefile.tpl: Remove bogus conditional.
	* Makefile.in: Regenerate.

Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.54
diff -u -r1.54 Makefile.tpl
--- Makefile.tpl	5 Jun 2003 16:35:54 -0000	1.54
+++ Makefile.tpl	10 Jun 2003 00:52:12 -0000
@@ -934,18 +934,16 @@
 	CFLAGS="$(CFLAGS)"; export CFLAGS; \
 	CXX="$(CXX)"; export CXX; \
 	CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
-	if [ z$(build_canonical) !=  z$(host_canoncial) ] ; then \
-	  AR="$(AR)"; export AR; \
-	  AS="$(AS)"; export AS; \
-	  CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-	  DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
-	  LD="$(LD)"; export LD; \
-	  NM="$(NM)"; export NM; \
-	  RANLIB="$(RANLIB)"; export RANLIB; \
-	  WINDRES="$(WINDRES)"; export WINDRES; \
-	  OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
-	  OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
-	fi; \
+	AR="$(AR)"; export AR; \
+	AS="$(AS)"; export AS; \
+	CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+	DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+	LD="$(LD)"; export LD; \
+	NM="$(NM)"; export NM; \
+	RANLIB="$(RANLIB)"; export RANLIB; \
+	WINDRES="$(WINDRES)"; export WINDRES; \
+	OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+	OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
 	echo Configuring in [+module+]; \
 	cd [+module+] || exit 1; \
 	case $(srcdir) in \
@@ -1165,18 +1163,16 @@
 	CXX="$(CXX)"; export CXX; \
 	CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
 	TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
-	if [ z$(build_canonical) !=  z$(host_canoncial) ] ; then \
-	  AR="$(AR)"; export AR; \
-	  AS="$(AS)"; export AS; \
-	  CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-	  DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
-	  LD="$(LD)"; export LD; \
-	  NM="$(NM)"; export NM; \
-	  RANLIB="$(RANLIB)"; export RANLIB; \
-	  WINDRES="$(WINDRES)"; export WINDRES; \
-	  OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
-	  OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
-	fi; \
+	AR="$(AR)"; export AR; \
+	AS="$(AS)"; export AS; \
+	CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+	DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+	LD="$(LD)"; export LD; \
+	NM="$(NM)"; export NM; \
+	RANLIB="$(RANLIB)"; export RANLIB; \
+	WINDRES="$(WINDRES)"; export WINDRES; \
+	OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+	OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
 	echo Configuring in gcc; \
 	cd gcc || exit 1; \
 	case $(srcdir) in \


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [toplevel patch] Remove bogus conditional
  2003-06-10  1:01 [toplevel patch] Remove bogus conditional Nathanael Nerode
@ 2003-06-10  1:07 ` DJ Delorie
  0 siblings, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2003-06-10  1:07 UTC (permalink / raw)
  To: neroden; +Cc: gcc-patches, binutils, gdb-patches


> Nobody noticed. :-)

Unfortunately, that doesn't mean a lot.

> Tested on i686-pc-linux-gnu.

Could you test the case this is designed for, i.e., cross-building a
native?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [toplevel patch] Remove bogus conditional
  2003-06-10  1:54 Nathanael Nerode
@ 2003-06-10  2:04 ` DJ Delorie
  0 siblings, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2003-06-10  2:04 UTC (permalink / raw)
  To: neroden; +Cc: gcc-patches, binutils, gdb-patches


> Here's the curious thing.  The case this is designed for was unchanged 
> by the typo.  (The case where host_canonical != build_canonical.  With 
> the typo, host_canon*ci*al != build_canonical, so it still executes.) 

Doh!  I saw the $(foo) in a shell-looking thing and thought the typo
was that it should have been ${foo}.

Given what you say, the patch is ok.

> At the moment, I can't test a cross-built native properly 'cause I can't 
> find any which ever worked quite right for me.  :-(  But that's the 
> case where I never changed anything here!

The usual host I use for such cases is cygwin, which is the only host
I know of which is self-contained in uberbaum.  It's possible to
cross-host DJGPP as well, but it's not self-contained and quite a bit
trickier.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [toplevel patch] Remove bogus conditional
@ 2003-06-10  1:54 Nathanael Nerode
  2003-06-10  2:04 ` DJ Delorie
  0 siblings, 1 reply; 4+ messages in thread
From: Nathanael Nerode @ 2003-06-10  1:54 UTC (permalink / raw)
  To: dj; +Cc: gcc-patches, binutils, gdb-patches

>> Nobody noticed. :-)
>
>Unfortunately, that doesn't mean a lot.
>
>> Tested on i686-pc-linux-gnu.
>
>Could you test the case this is designed for, i.e., cross-building a
>native?

Here's the curious thing.  The case this is designed for was unchanged 
by the typo.  (The case where host_canonical != build_canonical.  With 
the typo, host_canon*ci*al != build_canonical, so it still executes.) 

The case which was changed by the typo is the case where 
host_canonical=build_canonical (but due to the typo, host_canon*ci*al != 
build_canonical). 

In other words, the native and ordinary cross cases.  Which I'm guessing 
are sufficiently tested, and which is why I'm surprised that nobody 
noticed.

At the moment, I can't test a cross-built native properly 'cause I can't 
find any which ever worked quite right for me.  :-(  But that's the 
case where I never changed anything here!

--Nathanael


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-06-10  2:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-10  1:01 [toplevel patch] Remove bogus conditional Nathanael Nerode
2003-06-10  1:07 ` DJ Delorie
2003-06-10  1:54 Nathanael Nerode
2003-06-10  2:04 ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox