Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-8473

Power8 vector intrinsic CRC32 implementation

    • 5
    • Storage - Ra 2022-01-10

      Wiredtiger uses the header asm-ppc.h which is included in the GCC toolchain, but is not part of the LLVM toolchain (https://bugs.llvm.org/show_bug.cgi?id=28286). The header is GPL license. Possibly we could assume clang binary is in the same directory as gcc, and attempt to ask said GCC for its include path when doing a clang build.

      Alternatively if we could eliminate the need for the toolchain header that would be even more portable.

      Example of error:

      https://evergreen.mongodb.com/lobster/build/5203746b32cabd5a633fe2441b950707/all#bookmarks=0%2C1470&l=1&shareLine=1454

      /opt/mongodbtoolchain/revisions/toolchain_builder_rhel81_ppc64le_patch_45dd04db329b4089d56f6295cc2e6647b454c63c_61981ccc3627e006e7a153ac_21_11_19_21_53_57/v4/bin/clang -o build/optdebug/third_party/wiredtiger/src/checksum/software/checksum.dyn.o -c -std=c11 -Werror -fasynchronous-unwind-tables -ggdb -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -fno-omit-frame-pointer -fno-strict-aliasing -O2 -mcpu=power8 -mtune=power8 -mcmodel=medium -Wno-unused-local-typedefs -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -Wno-tautological-constant-compare -Wno-tautological-unsigned-zero-compare -Wno-tautological-unsigned-enum-zero-compare -Wno-unused-const-variable -Wno-missing-braces -Wno-inconsistent-missing-override -Wno-potentially-evaluated-expression -Wno-unused-lambda-capture -fstack-protector-strong -fno-builtin-memcmp -fPIC -DPCRE_STATIC -DMONGO_USE_VISIBILITY -D_XOPEN_SOURCE=700 -D_GNU_SOURCE -DBOOST_THREAD_VERSION=5 -DBOOST_THREAD_USES_DATETIME -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DBOOST_ENABLE_ASSERT_DEBUG_HANDLER -DBOOST_LOG_NO_SHORTHAND_NAMES -DBOOST_LOG_USE_NATIVE_SYSLOG -DBOOST_LOG_WITHOUT_THREAD_ATTR -DABSL_FORCE_ALIGNED_ACCESS -DBOOST_LOG_DYN_LINK -DHAVE_DIAGNOSTIC -DHAVE_VERBOSE -DHAVE_FALLOCATE -DHAVE_SYNC_FILE_RANGE -D_GNU_SOURCE -DHAVE_BUILTIN_EXTENSION_ZLIB -DHAVE_BUILTIN_EXTENSION_SNAPPY -DHAVE_BUILTIN_EXTENSION_ZSTD -Isrc/third_party/zstandard-1.4.4/zstd/lib -Isrc/third_party/zlib-1.2.11 -Isrc/third_party/snappy-1.1.7 -Ibuild/optdebug/third_party/wiredtiger -Isrc/third_party/wiredtiger -Ibuild/optdebug/third_party/wiredtiger/src/include -Isrc/third_party/wiredtiger/src/include -Ibuild/optdebug/third_party/wiredtiger/build_linux -Isrc/third_party/wiredtiger/build_linux src/third_party/wiredtiger/src/checksum/software/checksum.c 
      src/third_party/wiredtiger/src/checksum/power8/crc32.sx:29:10: fatal error: 'ppc-asm.h' file not found
      #include <ppc-asm.h>
               ^~~~~~~~~~~
      1 error generated.
      

      Previous discussion related to this issue inĀ https://jira.mongodb.org/browse/SERVER-53744

            Assignee:
            haribabu.kommi@mongodb.com Haribabu Kommi
            Reporter:
            daniel.moody@mongodb.com Daniel Moody
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: