🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #6347

during "make" cc1 passes -O2 to "as" even though I specified -O

#6347
From: Joel F. Rising
Date: Fri, 01 Dec 1995 00:00
53 lines
2478 bytes
Folks,

I am compiling a gcc-2.7.0 cross-compiler, host sun-sparc-solaris2.4,
target decstation-ultrix.  I don't actually need DEC header files or
even libgcc*, as we're using this only with "nachos".  I just need
that compiler.

I'm compiling with gcc-2.7.0 and binutils-2.6.  binutils was
compiled to provied the needed DEC cross linking and assembly.

Here's the offending bit in the compile:

 ---
for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2  _lshrdi3
_ashldi3 _ashrdi3 _ffsdi2  _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2
_floatdidf _floatdisf  _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi
_fixunssfdi _fixsfdi  _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi 
_fixtfdi _fixunstfdi _floatditf  __gcc_bcmp _varargs _eprintf _op_new
_op_vnew _new_handler _op_delete  _op_vdel _bb _shtab _clear_cache
_trampoline __main _exit _ctors _eh  _pure; \
do \
  echo ${name}; \
  ./xgcc -B./ -O  -DCROSS_COMPILE -DIN_GCC -DSVR4  -g -I./include -g1
-I. -I. -I./config -c -DL${name} \
      ./libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  /fs/net/src/gcc/gcc-2.7.0d/solaris/decstation-ultrix/bin/ar rc
tmplibgcc2.a ${name}.o; \
  rm -f ${name}.o; \
done
_muldi3
as: unrecognized option `-O2'
*** Error code 1
make: Fatal error: Command failed for target `libgcc2.a'
Current working directory /fs/net/src/gcc/gcc-2.7.0d/src
*** Error code 1
make: Fatal error: Command failed for target `stmp-multilib-sub'
Current working directory /fs/net/src/gcc/gcc-2.7.0d/src
*** Error code 1
make: Fatal error: Command failed for target `stmp-multilib'
 ---

I don't have -O2 specified in the Makefile, I have -O.  I trussed
this; xgcc calls cpp calls cc1 calls as.  Somehow cc1 is the 
offender, changng the -O to -O2 when it calls as.

I read in ChangeLog.2 that gcc.c was modified so that cc1 would
pass on any -O* to as.  Could the problem be in there somewhere?

Or hey can I skip the libraries and just compile and install
gcc?

Thanks for your help!
Technical Details
Message-ID: <199512012126.NAA04075@cs.ucsb.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,d672b41b7b66aa8e,start
X-Google-Attributes: gid113d02,public
From: rising@cs.ucsb.edu (Joel F. Rising)
Subject: during "make" cc1 passes -O2 to "as" even though I specified -O
Date: 1995/12/01
Message-ID: <199512012126.NAA04075@cs.ucsb.edu>
X-Deja-AN: 120615977
distribution: gnu
sender: daemon@cis.ohio-state.edu
organization: GNUs Not Usenet
newsgroups: gnu.gcc.bug