small patch to use AS_FOR_TARGET

Mike Stump mrs@wrs.com
Thu Feb 19 22:28:00 GMT 1998


There is support for AS_FOR_TARGET to be used as the target assembler
if gas isn't in the source tree with the compiler, and as on the path
isn't the target assembler, but that didn't extend to gcc.  The below
patch enables _target_-as to be used as the target assembler in gcc.

This mirrors logic already in collect2.c that will use _target_-ld for
target links.

1998-02-19  Mike Stump  <mrs@wrs.com>

	* Makefile.in (xgcc): Use AS_FOR_TARGET as the target assembler
	if we don't have gas.

Doing diffs in Makefile.in.~1~:
*** Makefile.in.~1~	Thu Feb 19 13:42:56 1998
--- Makefile.in	Thu Feb 19 17:27:44 1998
*************** xgcc: gcc.o version.o choose-temp.o pexe
*** 794,799 ****
--- 794,807 ----
     $(LIBDEPS) $(EXTRA_GCC_OBJS)
  	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o prefix.o version.o \
  	  choose-temp.o pexecute.o $(EXTRA_GCC_OBJS) $(LIBS)
+ 	if [ ! -f as$(exeext) \
+ 	     -a x$(AS_FOR_TARGET) != xas$(exeext) \
+ 	     -a x$(AS_FOR_TARGET) != x ]; then \
+ 		echo "#!/bin/sh" >as$(exeext); \
+ 		echo "" >>as$(exeext); \
+ 		echo "$(AS_FOR_TARGET) \$${1+\"\$$@\"}" >>as$(exeext); \
+ 		chmod a+x as$(exeext) 2>/dev/null; \
+ 	fi
  
  # Dump a specs file to make -B./ read these specs over installed ones.
  specs: xgcc
--------------



More information about the Gcc mailing list