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 <hauke@hauke-m.de>
This commit is contained in:
parent
558f0b563b
commit
f966e760b7
1 changed files with 4 additions and 2 deletions
|
@ -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; \
|
||||
|
|
Loading…
Reference in a new issue