public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/12020] New: undefined reference in libgcc2.c to __do_global_ctors when testing C compiler
@ 2003-08-21 19:54 dhazeghi at yahoo dot com
  2003-08-23 17:18 ` [Bug target/12020] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-21 19:54 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: undefined reference in libgcc2.c to __do_global_ctors
                    when testing C compiler
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dhazeghi at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: d30v

Even after working around the problem of PR 12019, d30v C compiler test fails when building 
libstdc++:

configure:2352:  /home/dara/mainline/objdir/gcc/xgcc -B/home/dara/mainline/objdir/gcc/ -
nostdinc -B/home/dara/mainline/objdir/d30v/newlib/ -isystem /home/dara/mainline/objdir/
d30v/newlib/targ-include -isystem /home/dara/mainline/combined/newlib/libc/include -B/tmp/
/d30v/bin/ -B/tmp//d30v/lib/ -isystem /tmp//d30v/include -isystem /tmp//d30v/sys-include -
L/home/dara/mainline/objdir/ld -g -Os -Wa,-C -g -Os -Wa,-C  conftest.c  >&5
/home/dara/mainline/objdir/gcc/libgcc.a(__main.o)(.text+0x38): In function `__main':
/home/dara/mainline/objdir/gcc/../../combined/gcc/libgcc2.c:1701: undefined reference to 
`__do_global_ctors'
collect2: ld returned 1 exit status

This is with mainline (using a combined tree), configuring: ../gcc/configure --target=d30v --
prefix=/tmp --enable-languages=c,c++,objc


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

* [Bug target/12020] undefined reference in libgcc2.c to __do_global_ctors when testing C compiler
  2003-08-21 19:54 [Bug target/12020] New: undefined reference in libgcc2.c to __do_global_ctors when testing C compiler dhazeghi at yahoo dot com
@ 2003-08-23 17:18 ` pinskia at gcc dot gnu dot org
  2003-10-11  2:50 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-23 17:18 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4                         |---


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

