Commit e91df49fbb56858003ebe61191ae07b223a7b866
Committed by
Tom Rini
1 parent
3775dcd9c4
Exists in
v2017.01-smarct4x
and in
49 other branches
kbuild, blackfin: Add CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED
Many (but not all) of Blackfin boards give -O2 option to compile under lib/ directory. That means lib/ should be speed-optimized, whereas other parts should be size-optimized. We want to keep the same behavior, but do not want to parse board/*/config.mk again and again. We've got no choice but to invent a new method. CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED, if it is enabled, gives -O2 flag only for building under lib/ directory. Dirty codes which I had marked as "FIX ME" in board/${BOARD}/config.mk have been deleted. Instead, CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED has been defined in include/configs/${BOARD}.h. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Sonic Zhang <sonic.zhang@analog.com>
Showing 49 changed files with 26 additions and 212 deletions Side-by-side Diff
- board/bct-brettl2/config.mk
- board/bf518f-ezbrd/config.mk
- board/bf526-ezbrd/config.mk
- board/bf527-ad7160-eval/config.mk
- board/bf527-ezkit/config.mk
- board/bf527-sdp/config.mk
- board/bf533-ezkit/config.mk
- board/bf533-stamp/config.mk
- board/bf537-stamp/config.mk
- board/bf538f-ezkit/config.mk
- board/bf548-ezkit/config.mk
- board/bf561-acvilon/config.mk
- board/bf561-ezkit/config.mk
- board/br4/config.mk
- board/cm-bf527/config.mk
- board/cm-bf533/config.mk
- board/cm-bf537e/config.mk
- board/cm-bf537u/config.mk
- board/cm-bf548/config.mk
- board/cm-bf561/config.mk
- board/ip04/config.mk
- board/pr1/config.mk
- board/tcm-bf518/config.mk
- board/tcm-bf537/config.mk
- include/configs/bct-brettl2.h
- include/configs/bf518f-ezbrd.h
- include/configs/bf526-ezbrd.h
- include/configs/bf527-ad7160-eval.h
- include/configs/bf527-ezkit.h
- include/configs/bf527-sdp.h
- include/configs/bf533-ezkit.h
- include/configs/bf533-stamp.h
- include/configs/bf537-stamp.h
- include/configs/bf538f-ezkit.h
- include/configs/bf548-ezkit.h
- include/configs/bf561-acvilon.h
- include/configs/bf561-ezkit.h
- include/configs/br4.h
- include/configs/cm-bf527.h
- include/configs/cm-bf533.h
- include/configs/cm-bf537e.h
- include/configs/cm-bf537u.h
- include/configs/cm-bf548.h
- include/configs/cm-bf561.h
- include/configs/ip04.h
- include/configs/pr1.h
- include/configs/tcm-bf518.h
- include/configs/tcm-bf537.h
- lib/Makefile
board/bct-brettl2/config.mk
board/bf518f-ezbrd/config.mk
board/bf526-ezbrd/config.mk
board/bf527-ad7160-eval/config.mk
board/bf527-ezkit/config.mk
board/bf527-sdp/config.mk
board/bf533-ezkit/config.mk
board/bf533-stamp/config.mk
board/bf537-stamp/config.mk
... | ... | @@ -7,11 +7,6 @@ |
7 | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | 8 | # |
9 | 9 | |
10 | -# FIX ME | |
11 | -ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) | |
12 | -ccflags-y := -O2 | |
13 | -endif | |
14 | - | |
15 | 10 | # Set some default LDR flags based on boot mode. |
16 | 11 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 |
17 | 12 | LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6 |
board/bf538f-ezkit/config.mk
board/bf548-ezkit/config.mk
... | ... | @@ -7,11 +7,6 @@ |
7 | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | 8 | # |
9 | 9 | |
10 | -# FIX ME | |
11 | -ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) | |
12 | -ccflags-y := -O2 | |
13 | -endif | |
14 | - | |
15 | 10 | # Set some default LDR flags based on boot mode. |
16 | 11 | LDR_FLAGS-BFIN_BOOT_PARA := --dma 6 |
17 | 12 | LDR_FLAGS-BFIN_BOOT_FIFO := --dma 1 |
board/bf561-acvilon/config.mk
board/bf561-ezkit/config.mk
board/br4/config.mk
1 | -# | |
2 | -# Copyright (c) Switchfin Org. <dpn@switchfin.org> | |
3 | -# | |
4 | -# Copyright (c) 2005-2008 Analog Device Inc. | |
5 | -# | |
6 | -# (C) Copyright 2001 | |
7 | -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
8 | -# | |
9 | -# SPDX-License-Identifier: GPL-2.0+ | |
10 | -# | |
11 | - | |
12 | -# FIX ME | |
13 | -ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) | |
14 | -ccflags-y := -O2 | |
15 | -endif |
board/cm-bf527/config.mk
board/cm-bf533/config.mk
board/cm-bf537e/config.mk
board/cm-bf537u/config.mk
board/cm-bf548/config.mk
... | ... | @@ -7,11 +7,6 @@ |
7 | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | 8 | # |
9 | 9 | |
10 | -# FIX ME | |
11 | -ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) | |
12 | -ccflags-y := -O2 | |
13 | -endif | |
14 | - | |
15 | 10 | # Set some default LDR flags based on boot mode. |
16 | 11 | LDR_FLAGS-BFIN_BOOT_PARA := --dma 6 |
17 | 12 | LDR_FLAGS-BFIN_BOOT_FIFO := --dma 1 |
board/cm-bf561/config.mk
board/ip04/config.mk
... | ... | @@ -7,11 +7,6 @@ |
7 | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | 8 | # |
9 | 9 | |
10 | -# FIX ME | |
11 | -ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) | |
12 | -ccflags-y := -O2 | |
13 | -endif | |
14 | - | |
15 | 10 | # Set some default LDR flags based on boot mode. |
16 | 11 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 |
17 | 12 | LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6 |
board/pr1/config.mk
1 | -# | |
2 | -# Copyright (c) Switchfin Org. <dpn@switchfin.org> | |
3 | -# | |
4 | -# Copyright (c) 2005-2008 Analog Device Inc. | |
5 | -# | |
6 | -# (C) Copyright 2001 | |
7 | -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
8 | -# | |
9 | -# SPDX-License-Identifier: GPL-2.0+ | |
10 | -# | |
11 | - | |
12 | -# FIX ME | |
13 | -ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) | |
14 | -ccflags-y := -O2 | |
15 | -endif |
board/tcm-bf518/config.mk
board/tcm-bf537/config.mk
include/configs/bct-brettl2.h
include/configs/bf518f-ezbrd.h
include/configs/bf526-ezbrd.h
include/configs/bf527-ad7160-eval.h
include/configs/bf527-ezkit.h
include/configs/bf527-sdp.h
include/configs/bf533-ezkit.h
include/configs/bf533-stamp.h
include/configs/bf537-stamp.h
include/configs/bf538f-ezkit.h
include/configs/bf548-ezkit.h
include/configs/bf561-acvilon.h
include/configs/bf561-ezkit.h
include/configs/br4.h
... | ... | @@ -135,7 +135,7 @@ |
135 | 135 | #define CONFIG_BOOTCOMMAND "run nandboot" |
136 | 136 | #define CONFIG_BOOTDELAY 2 |
137 | 137 | #define CONFIG_LOADADDR 0x2000000 |
138 | - | |
138 | +#define CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED | |
139 | 139 | |
140 | 140 | /* |
141 | 141 | * Pull in common ADI header for remaining command/environment setup |
include/configs/cm-bf527.h
include/configs/cm-bf533.h
... | ... | @@ -97,7 +97,7 @@ |
97 | 97 | #define CONFIG_UART_CONSOLE 0 |
98 | 98 | #define CONFIG_BOOTCOMMAND "run flashboot" |
99 | 99 | #define FLASHBOOT_ENV_SETTINGS "flashboot=bootm 0x20040000\0" |
100 | - | |
100 | +#define CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED | |
101 | 101 | |
102 | 102 | /* |
103 | 103 | * Pull in common ADI header for remaining command/environment setup |
include/configs/cm-bf537e.h
... | ... | @@ -146,6 +146,7 @@ |
146 | 146 | "flashboot=flread 20040000 1000000 3c0000;" \ |
147 | 147 | "bootm 0x1000000\0" |
148 | 148 | #define CONFIG_BOARD_SIZE_LIMIT $$((384 * 1024)) |
149 | +#define CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED | |
149 | 150 | |
150 | 151 | /* |
151 | 152 | * Pull in common ADI header for remaining command/environment setup |
include/configs/cm-bf537u.h
... | ... | @@ -143,7 +143,7 @@ |
143 | 143 | "flashboot=flread 20040000 1000000 300000;" \ |
144 | 144 | "bootm 0x1000000\0" |
145 | 145 | #define CONFIG_BOARD_SIZE_LIMIT $$((384 * 1024)) |
146 | - | |
146 | +#define CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED | |
147 | 147 | |
148 | 148 | /* |
149 | 149 | * Pull in common ADI header for remaining command/environment setup |
include/configs/cm-bf548.h
include/configs/cm-bf561.h
... | ... | @@ -99,7 +99,7 @@ |
99 | 99 | #define CONFIG_UART_CONSOLE 0 |
100 | 100 | #define CONFIG_BOOTCOMMAND "run flashboot" |
101 | 101 | #define FLASHBOOT_ENV_SETTINGS "flashboot=bootm 0x20040000\0" |
102 | - | |
102 | +#define CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED | |
103 | 103 | |
104 | 104 | /* |
105 | 105 | * Pull in common ADI header for remaining command/environment setup |
include/configs/ip04.h
... | ... | @@ -132,6 +132,7 @@ |
132 | 132 | #define CONFIG_BAUDRATE 115200 |
133 | 133 | #define CONFIG_MISC_INIT_R /* needed for MAC address */ |
134 | 134 | #define CONFIG_UART_CONSOLE 0 |
135 | +#define CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED | |
135 | 136 | |
136 | 137 | #undef CONFIG_SHOW_BOOT_PROGRESS |
137 | 138 | /* Enable this if bootretry required; currently it's disabled */ |
include/configs/pr1.h
... | ... | @@ -135,7 +135,7 @@ |
135 | 135 | #define CONFIG_BOOTCOMMAND "run nandboot" |
136 | 136 | #define CONFIG_BOOTDELAY 2 |
137 | 137 | #define CONFIG_LOADADDR 0x2000000 |
138 | - | |
138 | +#define CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED | |
139 | 139 | |
140 | 140 | /* |
141 | 141 | * Pull in common ADI header for remaining command/environment setup |
include/configs/tcm-bf518.h
... | ... | @@ -116,7 +116,7 @@ |
116 | 116 | #define CONFIG_UART_CONSOLE 0 |
117 | 117 | #define CONFIG_BOOTCOMMAND "run flashboot" |
118 | 118 | #define FLASHBOOT_ENV_SETTINGS "flashboot=bootm 0x20040000\0" |
119 | - | |
119 | +#define CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED | |
120 | 120 | |
121 | 121 | /* |
122 | 122 | * Pull in common ADI header for remaining command/environment setup |
include/configs/tcm-bf537.h
... | ... | @@ -145,7 +145,7 @@ |
145 | 145 | "flashboot=flread 20040000 1000000 300000;" \ |
146 | 146 | "bootm 0x1000000\0" |
147 | 147 | #define CONFIG_BOARD_SIZE_LIMIT $$((384 * 1024)) |
148 | - | |
148 | +#define CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED | |
149 | 149 | |
150 | 150 | /* |
151 | 151 | * Pull in common ADI header for remaining command/environment setup |
lib/Makefile