From: Wolfgang Denk Date: Mon, 11 Apr 2011 21:37:00 +0200 Subject: [U-Boot] [PATCH] PowerPC: Move -fPIC flag to common place In-Reply-To: <1291642606-4290-1-git-send-email-Joakim.Tjernlund@transmode.se> References: <1291642606-4290-1-git-send-email-Joakim.Tjernlund@transmode.se> Message-ID: <20110411193700.A7EF9151F83@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Joakim Tjernlund, In message <1291642606-4290-1-git-send-email-Joakim.Tjernlund@transmode.se> you wrote: > 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 Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Intelligence without character is a dangerous thing." - G. Steinem