From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13576 invoked by alias); 24 May 2011 16:35:30 -0000 Received: (qmail 13497 invoked by uid 22791); 24 May 2011 16:35:28 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-pz0-f47.google.com (HELO mail-pz0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 May 2011 16:35:14 +0000 Received: by pzk36 with SMTP id 36so3256497pzk.20 for ; Tue, 24 May 2011 09:35:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.249.39 with SMTP id w39mr1124546wfh.96.1306254913794; Tue, 24 May 2011 09:35:13 -0700 (PDT) Received: by 10.142.108.7 with HTTP; Tue, 24 May 2011 09:35:13 -0700 (PDT) In-Reply-To: References: Date: Tue, 24 May 2011 17:40:00 -0000 Message-ID: Subject: Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld From: Uros Bizjak To: Rainer Orth Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg01741.txt.bz2 On Tue, May 24, 2011 at 5:34 PM, Rainer Orth wrote: > Uros Bizjak writes: > >>> I think I tried something along these lines, but failed with duplicate >>> @plt@plt for PIC code. >> >> Hm, there is no %P1 present, so I don't think this should be an issue. > > Unfortunately, I do get assembler errors (Sun as at the moment) with > your updated patch: > > libtool: compile: =A0/var/gcc/gcc-4.7.0-20110523/10-gcc/./gcc/xgcc -share= d-libgcc -B/var/gcc/gcc-4.7.0-20110523/10-gcc/./gcc -nostdinc++ -L/var/gcc/= gcc-4.7.0-20110523/10-gcc/i386-pc-solaris2.10/amd64/libstdc++-v3/src -L/var= /gcc/gcc-4.7.0-20110523/10-gcc/i386-pc-solaris2.10/amd64/libstdc++-v3/src/.= libs -B/usr/local/i386-pc-solaris2.10/bin/ -B/usr/local/i386-pc-solaris2.10= /lib/ -isystem /usr/local/i386-pc-solaris2.10/include -isystem /usr/local/i= 386-pc-solaris2.10/sys-include -m64 -I/vol/gcc/src/hg/trunk/solaris/libstdc= ++-v3/../gcc -I/var/gcc/gcc-4.7.0-20110523/10-gcc/i386-pc-solaris2.10/amd64= /libstdc++-v3/include/i386-pc-solaris2.10 -I/var/gcc/gcc-4.7.0-20110523/10-= gcc/i386-pc-solaris2.10/amd64/libstdc++-v3/include -I/vol/gcc/src/hg/trunk/= solaris/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrit= e-strings -Wcast-qual -fdiagnostics-show-location=3Donce -ffunction-section= s -fdata-sections -g -O2 -m64 -c /vol/gcc/src/hg/trunk/solaris/libstdc++-v3= /libsupc++/fundamental_type_info.cc =A0-fPIC -DPIC -o funinfo.o > damental_type_info.o > Assembler: eh_globals.cc > =A0 =A0 =A0 =A0"/var/tmp//ccJ1MA8h.s", line 17 : Syntax error > =A0 =A0 =A0 =A0Near line: " =A0 =A0call =A0 =A0__tls_get_addr(%rip)@plt" > =A0 =A0 =A0 =A0"/var/tmp//ccJ1MA8h.s", line 38 : Syntax error > =A0 =A0 =A0 =A0Near line: " =A0 =A0call =A0 =A0__tls_get_addr(%rip)@plt" > make[9]: *** [eh_globals.lo] Error 1 Bah. %P has a special handling that removes (%rip). Are you sure Sun assembler requests @plt in PIC and non-PIC cases? Can we solve this with TARGET_SUN_TLS somehow? Thanks, Uros.