summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/kamek.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/tools/kamek.py b/tools/kamek.py
index f67f049..3f7fb5c 100644
--- a/tools/kamek.py
+++ b/tools/kamek.py
@@ -306,16 +306,19 @@ class KamekBuilder(object):
objfile = os.path.join(self._configTempDir, '%d.o' % generate_unique_id())
sourcefile = os.path.join(m.moduleDir, normal_sourcefile)
- # todo: better extension detection
- if sourcefile.endswith('.s') or sourcefile.endswith('.S'):
- command = as_command
+ if sourcefile.endswith('.o'):
+ new_command = ['cp', sourcefile, objfile]
else:
- command = cc_command
-
- new_command = command + ['-c', '-o', objfile, sourcefile]
-
- if 'cc_args' in m.data:
- new_command += m.data['cc_args']
+ # todo: better extension detection
+ if sourcefile.endswith('.s') or sourcefile.endswith('.S'):
+ command = as_command
+ else:
+ command = cc_command
+
+ new_command = command + ['-c', '-o', objfile, sourcefile]
+
+ if 'cc_args' in m.data:
+ new_command += m.data['cc_args']
if show_cmd:
print_debug(new_command)
@@ -428,6 +431,9 @@ class KamekBuilder(object):
def _find_func_by_symbol(self, find_symbol):
for sym in self._symbols:
+ #if show_cmd:
+ # out = "0x%08x - %s - %s" % (sym[0], sym[1], sym[2])
+ # print_debug(out)
if sym[2] == find_symbol:
return sym[0]