[rtems commit] wscript: Allow start code to be written in C

Joel Sherrill joel at rtems.org
Tue Apr 26 14:19:18 UTC 2022


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

Author:    Kinsey Moore <kinsey.moore at oarcorp.com>
Date:      Mon Apr 18 12:24:47 2022 -0500

wscript: Allow start code to be written in C

Start code for most platforms requires hand-coded ASM but some can be
bootstrapped entirely in C, especially for paravirtualized platforms.
This change allows start code to be written in C where possible instead
of requiring architecture-specific ASM to bridge to C.

---

 wscript | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/wscript b/wscript
index 0291b6025a..59ab96c43d 100755
--- a/wscript
+++ b/wscript
@@ -561,7 +561,11 @@ class StartFileItem(Item):
         super(StartFileItem, self).__init__(uid, data)
 
     def do_build(self, bld, bic):
-        tgt = self.asm(bld, bic, self.data["source"], self.get(bld, "target"))
+        source = self.data["source"]
+        if os.path.splitext(source[0])[1] == ".S":
+            tgt = self.asm(bld, bic, source, self.get(bld, "target"))
+        else:
+            tgt = self.cc(bld, bic, source, self.get(bld, "target"))
         node = bld.bldnode.make_node(tgt)
         try:
             bld.start_files.append(node)



More information about the vc mailing list