Add Hurd support for Makefile and cryptest.sh
IS_HURD in the makefile is to avoid complaints by some of the more eager GNU folks. We could do it using IS_LINUXpull/795/head
parent
83145ffed6
commit
ef1c8c2bb4
13
GNUmakefile
13
GNUmakefile
|
|
@ -61,7 +61,8 @@ ifeq ($(SYSTEMX),)
|
||||||
SYSTEMX := $(shell uname -s 2>/dev/null)
|
SYSTEMX := $(shell uname -s 2>/dev/null)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
IS_LINUX := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c -E "Linux|GNU|Hurd")
|
IS_LINUX := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "Linux")
|
||||||
|
IS_HURD := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c -E "GNU|Hurd")
|
||||||
IS_MINGW := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "MinGW")
|
IS_MINGW := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "MinGW")
|
||||||
IS_CYGWIN := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "Cygwin")
|
IS_CYGWIN := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "Cygwin")
|
||||||
IS_DARWIN := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "Darwin")
|
IS_DARWIN := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "Darwin")
|
||||||
|
|
@ -86,7 +87,7 @@ endif
|
||||||
|
|
||||||
# Enable shared object versioning for Linux and Solaris
|
# Enable shared object versioning for Linux and Solaris
|
||||||
HAS_SOLIB_VERSION ?= 0
|
HAS_SOLIB_VERSION ?= 0
|
||||||
ifneq ($(IS_LINUX)$(IS_SUN),00)
|
ifneq ($(IS_LINUX)$(IS_HURD)$(IS_SUN),000)
|
||||||
HAS_SOLIB_VERSION := 1
|
HAS_SOLIB_VERSION := 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
@ -822,13 +823,13 @@ endif # SunOS
|
||||||
# LDLIBS += -lnsl -lsocket
|
# LDLIBS += -lnsl -lsocket
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ifeq ($(IS_LINUX),1)
|
ifneq ($(IS_LINUX)$(IS_HURD),00)
|
||||||
ifeq ($(findstring -fopenmp,$(CXXFLAGS)),-fopenmp)
|
ifeq ($(findstring -fopenmp,$(CXXFLAGS)),-fopenmp)
|
||||||
ifeq ($(findstring -lgomp,$(LDLIBS)),)
|
ifeq ($(findstring -lgomp,$(LDLIBS)),)
|
||||||
LDLIBS += -lgomp
|
LDLIBS += -lgomp
|
||||||
endif # LDLIBS
|
endif # LDLIBS
|
||||||
endif # OpenMP
|
endif # OpenMP
|
||||||
endif # IS_LINUX
|
endif # IS_LINUX or IS_HURD
|
||||||
|
|
||||||
# Add -errtags=yes to get the name for a warning suppression
|
# Add -errtags=yes to get the name for a warning suppression
|
||||||
ifneq ($(SUN_COMPILER),0) # override flags for CC Sun C++ compiler
|
ifneq ($(SUN_COMPILER),0) # override flags for CC Sun C++ compiler
|
||||||
|
|
@ -1012,7 +1013,7 @@ ifeq ($(HAS_SOLIB_VERSION),1)
|
||||||
# Different patchlevels and minors are compatible since 6.1
|
# Different patchlevels and minors are compatible since 6.1
|
||||||
SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR)
|
SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR)
|
||||||
# Linux uses -Wl,-soname
|
# Linux uses -Wl,-soname
|
||||||
ifeq ($(IS_LINUX),1)
|
ifneq ($(IS_LINUX)$(IS_HURD),00)
|
||||||
# Linux uses full version suffix for shared library
|
# Linux uses full version suffix for shared library
|
||||||
SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
|
SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
|
||||||
SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
|
SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
|
||||||
|
|
@ -1397,7 +1398,7 @@ ifneq ($(IS_DARWIN),0)
|
||||||
$(CP) cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER)
|
$(CP) cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER)
|
||||||
hdiutil makehybrid -iso -joliet -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER)
|
hdiutil makehybrid -iso -joliet -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER)
|
||||||
@-$(RM) -r $(PWD)/cryptopp$(LIB_VER)
|
@-$(RM) -r $(PWD)/cryptopp$(LIB_VER)
|
||||||
else ifneq ($(IS_LINUX),0)
|
else ifneq ($(IS_LINUX)$(IS_HURD),00)
|
||||||
$(MKDIR) $(PWD)/cryptopp$(LIB_VER)
|
$(MKDIR) $(PWD)/cryptopp$(LIB_VER)
|
||||||
$(CP) cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER)
|
$(CP) cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER)
|
||||||
genisoimage -q -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER)
|
genisoimage -q -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER)
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,7 @@ fi
|
||||||
THIS_SYSTEM=$(uname -s 2>&1)
|
THIS_SYSTEM=$(uname -s 2>&1)
|
||||||
IS_AIX=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c aix)
|
IS_AIX=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c aix)
|
||||||
IS_DARWIN=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c darwin)
|
IS_DARWIN=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c darwin)
|
||||||
|
IS_HURD=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c gnu)
|
||||||
IS_LINUX=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c linux)
|
IS_LINUX=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c linux)
|
||||||
IS_CYGWIN=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c cygwin)
|
IS_CYGWIN=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c cygwin)
|
||||||
IS_MINGW=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c mingw)
|
IS_MINGW=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c mingw)
|
||||||
|
|
@ -155,6 +156,8 @@ if [[ ("$IS_X86" -ne "0" || "$IS_X64" -ne "0") ]]; then
|
||||||
X86_CPU_FLAGS=$(grep Features /var/run/dmesg.boot)
|
X86_CPU_FLAGS=$(grep Features /var/run/dmesg.boot)
|
||||||
elif [[ ("$IS_DRAGONFLY" -ne "0") ]]; then
|
elif [[ ("$IS_DRAGONFLY" -ne "0") ]]; then
|
||||||
X86_CPU_FLAGS=$(dmesg | grep Features)
|
X86_CPU_FLAGS=$(dmesg | grep Features)
|
||||||
|
elif [[ ("$IS_HURD" -ne "0") ]]; then
|
||||||
|
: # Do nothing... cpuid is not helpful at the moment
|
||||||
else
|
else
|
||||||
X86_CPU_FLAGS="$($AWK '{IGNORECASE=1}{if ($1 == "flags"){print;exit}}' < /proc/cpuinfo | cut -f 2 -d ':')"
|
X86_CPU_FLAGS="$($AWK '{IGNORECASE=1}{if ($1 == "flags"){print;exit}}' < /proc/cpuinfo | cut -f 2 -d ':')"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,7 @@ fi
|
||||||
THIS_SYSTEM=$(uname -s 2>&1)
|
THIS_SYSTEM=$(uname -s 2>&1)
|
||||||
IS_AIX=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c aix)
|
IS_AIX=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c aix)
|
||||||
IS_DARWIN=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c darwin)
|
IS_DARWIN=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c darwin)
|
||||||
|
IS_HURD=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c gnu)
|
||||||
IS_LINUX=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c linux)
|
IS_LINUX=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c linux)
|
||||||
IS_CYGWIN=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c cygwin)
|
IS_CYGWIN=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c cygwin)
|
||||||
IS_MINGW=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c mingw)
|
IS_MINGW=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c mingw)
|
||||||
|
|
@ -155,6 +156,8 @@ if [[ ("$IS_X86" -ne "0" || "$IS_X64" -ne "0") ]]; then
|
||||||
X86_CPU_FLAGS=$(grep Features /var/run/dmesg.boot)
|
X86_CPU_FLAGS=$(grep Features /var/run/dmesg.boot)
|
||||||
elif [[ ("$IS_DRAGONFLY" -ne "0") ]]; then
|
elif [[ ("$IS_DRAGONFLY" -ne "0") ]]; then
|
||||||
X86_CPU_FLAGS=$(dmesg | grep Features)
|
X86_CPU_FLAGS=$(dmesg | grep Features)
|
||||||
|
elif [[ ("$IS_HURD" -ne "0") ]]; then
|
||||||
|
: # Do nothing... cpuid is not helpful at the moment
|
||||||
else
|
else
|
||||||
X86_CPU_FLAGS="$($AWK '{IGNORECASE=1}{if ($1 == "flags"){print;exit}}' < /proc/cpuinfo | cut -f 2 -d ':')"
|
X86_CPU_FLAGS="$($AWK '{IGNORECASE=1}{if ($1 == "flags"){print;exit}}' < /proc/cpuinfo | cut -f 2 -d ':')"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue