diff options
Diffstat (limited to 'ffi/go/bls')
-rw-r--r-- | ffi/go/bls/bls.go | 4 | ||||
-rw-r--r-- | ffi/go/bls/config.h | 6 | ||||
-rw-r--r-- | ffi/go/bls/mcl.go | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/ffi/go/bls/bls.go b/ffi/go/bls/bls.go index cb7074c..90fc264 100644 --- a/ffi/go/bls/bls.go +++ b/ffi/go/bls/bls.go @@ -8,7 +8,9 @@ package bls #cgo bn384 LDFLAGS:-lbls384_dy #cgo bn384_256 CFLAGS:-DMCLBN_FP_UNIT_SIZE=6 -DMCLBN_FR_UNIT_SIZE=4 #cgo bn384_256 LDFLAGS:-lbls384_256_dy -#cgo LDFLAGS:-L../../../lib -lcrypto -lgmp -lgmpxx -lstdc++ +#cgo LDFLAGS:-L../../../lib -lbls384_dy +#cgo LDFLAGS:-lcrypto -lgmp -lgmpxx -lstdc++ +#include "config.h" #include <bls/bls.h> */ import "C" diff --git a/ffi/go/bls/config.h b/ffi/go/bls/config.h new file mode 100644 index 0000000..07e1481 --- /dev/null +++ b/ffi/go/bls/config.h @@ -0,0 +1,6 @@ +#pragma +// use bn384 unless tags is specified +#ifndef MCLBN_FP_UNIT_SIZE + #define MCLBN_FP_UNIT_SIZE 6 +#endif + diff --git a/ffi/go/bls/mcl.go b/ffi/go/bls/mcl.go index 776536f..a808bad 100644 --- a/ffi/go/bls/mcl.go +++ b/ffi/go/bls/mcl.go @@ -4,6 +4,7 @@ package bls #cgo bn256 CFLAGS:-DMCLBN_FP_UNIT_SIZE=4 #cgo bn384 CFLAGS:-DMCLBN_FP_UNIT_SIZE=6 #cgo bn384_256 CFLAGS:-DMCLBN_FP_UNIT_SIZE=6 -DMCLBN_FR_UNIT_SIZE=4 +#include "config.h" #include <mcl/bn.h> */ import "C" |