diff options
author | Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua> | 2004-10-17 15:48:59 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-10-17 15:48:59 +0200 |
commit | 1ceee1b789e4c34b677eacabc39d99b0d6132d0f (patch) | |
tree | ce8a08fcfc668930fd1fd34691275e18d0c51c7f /init | |
parent | 78a14efa246b43d8bfcd64ffa214183a72f578b5 (diff) | |
download | history-1ceee1b789e4c34b677eacabc39d99b0d6132d0f.tar.gz |
kbuild: make gcc -align options .config-settable
With all alignment options set to 1 (minimum alignment),
I've got 5% smaller vmlinux compared to one built with
default code alignment.
Original implementation altered to use cc-option-align by sam.
From: Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig index 3f83eb24204959..01243fea6a6d82 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -303,6 +303,43 @@ config SHMEM option replaces shmem and tmpfs with the much simpler ramfs code, which may be appropriate on small systems without swap. +config CC_ALIGN_FUNCTIONS + int "Function alignment" + default 0 + help + Align the start of functions to the next power-of-two greater than n, + skipping up to n bytes. For instance, 32 aligns functions + to the next 32-byte boundary, but 24 would align to the next + 32-byte boundary only if this can be done by skipping 23 bytes or less. + Zero means use compiler's default. + +config CC_ALIGN_LABELS + int "Label alignment" + default 0 + help + Align all branch targets to a power-of-two boundary, skipping + up to n bytes like ALIGN_FUNCTIONS. This option can easily + make code slower, because it must insert dummy operations for + when the branch target is reached in the usual flow of the code. + Zero means use compiler's default. + +config CC_ALIGN_LOOPS + int "Loop alignment" + default 0 + help + Align loops to a power-of-two boundary, skipping up to n bytes. + Zero means use compiler's default. + +config CC_ALIGN_JUMPS + int "Jump alignment" + default 0 + help + Align branch targets to a power-of-two boundary, for branch + targets where the targets can only be reached by jumping, + skipping up to n bytes like ALIGN_FUNCTIONS. In this case, + no dummy operations need be executed. + Zero means use compiler's default. + endmenu # General setup config TINY_SHMEM |