userland: convert make to python

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-03-11 00:00:00 +00:00
parent 0deab8f8f7
commit 1a0d15ca86
19 changed files with 445 additions and 290 deletions

View File

@@ -45,7 +45,6 @@ Build the baremetal examples with crosstool-NG.
'-nostartfiles', LF,
]
cflags_after = ['-lm']
gcc = self.get_toolchain_tool('gcc')
if self.env['emulator'] == 'gem5':
if self.env['machine'] == 'VExpress_GEM5_V1':
entry_address = 0x80000000
@@ -70,7 +69,7 @@ Build the baremetal examples with crosstool-NG.
)
if self.need_rebuild([src], bootloader_obj):
self.sh.run_cmd(
[gcc, LF] +
[self.env['gcc'], LF] +
cflags +
[
'-c', LF,
@@ -85,7 +84,7 @@ Build the baremetal examples with crosstool-NG.
]:
if self.need_rebuild([src, self.env['common_h']], obj):
self.sh.run_cmd(
[gcc, LF] +
[self.env['gcc'], LF] +
cflags +
[
'-c', LF,
@@ -125,7 +124,7 @@ Build the baremetal examples with crosstool-NG.
src = os.path.join(self.env['baremetal_source_dir'], in_path)
if self.need_rebuild([src, self.env['common_h']], main_obj):
self.sh.run_cmd(
[gcc, LF] +
[self.env['gcc'], LF] +
cflags +
[
'-c', LF,
@@ -138,7 +137,7 @@ Build the baremetal examples with crosstool-NG.
out = os.path.join(out_dir, in_name + self.env['baremetal_build_ext'])
if self.need_rebuild(objs + [self.env['baremetal_link_script']], out):
self.sh.run_cmd(
[gcc, LF] +
[self.env['gcc'], LF] +
cflags +
[
'-Wl,--section-start=.text={:#x}'.format(entry_address), LF,