Hi,
Attached an updated file for cegcc\src\mingw. I added a mingw_ prefix to the
global methods. Now the libstdc++ does compile without problems. The problem
doesn't appear with ARM because ARM uses ELF and then the _do_global_dtors
and _do_global_ctors are not compiled as part of libgcc2.c
Johnny
> I have searched further for the GCC_NO_EXECUTABLES error. It seems this
> is a
> side effect of another error. I added the configure log files for arm
> and
> x86, for x86 we do see these errors. Any idea how to resolve these?
>
> Johnny
>
> /home/build/ACE/cegcc/cegcc/src/scripts/i386/gcc/./gcc/libgcc.a(__main.
> o):
> In function `__do_global_dtors':
> /home/build/ACE/cegcc/cegcc/src/gcc/gcc/libgcc2.c:1919: multiple
> definition
> of `___do_global_dtors'
> /home/build/cegcc/i386-
> mingw32ce/lib/libmingw32.a(gccmain.o):/home/build/ACE
> /cegcc/cegcc/src/mingw/gccmain.c:23: first defined here
> /home/build/ACE/cegcc/cegcc/src/scripts/i386/gcc/./gcc/libgcc.a(__main.
> o):
> In function `__do_global_ctors':
> /home/build/ACE/cegcc/cegcc/src/gcc/gcc/libgcc2.c:1948: multiple
> definition
> of `___do_global_ctors'
> /home/build/cegcc/i386-
> mingw32ce/lib/libmingw32.a(gccmain.o):/home/build/ACE
> /cegcc/cegcc/src/mingw/gccmain.c:39: first defined here
> collect2: ld returned 1 exit status
/*
* gccmain.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* A separate version of __main, __do_global_ctors and __do_global_dtors for
* Mingw32 for use with Cygwin32 b19. Hopefully this object file will only
* be linked if the libgcc.a doesn't include __main, __do_global_dtors and
* __do_global_ctors.
*
*/
/* Needed for the atexit prototype. */
#include <stdlib.h>
typedef void (*func_ptr) (void);
extern func_ptr __CTOR_LIST__[];
extern func_ptr __DTOR_LIST__[];
void
__mingw_do_global_dtors (void)
{
static func_ptr *p = __DTOR_LIST__ + 1;
/*
* Call each destructor in the destructor list until a null pointer
* is encountered.
*/
while (*p)
{
(*(p)) ();
p++;
}
}
void
__mingw_do_global_ctors (void)
{
unsigned long nptrs = (unsigned long) __CTOR_LIST__[0];
unsigned i;
/*
* If the first entry in the constructor list is -1 then the list
* is terminated with a null entry. Otherwise the first entry was
* the number of pointers in the list.
*/
if (nptrs == -1)
{
for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++)
;
}
/*
* Go through the list backwards calling constructors.
*/
for (i = nptrs; i >= 1; i--)
{
__CTOR_LIST__[i] ();
}
/*
* Register the destructors for processing on exit.
*/
atexit (__mingw_do_global_dtors);
}
static int initialized = 0;
void
#ifndef __MINGW32CE__
__main (void)
#else
__gccmain (void)
#endif
{
if (!initialized)
{
initialized = 1;
__mingw_do_global_ctors ();
}
}
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel