public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/29987]  New: libgomp.c++/ctor-9.C failure
@ 2006-11-26  9:52 ebotcazou at gcc dot gnu dot org
  2006-11-26 14:04 ` [Bug libgomp/29987] " ghazi at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2006-11-26  9:52 UTC (permalink / raw)
  To: gcc-bugs

This failure with Sun as/ld
  http://gcc.gnu.org/ml/gcc-testresults/2006-11/msg00764.html
is of the form:

ld: fatal: relocation error: R_SPARC_HI22: file /var/tmp//cc8eBELF.o: symbol
base: relocation illegal for TLS symbol

It's a bug in Sun as, it doesn't switch section between .tbss and .bss:
hikaru% cat v.s
        .section        ".tbss",#alloc,#write,#tls
        .align 4
        .type   threadbase, #tls_object
        .size   threadbase, 4
threadbase:
        .skip 4
        .local  base
        .common base,4,4
hikaru% as -o v.o v.s
hikaru% objdump --syms v.o

v.o:     file format elf32-sparc

SYMBOL TABLE:
00000000 l    d  .tbss  00000000 .tbss
00000004 l       .tbss  00000004 base
00000000 l       .tbss  00000004 threadbase


hikaru% cat v.s
        .section        ".tdata",#alloc,#write,#tls
        .align 4
        .type   threadbase, #tls_object
        .size   threadbase, 4
threadbase:
        .skip 4
        .local  base
        .common base,4,4
hikaru% as -o v.o v.s
hikaru% objdump --syms v.o

v.o:     file format elf32-sparc

SYMBOL TABLE:
00000000 l    d  .bss   00000000 .bss
00000000 l    d  .tdata 00000000 .tdata
00000000 l     O .bss   00000004 base
00000000 l       .tdata 00000004 threadbase


-- 
           Summary: libgomp.c++/ctor-9.C failure
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ebotcazou at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.10
  GCC host triplet: sparc-sun-solaris2.10
GCC target triplet: sparc-sun-solaris2.10


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libgomp/29987] libgomp.c++/ctor-9.C failure
  2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
@ 2006-11-26 14:04 ` ghazi at gcc dot gnu dot org
  2006-11-26 14:38 ` ebotcazou at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2006-11-26 14:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from ghazi at gcc dot gnu dot org  2006-11-26 14:03 -------
Is this a known bug or do we need to report it to Sun?

If known, is there a patch we can recommend in the Solaris-specific
installation docs?


-- 

ghazi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-11-26 14:03:47
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libgomp/29987] libgomp.c++/ctor-9.C failure
  2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
  2006-11-26 14:04 ` [Bug libgomp/29987] " ghazi at gcc dot gnu dot org
@ 2006-11-26 14:38 ` ebotcazou at gcc dot gnu dot org
  2006-12-29  4:45 ` ghazi at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2006-11-26 14:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ebotcazou at gcc dot gnu dot org  2006-11-26 14:38 -------
> Is this a known bug or do we need to report it to Sun?

Since the Sun toolchain doesn't use the assembler by default, it is very
likely unknown to them.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libgomp/29987] libgomp.c++/ctor-9.C failure
  2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
  2006-11-26 14:04 ` [Bug libgomp/29987] " ghazi at gcc dot gnu dot org
  2006-11-26 14:38 ` ebotcazou at gcc dot gnu dot org
@ 2006-12-29  4:45 ` ghazi at gcc dot gnu dot org
  2007-01-26 13:47 ` jakub at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2006-12-29  4:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ghazi at gcc dot gnu dot org  2006-12-29 04:45 -------
I think the first step is to report it to sun so they track it and hopefully
one day fix their toolchain.  Does anyone have a support contract who can file
a report?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libgomp/29987] libgomp.c++/ctor-9.C failure
  2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-12-29  4:45 ` ghazi at gcc dot gnu dot org
@ 2007-01-26 13:47 ` jakub at gcc dot gnu dot org
  2008-11-14 19:09 ` ebotcazou at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-01-26 13:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2007-01-26 13:47 -------
As a workaround, gcc could check for this in configure and if it detects the
bug,
override TARGET_ASM_SELECT_SECTION such that on Solaris with this bug
detected it would:
section *
solaris_elf_select_section (tree decl, int reloc,
                            unsigned HOST_WIDE_INT align)
{
#if HAVE_AS_TBSS_BUG
  if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL_P (decl)
      && categorize_decl_for_section (decl, reloc, flag_pic) == SECCAT_TBSS)
    /* Solaris AS doesn't handle .tbss variables properly.  Use .tdata section.
 */
    return get_named_section (DECL_P (decl) ? decl : NULL, ".tdata", reloc);
#endif
  return default_elf_select_section_1 (decl, reloc, align, flag_pic);
}

and similarly with TARGET_ASM_UNIQUE_SECTION.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libgomp/29987] libgomp.c++/ctor-9.C failure
  2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-01-26 13:47 ` jakub at gcc dot gnu dot org
