public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* gas=yes issues in configure
@ 1998-04-05 17:27 Richard Henderson
  1998-04-08  2:13 ` Jim Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Henderson @ 1998-04-05 17:27 UTC (permalink / raw)
  To: egcs

The use of gas=yes in the big target switch is broken for cross
builds.  Forcing gas=yes is clearly only desired when configuring
the target, yet we wind up doing it as well for the build and host
machines as well.

What is the preferred solution?  Testing

	if [ "$machine" = "$target"]; then
		gas=yes gnu_ld=yes
	fi

seems tedious.  Perhaps a target_gas=yes in the switch, that is
cleared out with the rest of the variables at the top, and afterward,
use gas=${gas-$target_gas}?


r~

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

* Re: gas=yes issues in configure
  1998-04-05 17:27 gas=yes issues in configure Richard Henderson
@ 1998-04-08  2:13 ` Jim Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Wilson @ 1998-04-08  2:13 UTC (permalink / raw)
  To: Richard Henderson; +Cc: egcs, law

	The use of gas=yes in the big target switch is broken for cross
	builds.  Forcing gas=yes is clearly only desired when configuring
	the target, yet we wind up doing it as well for the build and host
	machines as well.

The reason for setting gas in the first place is so that the big switch
can test it.  Setting gas during the big switch, or after the big switch,
doesn't make all that much sense at first.

I see however that we actually have 5 different switches in configure now, and
gas is being set in the second one so that the fifth one can test the value.

We don't really need gas after that though, but since the target pass is the
last pass, it will have the right value after the loop anyways.

Renaming gas to target_gas inside the loop would be OK, but is a lot of
changes.  It would be simpler to rename the single use outside the loop,
the AC_ARG_WITH reference at the top.  Or alternatively, moving the AC_ARG_WITH
call inside the loop would work too, so that gas is reinitialized for every
loop iteration, but that is less elegant.

Here is my only partly tested patch suggestion.

Tue Apr  7 18:10:52 1998  Jim Wilson  <wilson@cygnus.com>

	* configure.in (gnu_ld): Rename to gnu_ld_flag before main loop.
	Set gnu_ld to gnu_ld_flag inside main loop.
	(gas): Likewise.

Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.81
diff -p -r1.81 configure.in
*** configure.in	1998/04/06 22:17:05	1.81
--- configure.in	1998/04/08 01:25:38
*************** copy=cp
*** 34,47 ****
  # With GNU ld
  AC_ARG_WITH(gnu-ld,
  [  --with-gnu-ld           arrange to work with GNU ld.],
! gnu_ld="$with_gnu_ld",
! gnu_ld=no)
  
  # With GNU as
  AC_ARG_WITH(gnu-as,
  [  --with-gnu-as           arrange to work with GNU as.],
! gas="$with_gnu_as",
! gas=no)
  
  # With stabs
  AC_ARG_WITH(stabs,
--- 34,47 ----
  # With GNU ld
  AC_ARG_WITH(gnu-ld,
  [  --with-gnu-ld           arrange to work with GNU ld.],
! gnu_ld_flag="$with_gnu_ld",
! gnu_ld_flag=no)
  
  # With GNU as
  AC_ARG_WITH(gnu-as,
  [  --with-gnu-as           arrange to work with GNU as.],
! gas_flag="$with_gnu_as",
! gas_flag=no)
  
  # With stabs
  AC_ARG_WITH(stabs,
*************** for machine in $build $host $target; do
*** 237,242 ****
--- 237,246 ----
  	exeext=
  	# Set this to control which thread package will be used.
  	thread_file=
+ 	# Reinitialize these from the flag values every loop pass, since some
+ 	# configure entries modify them.
+ 	gas="$gas_flag"
+ 	gnu_ld="$gnu_ld_flag"
  
  	# Set default cpu_type, tm_file and xm_file so it can be updated in
  	# each machine entry.

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

end of thread, other threads:[~1998-04-08  2:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-05 17:27 gas=yes issues in configure Richard Henderson
1998-04-08  2:13 ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).