2018-02-03 15:36:25 +00:00
|
|
|
Import('env')
|
|
|
|
|
2024-05-03 13:47:14 +01:00
|
|
|
build_flags = " ".join(env.GetProjectOption("build_flags"))
|
|
|
|
|
2018-02-03 15:36:25 +00:00
|
|
|
#
|
|
|
|
# Dump build environment (for debug)
|
|
|
|
#print env.Dump()
|
|
|
|
#
|
|
|
|
|
|
|
|
flags = " ".join(env['LINKFLAGS'])
|
|
|
|
flags = flags.replace("-u _printf_float", "")
|
|
|
|
flags = flags.replace("-u _scanf_float", "")
|
2024-05-03 13:47:14 +01:00
|
|
|
if "FIRMWARE_SAFEBOOT" in build_flags:
|
|
|
|
# Crash Recorder is not included in safeboot firmware -> remove Linker wrap
|
|
|
|
flags = flags.replace("-Wl,--wrap=panicHandler", "")
|
|
|
|
flags = flags.replace("-Wl,--wrap=xt_unhandled_exception", "")
|
2018-02-03 15:36:25 +00:00
|
|
|
newflags = flags.split()
|
|
|
|
|
|
|
|
env.Replace(
|
|
|
|
LINKFLAGS=newflags
|
|
|
|
)
|