From f10d37f018ca0e9359cdcf54c6d5ac5bd90e2905 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 24 Jul 2007 20:52:56 +0000 Subject: 2007-07-24 Joel Sherrill * Makefile.am, startup/main.c: Now can link with C compiler and not require C++ compiler to link. The file rtems-ctor.cc is not being built but if there is a need for C++ code to run on this BSP, then it will have to be addressed. The simplest solution which might work is to check the RTEMS system state before calling bsp_start() in main(). --- c/src/lib/libbsp/unix/posix/ChangeLog | 8 ++++++++ c/src/lib/libbsp/unix/posix/Makefile.am | 32 +++++++++++++++--------------- c/src/lib/libbsp/unix/posix/startup/main.c | 26 +----------------------- 3 files changed, 25 insertions(+), 41 deletions(-) (limited to 'c/src/lib/libbsp/unix/posix') diff --git a/c/src/lib/libbsp/unix/posix/ChangeLog b/c/src/lib/libbsp/unix/posix/ChangeLog index 53c58d56a3..83c1b03aa3 100644 --- a/c/src/lib/libbsp/unix/posix/ChangeLog +++ b/c/src/lib/libbsp/unix/posix/ChangeLog @@ -1,3 +1,11 @@ +2007-07-24 Joel Sherrill + + * Makefile.am, startup/main.c: Now can link with C compiler and not + require C++ compiler to link. The file rtems-ctor.cc is not being + built but if there is a need for C++ code to run on this BSP, then it + will have to be addressed. The simplest solution which might work is + to check the RTEMS system state before calling bsp_start() in main(). + 2007-05-07 Ralf Corsépius * startup/bspstart.c: Use uintptr_t for address arithmetics. diff --git a/c/src/lib/libbsp/unix/posix/Makefile.am b/c/src/lib/libbsp/unix/posix/Makefile.am index 56d7eddc53..cbb74644de 100644 --- a/c/src/lib/libbsp/unix/posix/Makefile.am +++ b/c/src/lib/libbsp/unix/posix/Makefile.am @@ -26,22 +26,22 @@ nodist_include_HEADERS += ../../shared/include/coverhd.h project_lib_DATA = noinst_LIBRARIES = -if HAS_CXX -noinst_LIBRARIES += librtemscxx.a - -librtemscxx_a_SOURCES = startup/no-ctor.c - -# Install as a separate .$(OBJEXT) -project_lib_DATA += no-ctor.$(OBJEXT) - -# We install the RTEMS constructor as a separate .$(OBJEXT) -# so it can be easily place correctly by the compiler config file. -project_lib_DATA += rtems-ctor.$(OBJEXT) -endif +## if HAS_CXX +## noinst_LIBRARIES += librtemscxx.a +## +## librtemscxx_a_SOURCES = startup/no-ctor.c +## +## # Install as a separate .$(OBJEXT) +## project_lib_DATA += no-ctor.$(OBJEXT) +## +## # We install the RTEMS constructor as a separate .$(OBJEXT) +## # so it can be easily place correctly by the compiler config file. +## project_lib_DATA += rtems-ctor.$(OBJEXT) +## endif noinst_PROGRAMS += startup.rel startup_rel_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \ - startup/bspstart.c startup/setvec.c + startup/bspstart.c startup/setvec.c ../../shared/bootcard.c if !HAS_CXX startup_rel_SOURCES += startup/main.c endif @@ -74,9 +74,9 @@ endif noinst_LIBRARIES += libbsp.a libbsp_a_SOURCES = -if HAS_CXX -libbsp_a_SOURCES += startup/rtems-ctor.cc -endif +## if HAS_CXX +## libbsp_a_SOURCES += startup/rtems-ctor.cc +## endif libbsp_a_LIBADD = startup.rel clock.rel console.rel timer.rel if HAS_MP libbsp_a_LIBADD += shmsupp.rel diff --git a/c/src/lib/libbsp/unix/posix/startup/main.c b/c/src/lib/libbsp/unix/posix/startup/main.c index 520cd36b04..c30d65e2ca 100644 --- a/c/src/lib/libbsp/unix/posix/startup/main.c +++ b/c/src/lib/libbsp/unix/posix/startup/main.c @@ -24,31 +24,7 @@ int main( char **argv ) { - rtems_argc = argc; - rtems_argv = argv; - - bsp_start(); - - if ((argc > 0) && argv && argv[0]) - rtems_progname = argv[0]; - else - rtems_progname = "RTEMS"; - - /* - * Start multitasking - */ - - rtems_initialize_executive_late( bsp_isr_level ); - - /* - * Returns when multitasking is stopped - * This allows our destructors to get run normally - */ - - fflush( stdout ); - fflush( stderr ); - - bsp_cleanup(); + boot_card(); return 0; } -- cgit v1.2.3