From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17782 invoked by alias); 22 Sep 2004 16:15:55 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 17715 invoked from network); 22 Sep 2004 16:15:46 -0000 Received: from unknown (HELO mr3.cc.ic.ac.uk) (155.198.5.113) by sourceware.org with SMTP; 22 Sep 2004 16:15:46 -0000 Received: from icexp4.cc.ic.ac.uk ([155.198.3.44] helo=icex.imperial.ac.uk) by mr3.cc.ic.ac.uk with esmtp (Exim 4.34) id 1CA9mU-0003uJ-99 for gcc@gcc.gnu.org; Wed, 22 Sep 2004 17:15:46 +0100 Received: from csc.mrc.ac.uk ([193.60.222.150]) by icex.imperial.ac.uk with Microsoft SMTPSVC(6.0.3790.0); Wed, 22 Sep 2004 17:15:46 +0100 Message-ID: <4151A47D.4050704@csc.mrc.ac.uk> Date: Wed, 22 Sep 2004 16:42:00 -0000 From: Timothy Borgeaud User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.5) Gecko/20040617 MIME-Version: 1.0 To: gcc@gcc.gnu.org Subject: Odd problem with building 3.4.2 on Solaris (use of as and ld) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 22 Sep 2004 16:15:46.0054 (UTC) FILETIME=[6A94A260:01C4A0BF] X-SW-Source: 2004-09/txt/msg01286.txt.bz2 I've run across a bit of a strange problem while trying to build gcc 3.4.2 on a solaris 5.8 system (sparc-sun-solaris2.8). It is probably something I'm doing wrong but perhaps it is a feature/problem of gcc. Note that I have found a work around for this. I'm building from the source tarball. I have gcc already installed in /usr/local This was installed from a sun freeware package: % ggc -c Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/specs Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls Thread model: posix gcc version 3.3.2 I also have binutils 2.11.2 and gnu make 3.80 installed in /usr/local I have Sun supplied bin utils in /usr/ccs/bin What I'm trying to do is build version 3.4.2 with the prefix /opt/hi and which will use the gnu binutils which will also be in /opt/hi (actually they are in place already but /opt/hi is currently a link to a temporary space). If I build 3.4.2 with just --prefix=/opt/hi everything works ok and I end up with a working version of 3.4.2 that uses /usr/ccs/bin. However if I use the configure options: --with-gnu-as --with-as=/opt/hi/bin/as and --with-gnu-ld --with-ld=/opt/hi/bin/ld I have a problem. After the configure I use: make -j 4 bootstrap and a little way into the build I get: ./xgcc -B./ -B/opt/hi/sparc-sun-solaris2.8/bin/ -isystem /opt/hi/sparc-sun-solaris2.8/i nclude -isystem /opt/hi/sparc-sun-solaris2.8/sys-include -L/appvol/build/gcc-3.4.2/tmpo bj/gcc/../ld -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr ototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../gcc-3.4.2-src/gcc -I../../gcc-3.4.2-src/gcc/. -I../../gcc-3.4.2-src/gcc/../include -I../intl -m64 -DL_negdi2 -c ../../gcc-3.4.2-src/gcc/libgcc2.c -o libgcc/sparcv9/_negdi2.o /usr/ccs/bin/as: error: unknown option '6' /usr/ccs/bin/as: error: unknown option '4' /usr/ccs/bin/as: error: unknown option 'A' /usr/ccs/bin/as: error: unknown option 'v' /usr/ccs/bin/as: error: unknown option '9' usage: /usr/ccs/bin/as [-V] [-Q{y,n}] [-f[O][if]#] [-q] [-s] So, for some reason the build is assuming that I'm using gnu as (I think that is what is going on). But at various stages in the build I see messages: checking for GNU ld... /usr/ccs/bin/ld checking if the linker (/usr/ccs/bin/ld) is GNU ld... no Which is what I expect. The --with-gnu-as --with-as=/opt/hi/bin/as options seem to trigger the build into assuming Gnu as is being used to perform the build as well as configuring the new compiler to use this tool. Maybe it's just something else that is broken on my build/system. My work-around for this problem is to temporarily replace the tools in /usr/ccs/bin with links to /usr/local/bin tools eg. /usr/ccs/bin/as -> /usr/local/bin/as Then I get messages such as : checking for GNU ld... /usr/ccs/bin/ld checking if the linker (/usr/ccs/bin/ld) is GNU ld... yes and no problems with ld or as. Tim