diff options
author | Richard Wiley <rwiley@nvidia.com> | 2012-08-07 10:42:51 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 12:31:30 -0700 |
commit | a50964d036333a9bbd91b6ba439778fbe06859f1 (patch) | |
tree | 02e174cadf3d93f459fbb79e411f49bb2fc8a8fb /Makefile | |
parent | 17ebeef6e03a86f10c7cc643f7de8a9cb8803927 (diff) |
kernel: add Kbuild option for kernel optimization level
Adds a kernel config option to lower the kernel compile optimization
level from O2 to O1 for clearer GDB debugging. Default on for simulation
builds, default off for others.
Change-Id: I17fd63b5b391984d28b275e516df89d6a223021c
Reviewed-on: http://git-master/r/121822
Reviewed-by: Chao Xu <cxu@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ken Adams <kadams@nvidia.com>
Tested-by: Richard Wiley <rwiley@nvidia.com>
Reviewed-by: Mark Stadler <mastadler@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
Rebase-Id: Ra7c14ac91b0cfbe441dbfea33f0d5b1a6fd44d5f
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -573,8 +573,12 @@ all: vmlinux ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) else +ifdef CONFIG_LESS_GCC_OPT +KBUILD_CLFAGS += -O1 +else KBUILD_CFLAGS += -O2 endif +endif # conserve stack if available # do this early so that an architecture can override it. |