[rtems commit] bsp/mbx8xx: Fix Makefile.am and bsp_specs

Sebastian Huber sebh at rtems.org
Tue Apr 22 07:30:13 UTC 2014


Module:    rtems
Branch:    master
Commit:    e2782684f21ff67a385757ba2ff5de26f54fb1e9
Changeset: http://git.rtems.org/rtems/commit/?id=e2782684f21ff67a385757ba2ff5de26f54fb1e9

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Apr 22 09:32:16 2014 +0200

bsp/mbx8xx: Fix Makefile.am and bsp_specs

---

 c/src/lib/libbsp/powerpc/mbx8xx/Makefile.am   |   11 +++++++++--
 c/src/lib/libbsp/powerpc/mbx8xx/bsp_specs     |    4 ++--
 c/src/lib/libbsp/powerpc/mbx8xx/preinstall.am |   15 ++++++++++++++-
 c/src/lib/libbsp/powerpc/mbx8xx/start/start.S |    4 ++--
 4 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/Makefile.am b/c/src/lib/libbsp/powerpc/mbx8xx/Makefile.am
index 834caa2..300260f 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/Makefile.am
@@ -25,7 +25,14 @@ EXTRA_DIST = times-mbx821 times-mbx860
 
 dist_project_lib_DATA += startup/linkcmds
 
-noinst_LIBRARIES = libbsp.a
+noinst_LIBRARIES = libbspstart.a
+libbspstart_a_SOURCES = start/start.S
+project_lib_DATA = start.$(OBJEXT)
+
+libbspstart_a_SOURCES += ../../powerpc/shared/start/rtems_crti.S
+project_lib_DATA += rtems_crti.$(OBJEXT)
+
+noinst_LIBRARIES += libbsp.a
 libbsp_a_SOURCES =
 
 # pclock
@@ -48,7 +55,7 @@ libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
     ../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \
     startup/bspstart.c ../../shared/bootcard.c \
     startup/imbx8xx.c startup/mmutlbtab.c \
-    ../../shared/sbrk.c ../../shared/gnatinstallhandler.c start/start.S
+    ../../shared/sbrk.c ../../shared/gnatinstallhandler.c
 
 if HAS_NETWORKING
 network_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/bsp_specs b/c/src/lib/libbsp/powerpc/mbx8xx/bsp_specs
index 275f881..5f2b130 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/bsp_specs
@@ -4,10 +4,10 @@
 
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: ecrti%O%s -e start}}
+%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s  crtbegin.o%s start.o%s}}
 
 *endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: ecrtn%O%s}
+%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
 
 *link:
 %{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -N}
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/preinstall.am b/c/src/lib/libbsp/powerpc/mbx8xx/preinstall.am
index 077305f..047971f 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/preinstall.am
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/preinstall.am
@@ -8,10 +8,15 @@ endif
 PREINSTALL_DIRS =
 DISTCLEANFILES += $(PREINSTALL_DIRS)
 
+all-local: $(TMPINSTALL_FILES)
+
+TMPINSTALL_FILES =
+CLEANFILES = $(TMPINSTALL_FILES)
+
 all-am: $(PREINSTALL_FILES)
 
 PREINSTALL_FILES =
-CLEANFILES = $(PREINSTALL_FILES)
+CLEANFILES += $(PREINSTALL_FILES)
 
 $(PROJECT_LIB)/$(dirstamp):
 	@$(MKDIR_P) $(PROJECT_LIB)
@@ -80,3 +85,11 @@ $(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
 
+$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
+TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
+
+$(PROJECT_LIB)/rtems_crti.$(OBJEXT): rtems_crti.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_LIB)/rtems_crti.$(OBJEXT)
+TMPINSTALL_FILES += $(PROJECT_LIB)/rtems_crti.$(OBJEXT)
+
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/start/start.S b/c/src/lib/libbsp/powerpc/mbx8xx/start/start.S
index e0a11a2..380a24d 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/start/start.S
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/start/start.S
@@ -205,8 +205,8 @@ SYM(__atexit):
  */
         .section .entry
 
-        PUBLIC_VAR (start)
-SYM(start):
+        PUBLIC_VAR (_start)
+SYM(_start):
         bl      .startup	/* or bl .spin */
 base_addr:
 




More information about the vc mailing list