* [Bug target/12020] undefined reference in libgcc2.c to __do_global_ctors when testing C compiler
  2003-08-21 19:54 [Bug target/12020] New: undefined reference in libgcc2.c to __do_global_ctors when testing C compiler dhazeghi at yahoo dot com
  2003-08-23 17:18 ` [Bug target/12020] " pinskia at gcc dot gnu dot org
@ 2003-10-11  2:50 ` pinskia at gcc dot gnu dot org
  2003-10-14  2:22 ` wilson at specifixinc dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-11  2:50 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-11 02:50 -------
Looks like HAS_INIT_SECTION is defined but INVOKE__main is also defined but the file format is not 
elf aka OBJECT_FORMAT_ELF is not defined. Could any one comment on what is going on here?


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

* [Bug target/12020] undefined reference in libgcc2.c to __do_global_ctors when testing C compiler
  2003-08-21 19:54 [Bug target/12020] New: undefined reference in libgcc2.c to __do_global_ctors when testing C compiler dhazeghi at yahoo dot com
  2003-08-23 17:18 ` [Bug target/12020] " pinskia at gcc dot gnu dot org
  2003-10-11  2:50 ` pinskia at gcc dot gnu dot org
@ 2003-10-14  2:22 ` wilson at specifixinc dot com
  2003-10-24 17:32 ` dhazeghi at yahoo dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: wilson at specifixinc dot com @ 2003-10-14  2:22 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From wilson at specifixinc dot com  2003-10-14 02:22 -------
Subject: Re:  undefined reference in libgcc2.c to __do_global_ctors
 when testing C compiler

pinskia at gcc dot gnu dot org wrote:
> Looks like HAS_INIT_SECTION is defined but INVOKE__main is also defined but the file format is not 
> elf aka OBJECT_FORMAT_ELF is not defined. Could any one comment on what is going on here?

The d30v port has no maintainer, and no known users.  It is likely to be 
  obsoleted the next time we go through that process.  I see no point in 
trying to make it work.

Using ambiguous targets like d30v is a bad idea.  You will match the 
default d30v target for each tool, which could be different, resulting 
in a toolchain that won't work.  I'm guessing that d30v was used as the 
target because config.gcc has "d30v-*-*".  That doesn't mean that it is 
OK to use d30v as the target.  That means that we want all targets to 
use the same gcc configuration.  However, this can't possibly work for 
targets like d30v-coff.  This should be fixed, but since I expect the 
d30v port to be obsoleted, it probably isn't worth fixing.

The file format is ELF.  OBJECT_FORMAT_ELF comes from config/elfos.h.

The problem here seems to be that when the port was written, it didn't 
use the standard ELF conventions for running static constructors.  Some 
embedded ports used the coff conventions because they were simpler to 
get working.  If you look at the libgloss d30v/crt0.S file, you will see 
that there is no support for running code in init/fini sections. 
Rather, we rely on __main to call the function addresses in the 
.ctor/.dtor sections.  Thus the need to define INVOKE__main which is 
normally not used for an ELF target.  This must have worked fine in 1997 
or so when the code was written.  Since then, there have been a lot of 
structural changes, and it happens not to work anymore.  This went 
unnoticed, because there are no users for the d30v port.  The proper fix 
for this is to use ELF style static constructors instead of COFF style, 
which means getting rid of the INVOKE__main definition in gcc, and in 
newlib fixing the libgloss d30v/crt0.S to run code in .init and .fini 
sections.  But since I expect the port to be deprecated soon, I don't 
see the point of doing this work.


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

* [Bug target/12020] undefined reference in libgcc2.c to __do_global_ctors when testing C compiler
  2003-08-21 19:54 [Bug target/12020] New: undefined reference in libgcc2.c to __do_global_ctors when testing C compiler dhazeghi at yahoo dot com
                   ` (2 preceding siblings ...)
  2003-10-14  2:22 ` wilson at specifixinc dot com
@ 2003-10-24 17:32 ` dhazeghi at yahoo dot com
  2003-10-24 17:40 ` dhazeghi at yahoo dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-10-24 17:32 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-10-24 17:31:33
               date|                            |


------- Additional Comments From dhazeghi at yahoo dot com  2003-10-24 17:31 -------
No maintainer, so I will suspend this bug, and recommend the target be deprecated next time the 
deprecation list goes around. Confirming so as to...


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

* [Bug target/12020] undefined reference in libgcc2.c to __do_global_ctors when testing C compiler
  2003-08-21 19:54 [Bug target/12020] New: undefined reference in libgcc2.c to __do_global_ctors when testing C compiler dhazeghi at yahoo dot com
                   ` (3 preceding siblings ...)
  2003-10-24 17:32 ` dhazeghi at yahoo dot com
@ 2003-10-24 17:40 ` dhazeghi at yahoo dot com
  2003-12-26 21:11 ` pinskia at gcc dot gnu dot org
  2004-12-07  0:37 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-10-24 17:40 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


------- Additional Comments From dhazeghi at yahoo dot com  2003-10-24 17:32 -------
Suspended until we have a d30v maintainer, or d30v gets removed.


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

* [Bug target/12020] undefined reference in libgcc2.c to __do_global_ctors when testing C compiler
  2003-08-21 19:54 [Bug target/12020] New: undefined reference in libgcc2.c to __do_global_ctors when testing C compiler dhazeghi at yahoo dot com
                   ` (4 preceding siblings ...)
  2003-10-24 17:40 ` dhazeghi at yahoo dot com
@ 2003-12-26 21:11 ` pinskia at gcc dot gnu dot org
  2004-12-07  0:37 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-26 21:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-26 19:39 -------
The port has now been declare obsolete.

-- 


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


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

* [Bug target/12020] undefined reference in libgcc2.c to __do_global_ctors when testing C compiler
  2003-08-21 19:54 [Bug target/12020] New: undefined reference in libgcc2.c to __do_global_ctors when testing C compiler dhazeghi at yahoo dot com
                   ` (5 preceding siblings ...)
  2003-12-26 21:11 ` pinskia at gcc dot gnu dot org
@ 2004-12-07  0:37 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-07  0:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-07 00:36 -------
Closing as will not fix as d30v has been removed for a while on the mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|SUSPENDED                   |RESOLVED
         Resolution|                            |WONTFIX
   Target Milestone|---                         |4.0.0


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


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

end of thread, other threads:[~2004-12-07  0:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-21 19:54 [Bug target/12020] New: undefined reference in libgcc2.c to __do_global_ctors when testing C compiler dhazeghi at yahoo dot com
2003-08-23 17:18 ` [Bug target/12020] " pinskia at gcc dot gnu dot org
2003-10-11  2:50 ` pinskia at gcc dot gnu dot org
2003-10-14  2:22 ` wilson at specifixinc dot com
2003-10-24 17:32 ` dhazeghi at yahoo dot com
2003-10-24 17:40 ` dhazeghi at yahoo dot com
2003-12-26 21:11 ` pinskia at gcc dot gnu dot org
2004-12-07  0:37 ` pinskia 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).