projects
/
gps-watch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: Link libgcc from the command line instead of the linker script.
[gps-watch.git]
/
SConscript.target
diff --git
a/SConscript.target
b/SConscript.target
index b42eecef5f6166c51d73698c4abfe52e89e679db..1e5f40299db24dddac0bd645cf7ae25436c96fab 100644
(file)
--- a/
SConscript.target
+++ b/
SConscript.target
@@
-1,3
+1,4
@@
+import subprocess
import os
Import('env')
import os
Import('env')
@@
-33,6
+34,10
@@
env.Append(LINKFLAGS = [
'-nostartfiles',
])
'-nostartfiles',
])
+libgcc_path = \
+ subprocess.check_output('{} -print-libgcc-file-name'.format(env['CC']),
+ shell=True).strip()
+
env.Append(RUSTCFLAGS = [
'-C', 'opt-level=s',
'--target=thumbv6m-none-eabi',
env.Append(RUSTCFLAGS = [
'-C', 'opt-level=s',
'--target=thumbv6m-none-eabi',
@@
-76,9
+81,15
@@
for s in ['intermediate', 'final']:
'-Tsrc/bootloader/bootloader-{}.ld'.format(s),
])
'-Tsrc/bootloader/bootloader-{}.ld'.format(s),
])
+ bootloader_libs = [
+ 'bootloader-{}'.format(s),
+ 'common',
+ File(libgcc_path),
+ ]
+
bootloader_elf = \
bootloader_env.Program('gps-watch-bootloader-{}.elf'.format(s),
bootloader_elf = \
bootloader_env.Program('gps-watch-bootloader-{}.elf'.format(s),
- start_o, LIBS =
['bootloader-{}'.format(s), 'common']
)
+ start_o, LIBS =
bootloader_libs
)
bootloader_bin = bootloader_env.Objcopy(bootloader_elf)
bootloader_bin = bootloader_env.Objcopy(bootloader_elf)
@@
-104,9
+115,14
@@
application_env.Append(LINKFLAGS = [
'-Tsrc/application/application.ld'
])
'-Tsrc/application/application.ld'
])
+application_libs = [
+ 'application',
+ 'common',
+ File(libgcc_path),
+]
+
application_elf = application_env.Program('gps-watch-application.elf',
application_elf = application_env.Program('gps-watch-application.elf',
- start_o,
- LIBS = ['application', 'common'])
+ start_o, LIBS = application_libs)
application_bin = application_env.Objcopy(application_elf)
application_bin = application_env.Objcopy(application_elf)