Fix ARM32 compile with Clang

This commit is contained in:
Jeffrey Walton 2020-08-09 03:11:12 -04:00
parent 5856c5bf4a
commit 82d8257b36
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
3 changed files with 7 additions and 2 deletions

View File

@ -460,8 +460,9 @@ endif
ifneq ($(IS_ARM32),0)
ifeq ($(DETECT_FEATURES),1)
# Clang needs an option to include <arm_neon.h>
TPROG = TestPrograms/test_arm_neon_header.cxx
TOPT =
TOPT = -march=armv7-a -mfpu=neon
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
THEADER += -DCRYPTOPP_ARM_NEON_HEADER=1

View File

@ -384,8 +384,9 @@ ifeq ($(DETECT_FEATURES),1)
NEON_FLAG = -march=armv7-a -mfloat-abi=$(FP_ABI) -mfpu=neon
endif
# Clang needs an option to include <arm_neon.h>
TPROG = TestPrograms/test_arm_neon_header.cxx
TOPT =
TOPT = $(NEON_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
THEADER += -DCRYPTOPP_ARM_NEON_HEADER=1

View File

@ -384,6 +384,9 @@ if [[ "$disable_asm" -eq 0 && "$IS_ARM32" -ne 0 ]]; then
if [[ "$IS_IOS" -ne 0 ]]; then
ARMV7_FLAG="-arch arm"
NEON_FLAG="-arch arm"
elif [[ "$CLANG_COMPILER" -ne 0 ]]; then
ARMV7_FLAG="-march=armv7"
NEON_FLAG="-march=armv7 -mfpu=neon"
else
ARMV7_FLAG="-march=armv7"
NEON_FLAG="-mfpu=neon"