mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
utils/gz: Fix compilation on non-x86 archs
gen_crc_combine_table is now executed on every build, so it should not
fail on unsupported archs. The generated file will not contain data,
but this is fine since it should not be used.
Another problem is that u32 and u64 aliases were not visible in the #else
branch in crc_combine.cc
Message-Id: <1543864425-5650-1-git-send-email-tgrabiec@scylladb.com>
(cherry picked from commit 9a4c00beb7)
This commit is contained in:
committed by
Avi Kivity
parent
9d8507de09
commit
af6d4f40e1
@@ -52,13 +52,13 @@
|
||||
#include "crc_combine_table.hh"
|
||||
#include "utils/clmul.hh"
|
||||
|
||||
using u32 = uint32_t;
|
||||
using u64 = uint64_t;
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
|
||||
#include "barett.hh"
|
||||
|
||||
using u32 = uint32_t;
|
||||
using u64 = uint64_t;
|
||||
|
||||
/*
|
||||
* Calculates:
|
||||
*
|
||||
|
||||
@@ -20,12 +20,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
|
||||
#include "utils/clmul.hh"
|
||||
#include "barett.hh"
|
||||
|
||||
#include <iostream>
|
||||
#include <seastar/core/print.hh>
|
||||
|
||||
int main() {
|
||||
@@ -73,8 +74,14 @@ int main() {
|
||||
#else
|
||||
|
||||
int main() {
|
||||
std::cerr << "Not implemented for this arch!\n";
|
||||
return 1;
|
||||
std::cout << "/*\n"
|
||||
" * Generated with gen_crc_combine_table.cc\n"
|
||||
" * DO NOT EDIT!\n"
|
||||
" */\n"
|
||||
"\n"
|
||||
"/* Not implemented for this CPU architecture. */\n"
|
||||
"\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user