[Buildroot] [PATCH] libmemcached: don't use -fPIE and -pie with FLAT binaries

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue May 12 11:26:32 UTC 2015

Dear Peter Korsgaard,

On Tue, 12 May 2015 00:19:14 +0200, Peter Korsgaard wrote:

> BINFMT_FLAT implies BR2_STATIC_LIBS and (elf) static libraries should
> also not be built with -fPIE / -pie, right?
> Is there any specific reason to only do this workaround for BINFMT_FLAT?

Actually, I'm a bit confused. Shouldn't FLAT binaries be PIE ? Since
there's no MMU, each binary will be loaded at a different address, so
binaries should be PIE, no?

But the original reason why I removed -pie is because of:


For the exact same error, Mike Frysinger says to remove the -pie flag.

Hum, http://www.kdvelectronics.eu/uClinux-cisco2500/exotica.html seems
to indicate that PIE is not required in all cases for FLAT binaries.

I would tend to trust Mike Frysinger on this, though :)

Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering

More information about the buildroot mailing list