This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Odd problem with building 3.4.2 on Solaris (use of as and ld)
- From: Timothy Borgeaud <tim dot borgeaud at csc dot mrc dot ac dot uk>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 22 Sep 2004 17:12:45 +0100
- Subject: Odd problem with building 3.4.2 on Solaris (use of as and ld)
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