]> git.dujemihanovic.xyz Git - u-boot.git/commit
PowerPC: Move -fPIC flag to common place
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
Mon, 6 Dec 2010 13:36:46 +0000 (14:36 +0100)
committerWolfgang Denk <wd@denx.de>
Mon, 11 Apr 2011 19:36:41 +0000 (21:36 +0200)
commit33ee4c92339ee386662c0ee2d221098c5cc8b07e
treeadcaaa9e8759a48d7a40c1476191ed840abd9888
parent7d2fade7b1cd08432d16f7af5b10a8d1c0213813
PowerPC: Move -fPIC flag to common place

The -fPIC flag belongs with -mrelocatable, move it there.
Also change -fPIC to -fpic as this produces smaller
binaries.
However, currently -mrelocatable promotes -fpic to -fPIC, a
fix for this is in upcoming gcc 4.6 or you can apply this small
patch to gcc:

diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 8da8410..e4b8280 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -227,7 +227,8 @@ do { \
     } \
  \
   else if (TARGET_RELOCATABLE) \
-    flag_pic = 2; \
+    if (!flag_pic) \
+      flag_pic = 2; \
 } while (0)

 #ifndef RS6000_BI_ARCH
--

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
13 files changed:
arch/powerpc/config.mk
arch/powerpc/cpu/74xx_7xx/config.mk
arch/powerpc/cpu/mpc512x/config.mk
arch/powerpc/cpu/mpc5xx/config.mk
arch/powerpc/cpu/mpc5xxx/config.mk
arch/powerpc/cpu/mpc8220/config.mk
arch/powerpc/cpu/mpc824x/config.mk
arch/powerpc/cpu/mpc8260/config.mk
arch/powerpc/cpu/mpc83xx/config.mk
arch/powerpc/cpu/mpc85xx/config.mk
arch/powerpc/cpu/mpc86xx/config.mk
arch/powerpc/cpu/mpc8xx/config.mk
arch/powerpc/cpu/ppc4xx/config.mk