BuildRequires: xfsprogs
BuildRequires: xfsprogs-devel
BuildRequires: xmlstarlet
-BuildRequires: yasm
BuildRequires: nasm
%if 0%{with amqp_endpoint}
BuildRequires: librabbitmq-devel
+++ /dev/null
-macro(check_yasm_support _object_format _support_x64 _support_avx2 _support_avx512)
- execute_process(
- COMMAND yasm -f "${_object_format}" ${CMAKE_SOURCE_DIR}/src/common/crc32c_intel_fast_asm.s -o /dev/null
- RESULT_VARIABLE no_yasm
- OUTPUT_QUIET
- ERROR_QUIET)
- if(NOT no_yasm)
- if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64")
- set(save_quiet ${CMAKE_REQUIRED_QUIET})
- set(CMAKE_REQUIRED_QUIET true)
- include(CheckCXXSourceCompiles)
- check_cxx_source_compiles("
- #if defined(__x86_64__) && defined(__ILP32__)
- #error x32
- #endif
- int main() {}
- " not_arch_x32)
- set(CMAKE_REQUIRED_QUIET ${save_quiet})
- if(not_arch_x32)
- set(${_support_x64} TRUE)
- execute_process(COMMAND yasm -f ${object_format} -i
- ${CMAKE_SOURCE_DIR}/src/isa-l/include/
- ${CMAKE_SOURCE_DIR}/src/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm
- -o /dev/null
- RESULT_VARIABLE rc
- OUTPUT_QUIET
- ERROR_QUIET)
- if(NOT rc)
- set(${_support_avx2} TRUE)
- endif(NOT rc)
- execute_process(COMMAND yasm -D HAVE_AS_KNOWS_AVX512 -f ${object_format}
- -i ${CMAKE_SOURCE_DIR}/src/isa-l/include/
- ${CMAKE_SOURCE_DIR}/src/isa-l/erasure_code/gf_vect_dot_prod_avx512.asm
- -o /dev/null
- RESULT_VARIABLE not_support_avx512
- OUTPUT_QUIET
- ERROR_QUIET)
- if(NOT not_support_avx512)
- set(${_support_avx512} TRUE)
- endif(NOT not_support_avx512)
- endif(not_arch_x32)
- endif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64")
- endif(NOT no_yasm)
- if(no_yasm)
- message(STATUS "Could NOT find Yasm")
- elseif(NOT not_arch_x32)
- message(STATUS "Found Yasm: but x86_64 with x32 ABI is not supported")
- endif()
- if(${_support_avx512})
- message(STATUS "Found Yasm: best -- capable of assembling AVX512")
- endif()
- if(${_support_avx2})
- message(STATUS "Foudd Yasm: better -- capable of assembling AVX2")
- endif()
- if(${_support_x64})
- message(STATUS "Found Yasm: good -- capable of assembling x86_64")
- endif()
-endmacro()
xfslibs-dev,
# Make-Check xfsprogs,
# Make-Check xmlstarlet,
- yasm [amd64],
nasm [amd64],
zlib1g-dev,
Standards-Version: 4.4.0
devel/gperf \
devel/gmake \
devel/cmake \
- devel/yasm \
devel/nasm \
devel/boost-all \
devel/boost-python-libs \
HAVE_NASM_X64_AVX2
HAVE_NASM_X64_AVX512)
endif()
- set(CMAKE_ASM_COMPILER ${PROJECT_SOURCE_DIR}/src/yasm-wrapper)
- if(NOT WIN32)
- # The native tools might be located even when cross compiling, which
- # might not work in this case (especially when targeting Windows).
- include(CheckYasm)
- check_yasm_support(${object_format}
- HAVE_YASM_X64
- HAVE_YASM_X64_AVX2
- HAVE_YASM_X64_AVX512)
- endif()
endif()
# require c++17
list(APPEND crc32_srcs
crc32c_intel_fast.c)
if(HAVE_NASM_X64)
- set(CMAKE_ASM_COMPILER ${PROJECT_SOURCE_DIR}/src/nasm-wrapper)
set(CMAKE_ASM_FLAGS "-i ${PROJECT_SOURCE_DIR}/src/isa-l/include/ ${CMAKE_ASM_FLAGS}")
list(APPEND crc32_srcs
${PROJECT_SOURCE_DIR}/src/isa-l/crc/crc32_iscsi_00.asm
# zlib
if(HAVE_INTEL_SSE4_1 AND HAVE_NASM_X64_AVX2 AND (NOT APPLE))
- set(CMAKE_ASM_COMPILER ${PROJECT_SOURCE_DIR}/src/nasm-wrapper)
set(CMAKE_ASM_FLAGS "-i ${PROJECT_SOURCE_DIR}/src/isa-l/igzip/ -i ${PROJECT_SOURCE_DIR}/src/isa-l/include/ ${CMAKE_ASM_FLAGS}")
set(zlib_sources
CompressionPluginZlib.cc
set(isal_dir ${CMAKE_SOURCE_DIR}/src/crypto/isa-l/isa-l_crypto)
-set(CMAKE_ASM_COMPILER ${PROJECT_SOURCE_DIR}/src/nasm-wrapper)
set(CMAKE_ASM_FLAGS "-i ${isal_dir}/aes/ -i ${isal_dir}/include/ ${CMAKE_ASM_FLAGS}")
set(isal_crypto_plugin_srcs
# ISA
set(isal_src_dir ${CMAKE_SOURCE_DIR}/src/isa-l)
include_directories(${isal_src_dir}/include)
-set(CMAKE_ASM_COMPILER ${PROJECT_SOURCE_DIR}/src/nasm-wrapper)
if(HAVE_NASM_X64_AVX2)
set(CMAKE_ASM_FLAGS "-i ${isal_src_dir}/include/ ${CMAKE_ASM_FLAGS}")
/* name_to_handle_at exists */
#cmakedefine HAVE_NAME_TO_HANDLE_AT
-/* we have a recent yasm and are x86_64 */
-#cmakedefine HAVE_YASM_X64
-
-/* yasm can also build the isa-l:avx2 */
-#cmakedefine HAVE_YASM_X64_AVX2
-
-/* yasm can also build the isa-l:avx512 */
-#cmakedefine HAVE_YASM_X64_AVX512
-
/* we have a recent nasm and are x86_64 */
#cmakedefine HAVE_NASM_X64
+++ /dev/null
-#!/bin/sh -e
-
-# libtool and yasm do not get along.
-# filter out any crap that libtool feeds us that yasm does not understand.
-#echo $0: got $*
-new=""
-touch=""
-while [ -n "$*" ]; do
- case "$1" in
- -f )
- shift
- new="$new -f $1"
- shift
- ;;
- -c | --param* | -m* | -pipe | -thread )
- # unknown options under both yasm & nasm
- shift
- ;;
- -D* )
- # ignore define Macro option
- shift
- ;;
- -g* )
- # ignore debug format
- shift
- ;;
- -W* )
- # Warning/error option
- shift
- ;;
- -MD | -MP | -E | -O* )
- # ignore option: nasm support, yasm not support
- shift
- ;;
- -MT )
- # ignore option: nasm support, yasm not support
- shift
- shift
- ;;
- -MF )
- shift
- touch="$1"
- shift
- ;;
- -f* )
- shift
- ;;
- -I | -isystem )
- shift
- new="$new -i $1"
- shift
- ;;
- * )
- # Keep other options
- new="$new $1"
- shift
- ;;
- esac
-done
-
-#echo $0: yasm $new
-yasm $new
-
-[ -n "$touch" ] && touch $touch
-
-true