@ 2008-11-14 19:09 ` ebotcazou at gcc dot gnu dot org
  2008-11-18 12:32 ` [Bug target/29987] " jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-11-14 19:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ebotcazou at gcc dot gnu dot org  2008-11-14 19:08 -------
*** Bug 38118 has been marked as a duplicate of this bug. ***


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ro at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/29987] libgomp.c++/ctor-9.C failure
  2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-11-14 19:09 ` ebotcazou at gcc dot gnu dot org
@ 2008-11-18 12:32 ` jakub at gcc dot gnu dot org
  2008-11-18 13:17 ` ro at techfak dot uni-bielefeld dot de
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-11-18 12:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2008-11-18 12:31 -------
Created an attachment (id=16717)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16717&action=view)
gcc44-pr29987.patch

Anyway, the following patch fixes this in a cross from x86_64-linux to
sparc*-sun-solaris10.  Can somebody please bootstrap/regtest it?
Does i?86-sun-solaris* as have the same bug or not?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/29987] libgomp.c++/ctor-9.C failure
  2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-11-18 12:32 ` [Bug target/29987] " jakub at gcc dot gnu dot org
@ 2008-11-18 13:17 ` ro at techfak dot uni-bielefeld dot de
  2008-11-18 13:34 ` ro at techfak dot uni-bielefeld dot de
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ro at techfak dot uni-bielefeld dot de @ 2008-11-18 13:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ro at techfak dot uni-bielefeld dot de  2008-11-18 13:16 -------
Subject: Re:  libgomp.c++/ctor-9.C failure

jakub at gcc dot gnu dot org writes:

> Anyway, the following patch fixes this in a cross from x86_64-linux to
> sparc*-sun-solaris10.  Can somebody please bootstrap/regtest it?

will do, thanks.

> Does i?86-sun-solaris* as have the same bug or not?

I'll have to check this.  Currently, one cannot use Sun as for x86_64, so
the default config will use gas instead.  I'll try the non-multilib config
and see if it is affected as well.

        Rainer


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/29987] libgomp.c++/ctor-9.C failure
  2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-11-18 13:17 ` ro at techfak dot uni-bielefeld dot de
@ 2008-11-18 13:34 ` ro at techfak dot uni-bielefeld dot de
  2008-11-19 18:06 ` ro at techfak dot uni-bielefeld dot de
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ro at techfak dot uni-bielefeld dot de @ 2008-11-18 13:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from ro at techfak dot uni-bielefeld dot de  2008-11-18 13:32 -------
Subject: Re:  libgomp.c++/ctor-9.C failure

ro at techfak dot uni-bielefeld dot de writes:

> > Does i?86-sun-solaris* as have the same bug or not?
> 
> I'll have to check this.  Currently, one cannot use Sun as for x86_64, so
> the default config will use gas instead.  I'll try the non-multilib config
> and see if it is affected as well.

Bootstrap on Solaris 10/x86 with Sun as already breaks when building the
stage1 libgcc now:

Assembler: libgcov.c
        "/var/tmp//ccRimvP4.s", line 116 : Syntax error
        Near line: "    repnz scasb"

and many more.  I have no idea what as complains about: a quick strings on
the binary reveals that it seems to support the instruction, and the x86
Assembly Language Reference Manual at

        http://docs.sun.com/app/docs/doc/817-5477/enmzx?a=view

suggests likewise in the `String Instructions' table (table 3-8).

        Rainer


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/29987] libgomp.c++/ctor-9.C failure
  2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2008-11-18 13:34 ` ro at techfak dot uni-bielefeld dot de
@ 2008-11-19 18:06 ` ro at techfak dot uni-bielefeld dot de
  2008-11-20 20:17 ` ebotcazou at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ro at techfak dot uni-bielefeld dot de @ 2008-11-19 18:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from ro at techfak dot uni-bielefeld dot de  2008-11-19 18:05 -------
Subject: Re:  libgomp.c++/ctor-9.C failure

ro at techfak dot uni-bielefeld dot de writes:

> jakub at gcc dot gnu dot org writes:
> 
> > Anyway, the following patch fixes this in a cross from x86_64-linux to
> > sparc*-sun-solaris10.  Can somebody please bootstrap/regtest it?
> 
> will do, thanks.

Bootstrap with the patch completed (unlike the situation without, where
libgomp.so failed to link).  Testresults are still hampered by the
following gld 2.19 warning

/vol/gcc/lib/gld-2.19: warning: section `.bss' type changed to PROGBITS

