From: Hauke Mehrtens Date: Sat, 17 Dec 2016 16:52:32 +0000 (+0100) Subject: boost: build always with -std=gnu++14 with recent compilers. X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=f966e760b739e7364829df4a4157d0b793fdceea;p=feed%2Fpackages.git boost: build always with -std=gnu++14 with recent compilers. 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 --- diff --git a/libs/boost/Makefile b/libs/boost/Makefile index fd87298b51..2704c0aeb6 100644 --- a/libs/boost/Makefile +++ b/libs/boost/Makefile @@ -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 : \"$(TARGET_CFLAGS)\" \"$(TARGET_CXXFLAGS) $(if $(CONFIG_boost-coroutine2),-std=c++14,)\" \"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \ + echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : \"$(TARGET_CFLAGS)\" \"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" \"$(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; \