PowerPC: Change -fpic flag to -fPIC flag in the config.mk
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 PowerPC: Change -fpic flag to -fPIC flag in the config.mk
Quoted 11 lines · Chunhe Lan
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
commit33ee4c92339ee386662c0ee2d221098c5cc8b07e.Signed-off-by Chunhe Lan <[email protected]>
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
Quoted 17 lines
--- arch/powerpc/config.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/powerpc/config.mk +1
-1@@ -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