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 MV ?= mv
RM ?= rm -f RM ?= rm -f
GREP ?= grep GREP ?= grep
SED ?= sed
CHMOD ?= chmod CHMOD ?= chmod
MKDIR ?= mkdir -p MKDIR ?= mkdir -p
@ -33,17 +34,17 @@ LDCONF ?= /sbin/ldconfig -n
ifneq ($(wildcard /usr/xpg4/bin/grep),) ifneq ($(wildcard /usr/xpg4/bin/grep),)
GREP := /usr/xpg4/bin/grep GREP := /usr/xpg4/bin/grep
endif 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 # 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. # as they go. Also see https://github.com/weidai11/cryptopp/issues/831.
ifeq ($(HOSTX),armv8l-unknown-linux-gnueabihf) MACHINEX := $(shell $(CXX) $(CXXFLAGS) -dumpmachine 2>/dev/null)
HOSTX := armv7l-unknown-linux-gnueabihf ifeq ($(MACHINEX),armv8l-unknown-linux-gnueabihf)
MACHINEX := armv7l-unknown-linux-gnueabihf
endif endif
# Fallback HOSTX := $(shell echo $(MACHINEX) | cut -f 1 -d '-')
ifeq ($(HOSTX),) ifeq ($(HOSTX),)
HOSTX := $(shell uname -m 2>/dev/null) HOSTX := $(shell uname -m 2>/dev/null)
endif endif
@ -1364,14 +1365,14 @@ endif
.PHONY: trim .PHONY: trim
trim: trim:
ifneq ($(IS_DARWIN),0) ifneq ($(IS_DARWIN),0)
sed -i '' -e's/[[:space:]]*$$//' *.supp *.txt *.sh .*.yml *.h *.cpp *.asm *.s *.S $(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:]]*$$//' *.sln *.vcxproj *.filters GNUmakefile GNUmakefile-cross
sed -i '' -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestPrograms/*.cxx TestScripts/*.* $(SED) -i '' -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestPrograms/*.cxx TestScripts/*.*
make convert make convert
else else
sed -i -e's/[[:space:]]*$$//' *.supp *.txt *.sh .*.yml *.h *.cpp *.asm *.s *.S $(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:]]*$$//' *.sln *.vcxproj *.filters GNUmakefile GNUmakefile-cross
sed -i -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestPrograms/*.cxx TestScripts/*.* $(SED) -i -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestPrograms/*.cxx TestScripts/*.*
make convert make convert
endif endif

View File

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