Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-27 Thread Rainer Orth
Uros Bizjak writes: >> * HAVE_AS_IX86_{TLSGDPLT, TLSLDMPLT} are always defined as 0/1, so we >>  need if, not #ifdef. > > There is no need to always define it. Please simplify your > configure.ac check, see i.e. check for sahf mnemonic in configure.ac. Ok, done. > Please change the check in con

Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-27 Thread Uros Bizjak
On Fri, May 27, 2011 at 2:25 PM, Rainer Orth wrote: >> Please find attached the patch that introduces %p to output only the >> raw symbol name. @plt is added "manually", since it doesn't really >> follow -fpic flag. > > Thanks, that almost did it: > > * HAVE_AS_IX86_{TLSGDPLT, TLSLDMPLT} are alwa

Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-27 Thread Rainer Orth
Uros Bizjak writes: > Please find attached the patch that introduces %p to output only the > raw symbol name. @plt is added "manually", since it doesn't really > follow -fpic flag. Thanks, that almost did it: * HAVE_AS_IX86_{TLSGDPLT, TLSLDMPLT} are always defined as 0/1, so we need if, not #

Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-26 Thread Uros Bizjak
On Thu, May 26, 2011 at 12:47 PM, Rainer Orth wrote: >>> We could certainly duplicate (some of) the logic that %P already uses, >>> but I though it easier to just introduce a straightforward variant (%p) >>> instead.  It's not pretty, but it worked. >> >> OK then... can you propose a new patch, p

Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-26 Thread Rainer Orth
Uros Bizjak writes: >> We could certainly duplicate (some of) the logic that %P already uses, >> but I though it easier to just introduce a straightforward variant (%p) >> instead.  It's not pretty, but it worked. > > OK then... can you propose a new patch, please, changing as little of > generic

Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-24 Thread Uros Bizjak
On Tue, May 24, 2011 at 6:42 PM, Rainer Orth wrote: > Uros Bizjak writes: > >>> Assembler: eh_globals.cc >>>        "/var/tmp//ccJ1MA8h.s", line 17 : Syntax error >>>        Near line: "    call    __tls_get_addr(%rip)@plt" >>>        "/var/tmp//ccJ1MA8h.s", line 38 : Syntax error >>>        Near

Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-24 Thread Rainer Orth
Uros Bizjak writes: >> Assembler: eh_globals.cc >>        "/var/tmp//ccJ1MA8h.s", line 17 : Syntax error >>        Near line: "    call    __tls_get_addr(%rip)@plt" >>        "/var/tmp//ccJ1MA8h.s", line 38 : Syntax error >>        Near line: "    call    __tls_get_addr(%rip)@plt" >> make[9]: ***

Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-24 Thread Uros Bizjak
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 erro

Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-24 Thread Joseph S. Myers
On Tue, 24 May 2011, Rainer Orth wrote: > Which makes me wonder if I should run the gcc.dg/torture/tls-*.c tests > with -fPIC, too. I think it makes sense to try to provide reasonable coverage of TLS tests with all of -fPIC, -fpic, -fPIE and -fpie. -- Joseph S. Myers jos...@codesourcery.com

Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-24 Thread Rainer Orth
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: co

Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-24 Thread Uros Bizjak
On Tue, May 24, 2011 at 5:09 PM, Rainer Orth wrote: >> Since handling of "p" is not conditional (that is, controlled by some >> compile flag), it is IMO better to just output correct assembly from >> the insn pattern itself.  You will also output lower-case "@plt" which > > I think I tried someth

Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-24 Thread Rainer Orth
Uros, > Since handling of "p" is not conditional (that is, controlled by some > compile flag), it is IMO better to just output correct assembly from > the insn pattern itself. You will also output lower-case "@plt" which I think I tried something along these lines, but failed with duplicate @plt

Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-23 Thread Uros Bizjak
On Mon, May 23, 2011 at 7:22 PM, Rainer Orth wrote: > As described in > >        [testsuite] Provide TLS access model testcases >        http://gcc.gnu.org/ml/gcc-patches/2011-05/msg01601.html > > both the 32 and 64-bit TLS GD and LD execution tests fail on Solaris 2 > with Sun ld unless you have

[build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld

2011-05-23 Thread Rainer Orth
As described in [testsuite] Provide TLS access model testcases http://gcc.gnu.org/ml/gcc-patches/2011-05/msg01601.html both the 32 and 64-bit TLS GD and LD execution tests fail on Solaris 2 with Sun ld unless you have a very recent Solaris 11 version (snv_164). This happens becau