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

Peter Korsgaard peter at korsgaard.com
Tue May 12 13:02:37 UTC 2015


>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> writes:

Hi,

>> But my question was actually why we shouldn't disable PIE/PIC for static
 >> builds in general, and not just for flat mode?

 > Yes, -fPIC is not needed for static, but it works (it generates
 > slightly less efficient code though). But I'm fine with turning this
 > BR2_BINFMT_FLAT condition to a BR2_STATIC_LIBS condition.

 > But in practice, they are lots of packages that build code only once to
 > generate both a shared library and a static library, and they use -fPIC
 > for both. Guaranteeing that all static libraries have non-PIC code
 > would be a major effort.

 > Should I resend an updated patch, or will you commit after doing the
 > change?

I'll just fix it up when applying, thanks.

-- 
Venlig hilsen,
Peter Korsgaard 


More information about the buildroot mailing list