diff options
author | Bin Meng <bmeng@tinylab.org> | 2023-02-27 05:35:06 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2023-03-01 06:53:17 +0300 |
commit | 4b28afc98bbe406e3ad6f4a97d0fe96a882e83a1 (patch) | |
tree | 6a6b1941a635022a3c3d011cf86bc15a1a7d5540 /README.md | |
parent | 908be1b85c8ff0695ea226fbbf0ff24a779cdece (diff) | |
download | opensbi-4b28afc98bbe406e3ad6f4a97d0fe96a882e83a1.tar.xz |
make: Add a command line option for debugging OpenSBI
Add a new make command line option "make DEBUG=1" to prevent compiler
optimizations using -O2.
Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -298,6 +298,19 @@ NOTE: Using `BUILD_INFO=y` without specifying SOURCE_DATE_EPOCH will violate purpose, and should NOT be used in a product which follows "reproducible builds". +Building with optimization off for debugging +-------------------------------------------- + +When debugging OpenSBI, we may want to turn off the compiler optimization and +make debugging produce the expected results for a better debugging experience. +To build with optimization off we can just simply add `DEBUG=1`, like: +``` +make DEBUG=1 +``` + +This definition is ONLY for development and debug purpose, and should NOT be +used in a product build. + Contributing to OpenSBI ----------------------- |