Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Bricked
ville
Commits
6d1a98bd
Commit
6d1a98bd
authored
13 years ago
by
Dennis Rassmann
Committed by
Dennis Rassmann
12 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Makefile: adding config variable for Os/O2/O3 compilation
Conflicts: init/Kconfig
parent
cf16dfcd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
Makefile
Makefile
+5
-1
init/Kconfig
init/Kconfig
+12
-5
No files found.
Makefile
View file @
6d1a98bd
...
...
@@ -566,9 +566,13 @@ all: vmlinux
ifdef
CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS
+=
-Os
else
endif
ifdef
CONFIG_CC_OPTIMIZE_DEFAULT
KBUILD_CFLAGS
+=
-O2
endif
ifdef
CONFIG_CC_OPTIMIZE_ALOT
KBUILD_CFLAGS
+=
-O3
endif
include
$(srctree)/arch/$(SRCARCH)/Makefile
...
...
This diff is collapsed.
Click to expand it.
init/Kconfig
View file @
6d1a98bd
...
...
@@ -947,13 +947,20 @@ source "usr/Kconfig"
endif
choice
prompt "Optimization level"
default CC_OPTIMIZE_DEFAULT
config CC_OPTIMIZE_FOR_SIZE
bool "Optimize for size"
help
Enabling this option will pass "-Os" instead of "-O2" to gcc
resulting in a smaller kernel.
bool "Use -Os"
If unsure, say Y.
config CC_OPTIMIZE_DEFAULT
bool "Use -O2"
config CC_OPTIMIZE_ALOT
bool "Use -O3"
endchoice
config SYSCTL
bool
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment