forked from Imagelibrary/rtems
updates from Tony Bennett for PA and UNIX ports
This commit is contained in:
16
c/src/lib/libbsp/unix/posix/startup/no-ctor.c
Normal file
16
c/src/lib/libbsp/unix/posix/startup/no-ctor.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* rtems, floss, libc are always compiled with GNU compilers
|
||||
* application code may be compiled with some other C++ compiler
|
||||
* that has a different global constructor technique.
|
||||
*
|
||||
* For the simple case, where the app has no global constructors or
|
||||
* is compiled by g++, we provide this empty routine
|
||||
* In order to get both g++ constructors (RTEMS::RTEMS, for example)
|
||||
* and application constructors run, we provide this routine.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
void invoke_non_gnu_constructors(void)
|
||||
{
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// @(#)rtems-ctor.cc 1.6 - 95/04/25
|
||||
//
|
||||
// @(#)rtems-ctor.cc 1.6 - 95/04/25
|
||||
//
|
||||
|
||||
/*
|
||||
@@ -81,6 +81,8 @@ RTEMS::~RTEMS()
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
extern void invoke_non_gnu_constructors(void);
|
||||
|
||||
int
|
||||
main(int argc,
|
||||
char **argv,
|
||||
@@ -95,6 +97,12 @@ extern "C" {
|
||||
else
|
||||
rtems_progname = "RTEMS";
|
||||
|
||||
/*
|
||||
* run any non-gnu constructors we may need
|
||||
*/
|
||||
|
||||
invoke_non_gnu_constructors();
|
||||
|
||||
/*
|
||||
* Start multitasking
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user