mpc83xx: Add support for -msingle-pic-base

-msingle-pic-base is a new gcc(from 4.6) option for ppc and
it reduces the size of my u-boot with about 4 KB.
While at it, add -fno-jump-tables too to save a
few more bytes.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Reviewed-by: Mario Six <mario.six@gdsys.cc>
Tested-by: Mario Six <mario.six@gdsys.cc> (on MPC8308)
This commit is contained in:
Joakim Tjernlund 2018-11-28 10:59:55 +01:00 committed by Mario Six
parent 2acc24fc28
commit 64d68dcdd7
2 changed files with 4 additions and 0 deletions

View File

@ -3,3 +3,4 @@
# Copyright 2004 Freescale Semiconductor, Inc.
PLATFORM_CPPFLAGS += -DCONFIG_E300 -msoft-float
PLATFORM_RELFLAGS += -msingle-pic-base -fno-jump-tables

View File

@ -288,6 +288,9 @@ in_flash:
/*------------------------------------------------------*/
GET_GOT /* initialize GOT access */
/* Needed for -msingle-pic-base */
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r30
/* r3: IMMR */
lis r3, CONFIG_SYS_IMMR@h