Re: [U-Boot] [PATCH] PowerPC: Change -fpic flag to -fPIC flag in the config.mk

On 04/17/2012 09:44 PM, Chunhe Lan wrote:
The -fPIC/-fpic flag belongs with -mrelocatable. The -fpic flag can limit the size of the GOT and produce smaller binaries, so it causes some GOT entries to be lost in the gcc 4.6 version. But -fPIC flag allows the maximum possible size of the GOT entries.
However, currently -mrelocatable promotes -fpic flag to -fPIC flag.
This reverts that portion of the commit 33ee4c92339ee386662c0ee2d221098c5cc8b07e.
Signed-off-by: Chunhe Lan Chunhe.Lan@freescale.com
Please provide a better description, not something partially copied from the commit message that you're partially reverting. If -mrelocatable promotes -fpic to -fPIC how does this change have any effect? One has to go back to the commit message of 33ee4c to see that this was a bug that was fixed in GCC 4.6, so it's no longer "currently" doing that.
What is the limit for -fpic? Do we get errors if we overflow, or does the toolchain silently generate a bad image (sounds like a bug if the latter)? What target are you seeing problems with?
Also, when (partially) reverting a patch, please include at least the subject line of the patch in addition to the SHA-1, and CC the author of the patch.
-Scott
arch/powerpc/config.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk index a307154..7c14ff6 100644 --- a/arch/powerpc/config.mk +++ b/arch/powerpc/config.mk @@ -25,7 +25,7 @@ CROSS_COMPILE ?= ppc_8xx-
CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 LDFLAGS_FINAL += --gc-sections -PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections +PLATFORM_RELFLAGS += -fPIC -mrelocatable -ffunction-sections -fdata-sections PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ PLATFORM_LDFLAGS += -n
participants (1)
-
Scott Wood