summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/unix/posix/startup
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-01-15 21:50:28 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-01-15 21:50:28 +0000
commitc64e4ed48285a0c944905bc02de89c20038f428b (patch)
tree7804e08b98cb9e6b9ac4de5e010c6fb70f9a011b /c/src/lib/libbsp/unix/posix/startup
parentchanges remerged after lost in disk crash -- recovered from snapshot, partial... (diff)
downloadrtems-c64e4ed48285a0c944905bc02de89c20038f428b.tar.bz2
updates from Tony Bennett for PA and UNIX ports
Diffstat (limited to 'c/src/lib/libbsp/unix/posix/startup')
-rw-r--r--c/src/lib/libbsp/unix/posix/startup/no-ctor.c16
-rw-r--r--c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc10
2 files changed, 25 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/unix/posix/startup/no-ctor.c b/c/src/lib/libbsp/unix/posix/startup/no-ctor.c
new file mode 100644
index 0000000000..349ad2b1dd
--- /dev/null
+++ b/c/src/lib/libbsp/unix/posix/startup/no-ctor.c
@@ -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)
+{
+}
diff --git a/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc b/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc
index 6fb132b469..0b4278eb19 100644
--- a/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc
+++ b/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc
@@ -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,
@@ -96,6 +98,12 @@ extern "C" {
rtems_progname = "RTEMS";
/*
+ * run any non-gnu constructors we may need
+ */
+
+ invoke_non_gnu_constructors();
+
+ /*
* Start multitasking
*/