[U-Boot] [PATCH] PowerPC: Move -fPIC flag to common place

Joakim Tjernlund joakim.tjernlund at transmode.se
Wed Apr 20 00:13:14 CEST 2011



Wolfgang Denk <wd at denx.de> wrote on 2011/04/20 00:05:27:

> From: Wolfgang Denk <wd at denx.de>
> To: Joakim Tjernlund <joakim.tjernlund at transmode.se>
> Cc: u-boot at lists.denx.de
> Date: 2011/04/20 00:05
> Subject: Re: [U-Boot] [PATCH] PowerPC: Move -fPIC flag to common place
>
> Dear Joakim Tjernlund,
>
> In message <OFC5A52DF3.355573B0-ONC1257877.0078430F-C1257877.0078910D at transmode.se> you wrote:
> >
> > > That means I will revert the two commits?
> >
> > One, you only claimed that:
> > > 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:
> > Broke all those 8xx boards.
>
> Yes, but you yorself pointed out that commit 337f5f5 missed a large
> number of boards, leaving the tree in a inconsistent state. Should we
> not revert that one as well?

It is not too bad, just not complete yet. Reverting all just makes
it harder to get it all done.
I still don't get why it broke really.
hmm, did you by any chance include my patches to gcc too?
if so I you should only have to fixup arch/powerpc/config.mk:
- PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections
- PLATFORM_RELFLAGS += $(call cc-option,-msingle-pic-base,)
+ PLATFORM_RELFLAGS += -fPIC -mrelocatable -ffunction-sections -fdata-sections



More information about the U-Boot mailing list