From e8d9d90b5bd93894f4ac3d905374d78268c8695e Mon Sep 17 00:00:00 2001 From: Sasha Zezulinsky Date: Thu, 30 Sep 2021 10:19:28 +0200 Subject: [PATCH] mingw hidden attribute --- .github/workflows/build.yml | 2 +- src/goldilocks_gen_tables.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f53aa22..84154cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: if: ${{ matrix.platform == 'windows-latest' }} shell: msys2 {0} run: | - autoreconf --install && ./configure && make lib + autoreconf --install && ./configure && make all - name: Upload uses: actions/upload-artifact@v2 with: diff --git a/src/goldilocks_gen_tables.c b/src/goldilocks_gen_tables.c index 0b4a989..045ec65 100644 --- a/src/goldilocks_gen_tables.c +++ b/src/goldilocks_gen_tables.c @@ -13,10 +13,10 @@ #include #include -#include "field.h" +#include "include/field.h" #include "f_field.h" -#include "goldilocks.h" -#include "api.h" +#include "public_include/goldilocks.h" +#include "include/api.h" static const unsigned char base_point_ser_for_pregen[SER_BYTES] = { 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33 @@ -102,7 +102,12 @@ int main(int argc, char **argv) { output = (const gf_s *)pre; printf("const gf API_NS(precomputed_base_as_fe)[%d]\n", (int)(API_NS(sizeof_precomputed_s) / sizeof(gf))); + +#ifdef __MINGW32__ + printf("VECTOR_ALIGNED = {\n "); +#else printf("VECTOR_ALIGNED __attribute__((visibility(\"hidden\"))) = {\n "); +#endif for (i=0; i < API_NS(sizeof_precomputed_s); i+=sizeof(gf)) { if (i) printf(",\n "); @@ -113,7 +118,13 @@ int main(int argc, char **argv) { output = (const gf_s *)pre_wnaf; printf("const gf API_NS(precomputed_wnaf_as_fe)[%d]\n", (int)(API_NS(sizeof_precomputed_wnafs) / sizeof(gf))); + +#ifdef __MINGW32__ + printf("VECTOR_ALIGNED = {\n "); +#else printf("VECTOR_ALIGNED __attribute__((visibility(\"hidden\"))) = {\n "); +#endif + for (i=0; i < API_NS(sizeof_precomputed_wnafs); i+=sizeof(gf)) { if (i) printf(",\n "); field_print(output++);