[Buildroot] [PATCH] pinentry: fix build issue with gcc 5.x

Khem Raj raj.khem at gmail.com
Sat Aug 20 20:52:40 UTC 2016


> On Aug 20, 2016, at 1:27 PM, Thomas Petazzoni <thomas.petazzoni at free-electrons.com> wrote:
> 
> Hello,
> 
> On Sat, 20 Aug 2016 13:19:02 -0700, Khem Raj wrote:
> 
>>> +# pinentry uses some std::string functionality that needs C++11
>>> +# support when gcc >= 5.x. This should be removed when bumping
>>> +# pinentry, since newer versions no longer use std::string.
>>> +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y)
>>> +PINENTRY_CONF_ENV = CXXFLAGS="$(TARGET_CXXFLAGS) -std=gnu++11"
>>> +endif
>> 
>> Should this package be restricted to gcc5 and newer only, I assume
>> it will break with gcc 4.x too and c++11 may not be there, gcc5 atleast
>> has the support its just not default
> 
> We have lots of gcc 4.x toolchains, and we haven't had any build
> failure. I believe it builds fine with gcc 4.x.
> 
> The code requiring C++11 that causes the build failure with gcc 5.x is
> in libstdc++ itself. As I discussed with Yann on IRC, I don't really
> understand why some code in libstdc++ uses C++11, without gcc 5.x
> defaulting to C++11.
> 
> Maybe you have a clue?


it could be due to dual ABI in libstdc++ may be passing _GLIBCXX_USE_CXX11_ABI=0
is enough for such apps.

see https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html

for further reading.

You could also configure your libstdc++ to default to old ABI but I would not
recommend that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20160820/c7a25ad2/attachment-0001.asc>


More information about the buildroot mailing list