From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31789 invoked by alias); 23 Apr 2003 18:26:50 -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 31777 invoked from network); 23 Apr 2003 18:26:49 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by sources.redhat.com with SMTP; 23 Apr 2003 18:26:49 -0000 Received: from localhost.localdomain (dhcp-172-16-25-221.sfbay.redhat.com [172.16.25.221]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id h3NIQcV22966; Wed, 23 Apr 2003 14:26:38 -0400 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h3NIQ5Yj004418; Wed, 23 Apr 2003 11:26:05 -0700 Received: (from aoliva@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id h3NIQ20X004414; Wed, 23 Apr 2003 11:26:02 -0700 To: Gabriel Dos Reis Cc: Gerald Pfeifer , gcc@gcc.gnu.org, java@gcc.gnu.org, Joe Buck , Eric Botcazou , "H. J. Lu" Subject: Re: 3.2.3-pre tarball 2: libjava build still fails on sparc-sun-solaris2.8 References: <20030417091616.A11341@synopsys.com> <20030417102820.A12714@lucon.org> <20030417144017.A1398@synopsys.com> <200304181447.51672.ebotcazou@libertysurf.fr> From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Wed, 23 Apr 2003 19:03:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2003-04/txt/msg01169.txt.bz2 --=-=-= Content-length: 1462 On Apr 21, 2003, Gabriel Dos Reis wrote: > Gerald Pfeifer writes: > | Interestingly, my problem is libtool-related as well. I find this reasoning interesting... It is as libtool-related as make-related and shell-related, if you ask me. I mean, you're starting from a shell, right? And it is make that starts libtool, right? And libtool starts the linker, right? And the linker fails because it's buggy. So... It's pretty obvious that it's libtool's fault, right? :-D > | I first reported a variant of this problem in > | http://gcc.gnu.org/ml/gcc/2002-06/threads.html#00284 > | but didn't notice it on the 3.2 branch until now, because I had Java > | disabled on the slow Solaris boxes. :-( > Well, it seems that that issue had been debated in-depth; I would really > appreciate if Alexandre Oliva or Tom Tromey or any libtool-guru could > jump in and enlighten me. The one thing that is getting me confused is the long list of object files in the link command. libtool could use -z allextract instead of extracting the object files itself. Currently, for some reason, libtool would use it when using Sun CC, or gcc as a C or Java linker, but not when using gcc as a C++ linker (I haven't investigated why it thinks we're doing C++ instead of Java). Gerald, could you please test whether this patch fixes the problem? If so, will you please check it into the release branch? Thanks, --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=libtool-sun-ld-gcc-allextract.patch Content-length: 1456 Index: ChangeLog from Alexandre Oliva * ltcf-cxx.sh (whole_archive_flag_spec): Use -z allextract on Solaris 2.6 and above, with GCC and non-GNU ld. Index: ltcf-cxx.sh =================================================================== RCS file: /cvs/gcc/gcc/ltcf-cxx.sh,v retrieving revision 1.25 diff -u -p -r1.25 ltcf-cxx.sh --- ltcf-cxx.sh 20 Feb 2003 01:11:51 -0000 1.25 +++ ltcf-cxx.sh 23 Apr 2003 18:21:14 -0000 @@ -612,6 +612,16 @@ case $host_os in # GNU C++ compiler with Solaris linker if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then no_undefined_flag=' ${wl}-z ${wl}defs' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac if $CC --version | egrep -v '^2\.7' > /dev/null; then archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ --=-=-= Content-length: 290 -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer --=-=-=--