diff --git a/pkg/relic/Makefile b/pkg/relic/Makefile index 0e7deaf10d66..cdb9e0bfda35 100644 --- a/pkg/relic/Makefile +++ b/pkg/relic/Makefile @@ -1,6 +1,6 @@ PKG_NAME=relic PKG_URL=https://github.com/relic-toolkit/relic.git -PKG_VERSION=cdcfaeef101d18c3231c3b46359c519dd72682e8 +PKG_VERSION=0b0442a8218df8d309266923f2dd5b9ae3b318ce PKG_LICENSE=LGPL-2.1 .PHONY: all @@ -15,16 +15,12 @@ all: $(PKG_BUILDDIR)/Makefile $(PKG_BUILDDIR)/Makefile: $(TOOLCHAIN_FILE) cd $(PKG_BUILDDIR) && \ - COMP="$(filter-out -Werror=old-style-definition -Werror=strict-prototypes, $(CFLAGS) ) " \ + COMP="$(filter-out -Werror -Werror=old-style-definition -Werror=strict-prototypes -std=gnu99, $(CFLAGS) ) " \ cmake -DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN_FILE) \ -DCHECK=off -DTESTS=0 -DBENCH=0 -DSHLIB=off -Wno-dev $(RELIC_CONFIG_FLAGS) . -$(TOOLCHAIN_FILE): fix_source - $(RIOTTOOLS)/cmake/generate-xcompile-toolchain.sh > $(TOOLCHAIN_FILE) - -fix_source: git-download - ./fix-util_print_wo_args.sh $(PKG_BUILDDIR) - ./fix-old-style-definitions.sh $(PKG_BUILDDIR) +$(TOOLCHAIN_FILE): git-download + $(RIOTBASE)/dist/tools/cmake/generate-xcompile-toolchain.sh > $(TOOLCHAIN_FILE) clean:: @rm -rf $(BINDIR)/$(PKG_NAME).a diff --git a/pkg/relic/fix-old-style-definitions.sh b/pkg/relic/fix-old-style-definitions.sh deleted file mode 100755 index 752422b96ce0..000000000000 --- a/pkg/relic/fix-old-style-definitions.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -. ${RIOTBASE}/pkg/relic/os_util.sh -find ${1} -type f -name "*.[ch]" -exec ${SEDBIN} 's/() {/(void) {/' {} + diff --git a/pkg/relic/fix-util_print_wo_args.sh b/pkg/relic/fix-util_print_wo_args.sh deleted file mode 100755 index a2355f3be69c..000000000000 --- a/pkg/relic/fix-util_print_wo_args.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -. ${RIOTBASE}/pkg/relic/os_util.sh -find ${1} -type f -name "*.[ch]" -exec ${SEDBIN} 's/util_print("\(.*\)")/util_print("\1", NULL)/g' {} + diff --git a/pkg/relic/patches/0001-fixed-signedness-of-counter-variable.patch b/pkg/relic/patches/0001-fixed-signedness-of-counter-variable.patch deleted file mode 100644 index c4dbd2917536..000000000000 --- a/pkg/relic/patches/0001-fixed-signedness-of-counter-variable.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 96f92673ac7b719f745958738e6652491bff2c3b Mon Sep 17 00:00:00 2001 -From: Oleg Hahm -Date: Sat, 28 Nov 2015 16:01:18 +0100 -Subject: fixed signedness of counter variable - ---- - src/cp/relic_cp_bdpe.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/cp/relic_cp_bdpe.c b/src/cp/relic_cp_bdpe.c -index c63621c..0a253a5 100644 ---- a/src/cp/relic_cp_bdpe.c -+++ b/src/cp/relic_cp_bdpe.c -@@ -160,7 +160,8 @@ int cp_bdpe_enc(uint8_t *out, int *out_len, dig_t in, bdpe_t pub) { - - int cp_bdpe_dec(dig_t *out, uint8_t *in, int in_len, bdpe_t prv) { - bn_t m, t, z; -- int i, size, result = STS_OK; -+ unsigned i; -+ int size, result = STS_OK; - - size = bn_size_bin(prv->n); - --- -2.6.2 - diff --git a/pkg/relic/patches/0002-don-t-redefine-ALIGN.patch b/pkg/relic/patches/0002-don-t-redefine-ALIGN.patch deleted file mode 100644 index 9cbc90ca040a..000000000000 --- a/pkg/relic/patches/0002-don-t-redefine-ALIGN.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 381a12925143ba4f6910c15ccb1fabb2a7c8c614 Mon Sep 17 00:00:00 2001 -From: Oleg Hahm -Date: Sat, 28 Nov 2015 15:54:24 +0100 -Subject: don't redefine ALIGN - ---- - include/relic_types.h | 9 +++++++-- - src/md/blake2.h | 10 +++------- - 2 files changed, 10 insertions(+), 9 deletions(-) - -diff --git a/include/relic_types.h b/include/relic_types.h -index afc4870..d9ef4f5 100644 ---- a/include/relic_types.h -+++ b/include/relic_types.h -@@ -129,9 +129,14 @@ typedef unsigned long long ull_t; - * Specification for aligned variables. - */ - #if ALIGN > 1 --#define align __attribute__ ((aligned (ALIGN))) -+# if defined(_MSC_VER) -+# define ALIGNME(x) __declspec(align(x)) -+# else -+# define ALIGNME(x) __attribute__((aligned(x))) -+# endif - #else --#define align /* empty*/ -+# define align /* empty*/ -+# define ALIGNME(x) /* empty*/ - #endif - - /** -diff --git a/src/md/blake2.h b/src/md/blake2.h -index f8aba83..48e314f 100644 ---- a/src/md/blake2.h -+++ b/src/md/blake2.h -@@ -17,11 +17,7 @@ - #include - #include - --#if defined(_MSC_VER) --#define ALIGN(x) __declspec(align(x)) --#else --#define ALIGN(x) __attribute__((aligned(x))) --#endif -+#include "relic_types.h" - - #if defined(__cplusplus) - extern "C" { -@@ -61,7 +57,7 @@ extern "C" { - uint8_t personal[BLAKE2S_PERSONALBYTES]; // 32 - } blake2s_param; - -- ALIGN( 64 ) typedef struct __blake2s_state -+ ALIGNME( 64 ) typedef struct __blake2s_state - { - uint32_t h[8]; - uint32_t t[2]; -@@ -86,7 +82,7 @@ extern "C" { - uint8_t personal[BLAKE2B_PERSONALBYTES]; // 64 - } blake2b_param; - -- ALIGN( 64 ) typedef struct __blake2b_state -+ ALIGNME( 64 ) typedef struct __blake2b_state - { - uint64_t h[8]; - uint64_t t[2]; --- -2.6.2 - diff --git a/pkg/relic/patches/0003-require-only-CMake-version-2.8.patch b/pkg/relic/patches/0003-require-only-CMake-version-2.8.patch deleted file mode 100644 index d8be0d262f24..000000000000 --- a/pkg/relic/patches/0003-require-only-CMake-version-2.8.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 814aec72218b194bdff51702fcecd3a06222efbd Mon Sep 17 00:00:00 2001 -From: Oleg Hahm -Date: Tue, 1 Dec 2015 17:42:16 +0100 -Subject: [PATCH 3/3] require only CMake version 2.8 - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8a26feb..2ca537a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,5 +1,5 @@ - project(RELIC C CXX) --cmake_minimum_required(VERSION 3.1) -+cmake_minimum_required(VERSION 2.8) - - set(PROJECT_VERSION_MAJOR "0") - set(PROJECT_VERSION_MINOR "4") --- -2.6.2 -