Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build][Libs] Bump relic version and clean compile warnings #12

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ blsbench.*

runbench
runtest
runtest.log
runtest.trs
test-suite.log

**/.DS_Store

Expand Down
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ENDIF()

project(BLS)

set(BUILD_BLS_TESTS 1 CACHE INTEGER "")
set(BUILD_BLS_BENCHMARKS 1 CACHE INTEGER "")
set(BUILD_BLS_TESTS "1" CACHE STRING "")
set(BUILD_BLS_BENCHMARKS "1" CACHE STRING "")

message(STATUS "Build tests: ${BUILD_BLS_TESTS}")
message(STATUS "Build benchmarks: ${BUILD_BLS_BENCHMARKS}")
Expand Down Expand Up @@ -41,9 +41,9 @@ if(EMSCRIPTEN)
# emscripten needs arch set to be none since it can't compile assembly
set(ARCH "" CACHE STRING "")
# emscripten is a 32 bit compiler
set(WSIZE 32 CACHE INTEGER "")
set(WSIZE "32" CACHE STRING "Relic - Processor word size")
else()
set(WSIZE 64 CACHE INTEGER "")
set(WSIZE "64" CACHE STRING "Relic - Processor word size")
endif()

set(TIMER "CYCLE" CACHE STRING "")
Expand All @@ -54,7 +54,7 @@ set(SHLIB "OFF" CACHE STRING "")
set(MULTI "PTHREAD" CACHE STRING "")
set(DOCUM "off" CACHE STRING "")

set(FP_PRIME 381 CACHE INTEGER "")
set(FP_PRIME "381" CACHE STRING "Relic - Prime modulus size")

IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(SEED "UDEV" CACHE STRING "")
Expand All @@ -68,16 +68,16 @@ ELSE()
ENDIF()
set(STBIN "OFF" CACHE STRING "")

set(FP_METHD "INTEG;INTEG;INTEG;MONTY;LOWER;SLIDE" CACHE STRING "")
set(FP_METHD "INTEG;INTEG;INTEG;MONTY;LOWER;LOWER;SLIDE" CACHE STRING "")
set(CFLAGS "-O3 -funroll-loops -fomit-frame-pointer" CACHE STRING "")
set(FP_PMERS "off" CACHE STRING "")
set(FPX_METHD "INTEG;INTEG;LAZYR" CACHE STRING "")
set(EP_PLAIN "off" CACHE STRING "")
set(EP_SUPER "off" CACHE STRING "")
# Disable relic tests and benchmarks
set(TESTS 0 CACHE INTEGER "")
set(BENCH 0 CACHE INTEGER "")
set(QUIET 1 CACHE INTEGER "")
set(TESTS "0" CACHE STRING "Relic - Number of times each test is ran")
set(BENCH "0" CACHE STRING "Relic - Number of times each benchmark is ran")
set(QUIET "on" CACHE STRING "Relic - Build with printing disabled")

set(PP_EXT "LAZYR" CACHE STRING "")
set(PP_METHD "LAZYR;OATEP" CACHE STRING "")
Expand Down
33 changes: 30 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ACLOCAL_AMFLAGS = -I build-aux/m4

AM_CPPFLAGS = $(SODIUM_CPPFLAGS) $(SODIUM_CFLAGS)
AM_CXXFLAGS = $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS)
AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)

LIBRELIC = librelic.la
Expand Down Expand Up @@ -92,7 +93,8 @@ FP_SRCS = \
contrib/relic/src/fp/relic_fp_shift.c \
contrib/relic/src/fp/relic_fp_sqr.c \
contrib/relic/src/fp/relic_fp_srt.c \
contrib/relic/src/fp/relic_fp_util.c
contrib/relic/src/fp/relic_fp_util.c \
contrib/relic/src/fp/relic_fp_smb.c

FPX_SRCS = \
contrib/relic/src/fpx/relic_fp2_mul.c \
Expand Down Expand Up @@ -176,7 +178,20 @@ EPX_SRCS = \
contrib/relic/src/epx/relic_ep2_neg.c \
contrib/relic/src/epx/relic_ep2_norm.c \
contrib/relic/src/epx/relic_ep2_pck.c \
contrib/relic/src/epx/relic_ep2_util.c
contrib/relic/src/epx/relic_ep2_util.c \
contrib/relic/src/epx/relic_ep4_add.c \
contrib/relic/src/epx/relic_ep4_cmp.c \
contrib/relic/src/epx/relic_ep4_curve.c \
contrib/relic/src/epx/relic_ep4_dbl.c \
contrib/relic/src/epx/relic_ep4_frb.c \
contrib/relic/src/epx/relic_ep4_map.c \
contrib/relic/src/epx/relic_ep4_mul.c \
contrib/relic/src/epx/relic_ep4_mul_cof.c \
contrib/relic/src/epx/relic_ep4_mul_fix.c \
contrib/relic/src/epx/relic_ep4_mul_sim.c \
contrib/relic/src/epx/relic_ep4_neg.c \
contrib/relic/src/epx/relic_ep4_norm.c \
contrib/relic/src/epx/relic_ep4_util.c

EB_SRCS = \
contrib/relic/src/eb/relic_eb_add.c \
Expand Down Expand Up @@ -232,7 +247,11 @@ PP_SRCS = \
contrib/relic/src/pp/relic_pp_map_k12.c \
contrib/relic/src/pp/relic_pp_map_k48.c \
contrib/relic/src/pp/relic_pp_map_k54.c \
contrib/relic/src/pp/relic_pp_norm.c
contrib/relic/src/pp/relic_pp_norm.c \
contrib/relic/src/pp/relic_pp_add_k24.c \
contrib/relic/src/pp/relic_pp_dbl_k24.c \
contrib/relic/src/pp/relic_pp_exp_k24.c \
contrib/relic/src/pp/relic_pp_map_k24.c

PC_SRCS = \
contrib/relic/src/pc/relic_pc_core.c \
Expand Down Expand Up @@ -290,6 +309,7 @@ RELIC_SRCS += contrib/relic/src/low/gmp/relic_fp_mul_low.c
RELIC_SRCS += contrib/relic/src/low/gmp/relic_fp_rdc_low.c
RELIC_SRCS += contrib/relic/src/low/gmp/relic_fp_shift_low.c
RELIC_SRCS += contrib/relic/src/low/gmp/relic_fp_sqr_low.c
RELIC_SRCS += contrib/relic/src/low/easy/relic_fp_smb_low.c
endif

if WITH_FPX
Expand Down Expand Up @@ -368,6 +388,13 @@ RELIC_SRCS += contrib/relic/src/cp/relic_cp_bbs.c
RELIC_SRCS += contrib/relic/src/cp/relic_cp_zss.c
RELIC_SRCS += contrib/relic/src/cp/relic_cp_cmlhs.c
RELIC_SRCS += contrib/relic/src/cp/relic_cp_mklhs.c
RELIC_SRCS += contrib/relic/src/cp/relic_cp_ers.c
RELIC_SRCS += contrib/relic/src/cp/relic_cp_etrs.c
RELIC_SRCS += contrib/relic/src/cp/relic_cp_lapsi.c
RELIC_SRCS += contrib/relic/src/cp/relic_cp_pcdel.c
RELIC_SRCS += contrib/relic/src/cp/relic_cp_pok.c
RELIC_SRCS += contrib/relic/src/cp/relic_cp_smlers.c
RELIC_SRCS += contrib/relic/src/cp/relic_cp_sok.c
endif

if WITH_BC
Expand Down
Loading