Fix armv8l-unknown-linux-gnueabihf yet again

pull/853/head
Jeffrey Walton 2019-05-21 18:48:13 -04:00
parent 5e15b46234
commit cf85d768b4
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 27 additions and 16 deletions

View File

@ -23,6 +23,7 @@ CP ?= cp
MV ?= mv
RM ?= rm -f
GREP ?= grep
SED ?= sed
CHMOD ?= chmod
MKDIR ?= mkdir -p
@ -33,17 +34,17 @@ LDCONF ?= /sbin/ldconfig -n
ifneq ($(wildcard /usr/xpg4/bin/grep),)
GREP := /usr/xpg4/bin/grep
endif
ifneq ($(wildcard /usr/xpg4/bin/sed),)
SED := /usr/xpg4/bin/sed
endif
# Attempt to determine target machine, fallback to "this" machine.
# The target machine is the one the package runs on. Most people
# call this the "target", but not Autotools.
HOSTX := $(shell $(CXX) $(CXXFLAGS) -dumpmachine 2>/dev/null | cut -f 1 -d '-')
# Yet another Clang hack. I think the LLVM devs are making the shit up
# as they go. Also see https://github.com/weidai11/cryptopp/issues/831.
ifeq ($(HOSTX),armv8l-unknown-linux-gnueabihf)
HOSTX := armv7l-unknown-linux-gnueabihf
MACHINEX := $(shell $(CXX) $(CXXFLAGS) -dumpmachine 2>/dev/null)
ifeq ($(MACHINEX),armv8l-unknown-linux-gnueabihf)
MACHINEX := armv7l-unknown-linux-gnueabihf
endif
# Fallback
HOSTX := $(shell echo $(MACHINEX) | cut -f 1 -d '-')
ifeq ($(HOSTX),)
HOSTX := $(shell uname -m 2>/dev/null)
endif
@ -1364,14 +1365,14 @@ endif
.PHONY: trim
trim:
ifneq ($(IS_DARWIN),0)
sed -i '' -e's/[[:space:]]*$$//' *.supp *.txt *.sh .*.yml *.h *.cpp *.asm *.s *.S
sed -i '' -e's/[[:space:]]*$$//' *.sln *.vcxproj *.filters GNUmakefile GNUmakefile-cross
sed -i '' -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestPrograms/*.cxx TestScripts/*.*
$(SED) -i '' -e's/[[:space:]]*$$//' *.supp *.txt *.sh .*.yml *.h *.cpp *.asm *.s *.S
$(SED) -i '' -e's/[[:space:]]*$$//' *.sln *.vcxproj *.filters GNUmakefile GNUmakefile-cross
$(SED) -i '' -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestPrograms/*.cxx TestScripts/*.*
make convert
else
sed -i -e's/[[:space:]]*$$//' *.supp *.txt *.sh .*.yml *.h *.cpp *.asm *.s *.S
sed -i -e's/[[:space:]]*$$//' *.sln *.vcxproj *.filters GNUmakefile GNUmakefile-cross
sed -i -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestPrograms/*.cxx TestScripts/*.*
$(SED) -i -e's/[[:space:]]*$$//' *.supp *.txt *.sh .*.yml *.h *.cpp *.asm *.s *.S
$(SED) -i -e's/[[:space:]]*$$//' *.sln *.vcxproj *.filters GNUmakefile GNUmakefile-cross
$(SED) -i -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestPrograms/*.cxx TestScripts/*.*
make convert
endif

View File

@ -22,6 +22,7 @@ MV ?= mv
CHMOD ?= chmod
MKDIR ?= mkdir -p
GREP ?= grep
SED ?= sed
LN ?= ln -sf
LDCONF ?= /sbin/ldconfig -n
@ -31,9 +32,18 @@ IS_ANDROID ?= 0
IS_ARM_EMBEDDED ?= 0
IS_NEON ?= 0
# Include Cryptogams AES and SHA on Linux, but not iOS. TODO: check Android.
HOSTX := $(shell $(CXX) $(CXXFLAGS) -dumpmachine 2>/dev/null | cut -f 1 -d '-')
IS_LINUX := $(shell echo "$(HOSTX)" | $(GREP) -i -c "Linux")
# Yet another Clang hack. I think the LLVM devs are making the shit up
# as they go. Also see https://github.com/weidai11/cryptopp/issues/831.
MACHINEX := $(shell $(CXX) $(CXXFLAGS) -dumpmachine 2>/dev/null)
ifeq ($(MACHINEX),armv8l-unknown-linux-gnueabihf)
MACHINEX := armv7l-unknown-linux-gnueabihf
endif
HOSTX := $(shell echo $(MACHINEX) | cut -f 1 -d '-')
ifeq ($(HOSTX),)
HOSTX := $(shell uname -m 2>/dev/null)
endif
IS_LINUX := $(shell echo $(MACHINEX) | $(GREP) -i -c "Linux")
# Can be used by Android and Embeeded cross-compiles. Disable by default because
# Android and embedded users typically don't run this configuration.