boost: build always with -std=gnu++14 with recent compilers. 3668/head
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 17 Dec 2016 16:52:32 +0000 (17:52 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 25 Dec 2016 16:52:51 +0000 (17:52 +0100)
Some parts of boost need at least C++11, activate -std=gnu++14
when possible and otherwise use -std=gnu++11 instated of using the
default which is -std=gnu++98.

This fixes the build for me when I build everything expect
boost-coroutine2 with gcc 5.4.0 on LEDE.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
libs/boost/Makefile

index fd87298b51e44620eba1d96eee4c44d62cc752a6..2704c0aeb6e629478272cac055e6b84fce7da16c 100644 (file)
@@ -18,7 +18,7 @@ include $(INCLUDE_DIR)/target.mk
 PKG_NAME:=boost
 PKG_VERSION:=1.62.0
 PKG_SOURCE_VERSION:=1_62_0
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://sourceforge.net/projects/boost/files/boost/$(PKG_VERSION)
@@ -336,6 +336,8 @@ TARGET_CFLAGS += \
        $(if $(CONFIG_PACKAGE_boost-python3), -I$(STAGING_DIR)/usr/include/python3.5/) \
        $(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC
 
+EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
+
 ifneq ($(findstring mips,$(ARCH)),)
     BOOST_ABI = o32
     ifneq ($(findstring 64,$(ARCH)),)
@@ -354,7 +356,7 @@ comma := ,
 define Build/Compile
        $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CPU_TYPE) $(CPU_SUBTYPE))
        ( cd $(PKG_BUILD_DIR) ; \
-               echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(if $(CONFIG_boost-coroutine2),-std=c++14,)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \
+               echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \
                $(if $(CONFIG_PACKAGE_boost-python3), \
                        echo "using python : 3.5 : $(STAGING_DIR_ROOT)/usr/bin/python3 : $(STAGING_DIR)/usr/include/python3.5/ ;" >> \
                                tools/build/src/user-config.jam; \