which I'll investigate.  There's something in

        http://sourceware.org/bugzilla/show_bug.cgi?id=7027

(Comments #18 - 24).  It seems like Sun as doesn't mark .bss.* sections as
NOBITS.  Probably another bug to take up with Sun.

> > Does i?86-sun-solaris* as have the same bug or not?
> 
> I'll have to check this.  Currently, one cannot use Sun as for x86_64, so
> the default config will use gas instead.  I'll try the non-multilib config
> and see if it is affected as well.

Apart from the problems reported in Comment #8, Sun as heavily chokes on
the tls conftest_s in gcc/configure.ac:

* as is invoked with the gas-only --fatal-warnings, which lets Sun as
  choke.

* The test itself uses the gas .section syntax that Sun as doesn't
  understand.

To properly handle this, one would need to have two sections as in the
sparc-*-solaris2* case.  Right now, it doesn't make much sense to pursue
this.

        Rainer


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/29987] libgomp.c++/ctor-9.C failure
  2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2008-11-19 18:06 ` ro at techfak dot uni-bielefeld dot de
@ 2008-11-20 20:17 ` ebotcazou at gcc dot gnu dot org
  2008-11-29 22:07 ` ebotcazou at gcc dot gnu dot org
  2008-11-29 22:09 ` ebotcazou at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-11-20 20:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from ebotcazou at gcc dot gnu dot org  2008-11-20 20:16 -------
> Anyway, the following patch fixes this in a cross from x86_64-linux to
> sparc*-sun-solaris10.  Can somebody please bootstrap/regtest it?

Bootstrapped/regtested with GNU as for the sake of completeness.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/29987] libgomp.c++/ctor-9.C failure
  2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2008-11-20 20:17 ` ebotcazou at gcc dot gnu dot org
@ 2008-11-29 22:07 ` ebotcazou at gcc dot gnu dot org
  2008-11-29 22:09 ` ebotcazou at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-11-29 22:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from ebotcazou at gcc dot gnu dot org  2008-11-29 22:05 -------
Subject: Bug 29987

Author: ebotcazou
Date: Sat Nov 29 22:04:25 2008
New Revision: 142286

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142286
Log:
        PR target/29987
        * config/sparc/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): Redefine.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sparc/sol2.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/29987] libgomp.c++/ctor-9.C failure
  2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2008-11-29 22:07 ` ebotcazou at gcc dot gnu dot org
@ 2008-11-29 22:09 ` ebotcazou at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-11-29 22:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from ebotcazou at gcc dot gnu dot org  2008-11-29 22:08 -------
Thanks for the patch.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-11-29 22:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-26  9:52 [Bug libgomp/29987] New: libgomp.c++/ctor-9.C failure ebotcazou at gcc dot gnu dot org
2006-11-26 14:04 ` [Bug libgomp/29987] " ghazi at gcc dot gnu dot org
2006-11-26 14:38 ` ebotcazou at gcc dot gnu dot org
2006-12-29  4:45 ` ghazi at gcc dot gnu dot org
2007-01-26 13:47 ` jakub at gcc dot gnu dot org
2008-11-14 19:09 ` ebotcazou at gcc dot gnu dot org
2008-11-18 12:32 ` [Bug target/29987] " jakub at gcc dot gnu dot org
2008-11-18 13:17 ` ro at techfak dot uni-bielefeld dot de
2008-11-18 13:34 ` ro at techfak dot uni-bielefeld dot de
2008-11-19 18:06 ` ro at techfak dot uni-bielefeld dot de
2008-11-20 20:17 ` ebotcazou at gcc dot gnu dot org
2008-11-29 22:07 ` ebotcazou at gcc dot gnu dot org
2008-11-29 22:09 ` ebotcazou at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).