package/cryptopp: fix build with gcc < 4.9

Fixes:
 - http://autobuild.buildroot.org/results/7e68f32e62c34497848f0f7fc1f12dba67bf44d0

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Arnout: re-order the assignments]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
(cherry picked from commit 0a0648226b)
[Peter: the existing patch in fact doesn't work as GCC 4.9 defines __AVX2__]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Fabrice Fontaine 2019-04-27 19:46:04 +02:00 committed by Peter Korsgaard
parent f1cdd80c4d
commit d22a31da4a

View File

@ -15,9 +15,16 @@ define HOST_CRYPTOPP_EXTRACT_CMDS
$(UNZIP) $(HOST_CRYPTOPP_DL_DIR)/$(CRYPTOPP_SOURCE) -d $(@D)
endef
HOST_CRYPTOPP_CXXFLAGS = $(HOST_CFLAGS) -fPIC
# _mm256_broadcastsi128_si256 has been added only in gcc 4.9
ifneq ($(BR2_HOST_GCC_AT_LEAST_4_9),y)
HOST_CRYPTOPP_CXXFLAGS += -DCRYPTOPP_DISABLE_AVX2
endif
HOST_CRYPTOPP_MAKE_OPTS = \
$(HOST_CONFIGURE_OPTS) \
CXXFLAGS="$(HOST_CXXFLAGS) -fPIC"
CXXFLAGS="$(HOST_CRYPTOPP_CXXFLAGS)"
define HOST_CRYPTOPP_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CRYPTOPP_MAKE_OPTS) shared