🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52850

Problems Compiling GCC 2.1 as Cross-Compiler

#52850
From: Rhonda Gaines
Date: Thu, 14 May 1992 19:49
152 lines
5262 bytes
Scenario:
GCC 2.1, GAS 1.38, host machine - sun 4/330 4.1OS, target machine -
sun3 m68k

******CONFIG.STATUS:**********
#!/bin/sh
# GCC was configured as follows:
./configure --target=m68k-sun --host=sparc-sun-sunos4.1
******CONFIG.STATUS***********

GCC seems to compile ok until I get to the compilation after "make
stage1".  Here's the error I receive:

*******ERROR******************
stage1/gcc -DCROSS_COMPILE   -g -O -I /usr/include -Bstage1/     -I. -I. -I./config \
  -DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m68k-sun/`awk '{printf "%s", substr ($4, 2, length ($4) - 3); }' ./version.c`/include\" \
  -DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/g++-include\" \
  -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
  -DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m68k-sun/`awk '{printf "%s", substr ($4, 2, length ($4) - 3); }' ./version.c`/sys-include\" \
  -c `echo ./cccp.c | sed 's,^\./,,'`
as: error: unknown option 'm'
as: error: unknown option 'c'
as: error: unknown option '6'
as: error: unknown option '8'
as: error: unknown option '0'
as: error: unknown option '2'
as: error: unknown option '0'
usage: as [-F[O][if]#] [-O[#]] [-S[C]] [-o objfile] [-L] [-R] [-Q]
		[-P [[-Ipath] [-Dname] [-Dname=def] [-Uname]]...] file.s...
*** Error code 1
make: Fatal error: Command failed for target `cccp.o'
******ERROR********************

As you can see, gcc still thinks it's using /bin/as instead of
/usr/local/bin/gas although I've explicitly spelled it out in the
Makefile (see below)

*********MAKEFILE************
[excerpt from Makefile]

AS=/usr/local/bin/gas
CC = cc
BISON = bison
BISONFLAGS =
AR = ar
OLDAR_FLAGS = qc
AR_FLAGS = rc
SHELL = /bin/sh
OLDCC = cc
CCLIBFLAGS = -O
OLDAR = ar
GCC_FOR_TARGET = ./gcc
GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -B./
TARGET_ARCH=sun3
target=m68k-sun
xmake_file=../Makefile.in
tmake_file=../Makefile.in
version=`awk '{printf "%s", substr ($$4, 2, length ($$4) - 3); }' $(srcdir)/version.c`
************MAKEFILE*************

Here are the values I get when I run "make -d -n -p"

***********MAKE -d -n -p**********
LOGNAME= root
TARGET_MACH= -sparc
exec_prefix= $(prefix)
TARGET_ARCH= sun3
ALLOCA_FLAGS= -S -Demacs
LINK.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
USER= root
TERM= sun
YACC= yacc
libsubdir= $(libdir)/gcc-lib/$(target)/$(version)
HOST= melrose
PATH= /usr/bin/X11:/etc:/usr/etc:/usr/local:/usr/local/bin:/melrose:/usr/ucb:/bin:/usr/bin:/mri/bin:/usr/lib/uucp:.
LINT= lint
HOSTTYPE= sun4
MAKE= make
USER_H= assert.h va-hp800.h va-i860.h va-mips.h va-pyr.h va-sparc.h  va-spur.h va-m88k.h proto.h
LIBGCC2= libgcc2.a
HOST_ALLOCA= $(ALLOCA)
FIXINCLUDES= fixincludes
COMPILE.mod= $(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH)
srcdir= .
LIMITS_H= limits.h
GCC_CFLAGS= $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -B./
COMPILE.def= $(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH)
prefix= /usr/local
YACC.y= $(YACC) $(YFLAGS)
ALLOCA_FINISH= /usr/local/bin/gas -o alloca.o alloca.s
CROSS_TOOLS= install-cross-tools
target= m68k-sun
VIRTUAL_ROOT= /usr/arch/sun4/un3:/
AR_FOR_TARGET= $(TARGET_TOOLPREFIX)ar
GCC_FOR_TARGET= ./gcc
PWD= /melrose/gcc-2.1
LANGUAGES= c c++ objective-c proto
CCLIBFLAGS= -O
LEX= lex
CPS= cps
DIR= ../gcc
libdir= $(exec_prefix)/lib
ALL= all.cross
HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
M2C= m2c
CCC= CC
INCLUDES= -I. -I$(srcdir) -I$(srcdir)/config
HOST_LDFLAGS= $(LDFLAGS)
MAKEFLAGS= dnp
COMPILE.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
SHELL= /bin/sh
HOST_PREFIX_1= loser-
bindir= $(exec_prefix)/bin
LEX.l= $(LEX) $(LFLAGS) -t
CFLAGS= -g
CROSS= -DCROSS_COMPILE
HOST_MACH= -sparc
PC= pc
xmake_file= ../Makefile.in
tmake_file= ../Makefile.in
LD= ld
AS= /usr/local/bin/gas
AR= $(AR_FOR_TARGET)
FC= f77
HOST_ARCH= -sun4
HOST_CLIB= $(CLIB)
TARGET_TOOLPREFIX= $(tooldir)/bin/
CC= cc
COMPILERS= cc1 cc1plus cc1obj
SUBDIR_INCLUDES= -I.. -I../$(srcdir) -I../$(srcdir)/config
ENQUIRE_LDFLAGS= $(LDFLAGS)
BISON= bison
COMPILE.s= $(AS) $(ASFLAGS) $(TARGET_MACH)
*********MAKE -d -n -p********************
Is the following correct??

xmake_file= ../Makefile.in
tmake_file= ../Makefile.in

I'm at a loss as to how to convince gcc that it's supposed to be
using /usr/local/bin/gas instead of /bin/as.  Also I get the same
error whether I use make or gnumake.  Anyone have any ideas??

 -thanks
  rhonda

-- 
Rhonda Gaines              INTERNET: rrg@fibercom.com
FiberCom, Inc.             UUCP: ...!uunet!fibercom!rrg   
P.O. Box 11966             PHONE: 703-342-6700 or 800-423-1183 x291
Roanoke, VA  24022-1966    FAX:   703-342-5961
Technical Details
Message-ID: <31052@fibercom.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!fibercom!rrg

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,b624ca31780fc355,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-05-15 12:44:23 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!fibercom!rrg
From: rrg@rtp (Rhonda Gaines)
Newsgroups: gnu.gcc.help
Subject: Problems Compiling GCC 2.1 as Cross-Compiler
Message-ID: <31052@fibercom.COM>
Date: 14 May 92 19:49:41 GMT
Sender: news@fibercom.COM
Organization: FiberCom, Inc., Roanoke, Virginia
Lines: 152
Nntp-Posting-Host: rtp