diff options
author | Sean Anderson <sean.anderson@seco.com> | 2022-02-22 12:19:25 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-03-25 13:35:50 -0400 |
commit | e97650437403c04da274200337de53968da20ab0 (patch) | |
tree | b9490e0bffd9087b5628e0b94db575f452cdb108 /Makefile | |
parent | f38cb2aca7ab95c4be53eb54497f91ba8a35e4a9 (diff) | |
download | u-boot-e97650437403c04da274200337de53968da20ab0.zip u-boot-e97650437403c04da274200337de53968da20ab0.tar.gz u-boot-e97650437403c04da274200337de53968da20ab0.tar.bz2 |
Add option to use -Og
This adds support for using -Og when building U-Boot. According to the
gcc man page:
> -Og should be the optimization level of choice for the standard
> edit-compile-debug cycle, offering a reasonable level of optimization
> while maintaining fast compilation and a good debugging experience.
This optimization level is roughly -O1 minus a few additional
optimizations. It provides a noticably better debugging experience, with
many fewer variables <optimized out>.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -689,6 +689,10 @@ ifdef CONFIG_CC_OPTIMIZE_FOR_SPEED KBUILD_CFLAGS += -O2 endif +ifdef CONFIG_CC_OPTIMIZE_FOR_DEBUG +KBUILD_CFLAGS += -Og +endif + LTO_CFLAGS := LTO_FINAL_LDFLAGS := export LTO_CFLAGS LTO_FINAL_LDFLAGS |