]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: remove yasm since it's been replaced by nasm
authorChangcheng Liu <changcheng.liu@aliyun.com>
Wed, 28 Oct 2020 07:26:41 +0000 (15:26 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Thu, 29 Oct 2020 04:36:20 +0000 (12:36 +0800)
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
ceph.spec.in
cmake/modules/CheckYasm.cmake [deleted file]
debian/control
install-deps.sh
src/CMakeLists.txt
src/common/CMakeLists.txt
src/compressor/zlib/CMakeLists.txt
src/crypto/isa-l/CMakeLists.txt
src/erasure-code/isa/CMakeLists.txt
src/include/config-h.in.cmake
src/yasm-wrapper [deleted file]

index c0fcfb5edffa5d81741ac933218b40fe6ed6095c..151da808d084f0d5b361d60ad9b4cb22e8ff30b2 100644 (file)
@@ -178,7 +178,6 @@ BuildRequires:      which
 BuildRequires: xfsprogs
 BuildRequires: xfsprogs-devel
 BuildRequires: xmlstarlet
-BuildRequires: yasm
 BuildRequires: nasm
 %if 0%{with amqp_endpoint}
 BuildRequires:  librabbitmq-devel
diff --git a/cmake/modules/CheckYasm.cmake b/cmake/modules/CheckYasm.cmake
deleted file mode 100644 (file)
index 8adea67..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-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()
index 37633e9016cf922550cc8e0c2fe628a28f0d0f5d..b0014c54e214f0e461ec64181dd3be2a60c1aae9 100644 (file)
@@ -96,7 +96,6 @@ Build-Depends: cmake (>= 3.10.2),
                xfslibs-dev,
 # Make-Check   xfsprogs,
 # Make-Check   xmlstarlet,
-               yasm [amd64],
                nasm [amd64],
                zlib1g-dev,
 Standards-Version: 4.4.0
index c3a1b6a6b8794c055f2920c68e4d6d2d11bcbbba..146ae7189c63f52c608104b10f5d3db548b5a6b1 100755 (executable)
@@ -221,7 +221,6 @@ if [ x$(uname)x = xFreeBSDx ]; then
         devel/gperf \
         devel/gmake \
         devel/cmake \
-        devel/yasm \
         devel/nasm \
         devel/boost-all \
         devel/boost-python-libs \
index ff64052c95c134ceeb7c86b91ae4601bcb410adb..54722eea0225eea2d379998086eaeeaff79d963b 100644 (file)
@@ -155,16 +155,6 @@ if(HAVE_INTEL)
       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
index 3b45967ece37d9fed437fdb21013fc03122ddc1f..e7d4e659201cc76e2fa1d80129727d1fdf09cad4 100644 (file)
@@ -170,7 +170,6 @@ if(HAVE_INTEL)
   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
index 3d37cf40f26d312c811c85d5a5e70ca91a70229c..ade57cb08ee7e8c659cbfee8ee3d73b3d4be8cdb 100644 (file)
@@ -1,7 +1,6 @@
 # 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
index 31b6ea7ea56695904aa7a0d9f2c4db52f34ebcdb..2a2ec0bc0cb286f897779f9f5de080be46e14306 100644 (file)
@@ -1,5 +1,4 @@
 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
index 531b0124104e4a3d00f233ae069a06b605315878..2486692b843f2bad72ea1758600ea24c828516f0 100644 (file)
@@ -1,7 +1,6 @@
 # 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}")
index afc2449d80842eb15b2c8cb6b227fc581f9ae49a..f3931951322e180982ce8d7e89555e86cfc2ba27 100644 (file)
 /* 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
 
diff --git a/src/yasm-wrapper b/src/yasm-wrapper
deleted file mode 100755 (executable)
index a140092..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/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