-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove compile flag for risc-v MCUs which is only valid for xtensa MC…
…Us (#21665)
- Loading branch information
Showing
4 changed files
with
19 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
Import('env') | ||
|
||
build_flags = " ".join(env.GetProjectOption("build_flags")) | ||
link_flags = " ".join(env['LINKFLAGS']) | ||
build_flags = " ".join(env['BUILD_FLAGS']) | ||
|
||
# | ||
# Dump build environment (for debug) | ||
#print env.Dump() | ||
#print(env.Dump()) | ||
# | ||
|
||
flags = " ".join(env['LINKFLAGS']) | ||
flags = flags.replace("-u _printf_float", "") | ||
flags = flags.replace("-u _scanf_float", "") | ||
link_flags = link_flags.replace("-u _printf_float", "") | ||
link_flags = link_flags.replace("-u _scanf_float", "") | ||
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", "") | ||
newflags = flags.split() | ||
link_flags = link_flags.replace("-Wl,--wrap=panicHandler", "") | ||
link_flags = link_flags.replace("-Wl,--wrap=xt_unhandled_exception", "") | ||
|
||
new_link_flags = link_flags.split() | ||
|
||
env.Replace( | ||
LINKFLAGS=newflags | ||
LINKFLAGS=new_link_flags | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters