aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Pascal <johan.pascal@linphone.org>2020-11-24 21:05:53 +0100
committerJohan Pascal <johan.pascal@linphone.org>2020-11-24 22:00:40 +0100
commit0bd56f5a1763cdd64b612f54a7ae3050b3a18e4e (patch)
tree57fd5fb28aa09c2e171be4a73c3b14d50ecd3324
parentRestore clang array checks (diff)
downloadgoldilocks-0bd56f5a1763cdd64b612f54a7ae3050b3a18e4e.tar.xz
goldilocks-0bd56f5a1763cdd64b612f54a7ae3050b3a18e4e.zip
Fix Xcode/cmake 3.19 build + cleaning
-rw-r--r--src/generator/curve25519/CMakeLists.txt10
-rw-r--r--src/generator/ed448goldilocks/CMakeLists.txt9
-rw-r--r--src/include/word.h4
3 files changed, 13 insertions, 10 deletions
diff --git a/src/generator/curve25519/CMakeLists.txt b/src/generator/curve25519/CMakeLists.txt
index 0edb165..d657b87 100644
--- a/src/generator/curve25519/CMakeLists.txt
+++ b/src/generator/curve25519/CMakeLists.txt
@@ -75,10 +75,13 @@ add_custom_command(
COMMENT "Generating code for include/decaf/ed255.hxx"
)
+add_custom_target(generatorCurve25519AndGenTablesCommon DEPENDS
+ ${GSOURCE_PATH}/c/curve25519/decaf.c
+ ${GSOURCE_PATH}/c/curve25519/scalar.c
+ )
add_custom_target(generatorCurve25519 DEPENDS
generatorP25519
- ${GSOURCE_PATH}/c/curve25519/scalar.c
- ${GSOURCE_PATH}/c/curve25519/decaf.c
+ generatorCurve25519AndGenTablesCommon
${GSOURCE_PATH}/c/curve25519/elligator.c
${GSOURCE_PATH}/c/curve25519/eddsa.c
${GSOURCE_PATH}/include/decaf/point_255.hxx
@@ -91,10 +94,11 @@ include_directories(
)
add_executable(decaf_gen_tables_curve25519 EXCLUDE_FROM_ALL ${GSOURCE_PATH}/c/curve25519/decaf_gen_tables.c
- ${GSOURCE_PATH}/c/curve25519/decaf.c
+ ${GSOURCE_PATH}/c/curve25519/decaf.c
${GSOURCE_PATH}/c/curve25519/scalar.c
${PROJECT_SOURCE_DIR}/src/utils.c
$<TARGET_OBJECTS:p25519>)
+add_dependencies(decaf_gen_tables_curve25519 generatorCurve25519AndGenTablesCommon)
add_custom_target(decaf_tables_curve25519
COMMAND decaf_gen_tables_curve25519 > ${PROJECT_SOURCE_DIR}/src/curve25519/decaf_tables.c
diff --git a/src/generator/ed448goldilocks/CMakeLists.txt b/src/generator/ed448goldilocks/CMakeLists.txt
index 1e31ee9..d5ea932 100644
--- a/src/generator/ed448goldilocks/CMakeLists.txt
+++ b/src/generator/ed448goldilocks/CMakeLists.txt
@@ -82,11 +82,13 @@ add_custom_command(
COMMENT "Generating code for include/decaf/ed448.hxx"
)
-
+add_custom_target(generatorEd448AndGenTablesCommon DEPENDS
+ ${GSOURCE_PATH}/c/ed448goldilocks/scalar.c
+ ${GSOURCE_PATH}/c/ed448goldilocks/decaf.c
+ )
add_custom_target(generatorEd448goldilocks DEPENDS
generatorP448
- ${GSOURCE_PATH}/c/ed448goldilocks/scalar.c
- ${GSOURCE_PATH}/c/ed448goldilocks/decaf.c
+ generatorEd448AndGenTablesCommon
${GSOURCE_PATH}/c/ed448goldilocks/elligator.c
${GSOURCE_PATH}/c/ed448goldilocks/eddsa.c
${GSOURCE_PATH}/include/decaf/point_448.hxx
@@ -103,6 +105,7 @@ add_executable(decaf_gen_tables_ed448goldilocks EXCLUDE_FROM_ALL ${GSOURCE_PATH}
${GSOURCE_PATH}/c/ed448goldilocks/scalar.c
${PROJECT_SOURCE_DIR}/src/utils.c
$<TARGET_OBJECTS:p448>)
+add_dependencies(decaf_gen_tables_ed448goldilocks generatorEd448AndGenTablesCommon)
add_custom_target(decaf_tables_ed448goldilocks
COMMAND decaf_gen_tables_ed448goldilocks > ${PROJECT_SOURCE_DIR}/src/ed448goldilocks/decaf_tables.c
diff --git a/src/include/word.h b/src/include/word.h
index 7eb4f2a..4bda137 100644
--- a/src/include/word.h
+++ b/src/include/word.h
@@ -50,16 +50,12 @@ extern int posix_memalign(void **, size_t, size_t);
#if (ARCH_WORD_BITS == 64)
typedef uint64_t word_t, mask_t;
- static const mask_t DECAF_MASK_ALL_SET = (mask_t)0xFFFFFFFFFFFFFFFF;
- static const mask_t DECAF_MASK_ALL_UNSET = (mask_t)0x0;
typedef __uint128_t dword_t;
typedef int32_t hsword_t;
typedef int64_t sword_t;
typedef __int128_t dsword_t;
#elif (ARCH_WORD_BITS == 32)
typedef uint32_t word_t, mask_t;
- static const mask_t DECAF_MASK_ALL_SET = (mask_t)0xFFFFFFFF;
- static const mask_t DECAF_MASK_ALL_UNSET = (mask_t)0x0;
typedef uint64_t dword_t;
typedef int16_t hsword_t;
typedef int32_t sword_t;