diff mbox series

[u-boot,33/39] ARM: omap3: fix LTO for DM3730 (and possibly other omap3 boards)

Message ID 20210307042538.21229-34-marek.behun@nic.cz
State Superseded
Delegated to: Tom Rini
Headers show
Series U-Boot LTO (Sandbox + Some ARM boards) | expand

Commit Message

Marek Behún March 7, 2021, 4:25 a.m. UTC
Adam Ford says that DM3730 needs board.c compiled without LTO flags.

Also add clock.c, since it says in Makefile that it need different
flags.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Suggested-by: Adam Ford <aford173@gmail.com>
---
 arch/arm/mach-omap2/omap3/Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Adam Ford March 7, 2021, 10:40 a.m. UTC | #1
On Sat, Mar 6, 2021 at 10:26 PM Marek Behún <marek.behun@nic.cz> wrote:
>
> Adam Ford says that DM3730 needs board.c compiled without LTO flags.
>
> Also add clock.c, since it says in Makefile that it need different
> flags.
>
I managed to get the am3517_evm tested with the latest series, and it
boots just fine.

am3517_evm
Without LTO:

SPL         57255
U-Boot  664922

With LTO:
SPL          51497
U-Boot   642058

For a reduction in size of:
SPL         -5758 (-10.06%)
U-Boot   -22864 (-3.44%)

Tested-by: Adam Ford <aford173@gmail.com> #omap3_logic & am3517_evm

> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> Suggested-by: Adam Ford <aford173@gmail.com>
> ---
>  arch/arm/mach-omap2/omap3/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/omap3/Makefile b/arch/arm/mach-omap2/omap3/Makefile
> index 91ed8ebc9f..7d22f04bbf 100644
> --- a/arch/arm/mach-omap2/omap3/Makefile
> +++ b/arch/arm/mach-omap2/omap3/Makefile
> @@ -5,10 +5,12 @@
>
>  # If clock.c is compiled for Thumb2, then it fails on OMAP3530
>  CFLAGS_clock.o += -marm
> +CFLAGS_REMOVE_clock.o := $(LTO_CFLAGS)
>
>  obj-y  := lowlevel_init.o
>
>  obj-y  += board.o
> +CFLAGS_REMOVE_board.o := $(LTO_CFLAGS)
>  obj-y  += boot.o
>  obj-y  += clock.o
>  obj-y  += sys_info.o
> --
> 2.26.2
>
diff mbox series

Patch

diff --git a/arch/arm/mach-omap2/omap3/Makefile b/arch/arm/mach-omap2/omap3/Makefile
index 91ed8ebc9f..7d22f04bbf 100644
--- a/arch/arm/mach-omap2/omap3/Makefile
+++ b/arch/arm/mach-omap2/omap3/Makefile
@@ -5,10 +5,12 @@ 
 
 # If clock.c is compiled for Thumb2, then it fails on OMAP3530
 CFLAGS_clock.o += -marm
+CFLAGS_REMOVE_clock.o := $(LTO_CFLAGS)
 
 obj-y	:= lowlevel_init.o
 
 obj-y	+= board.o
+CFLAGS_REMOVE_board.o := $(LTO_CFLAGS)
 obj-y	+= boot.o
 obj-y	+= clock.o
 obj-y	+= sys_info.o