diff --git a/cbits/decaf/ed448goldilocks/decaf_all.c b/cbits/decaf/ed448goldilocks/decaf_all.c new file mode 100644 index 0000000..74d5f06 --- /dev/null +++ b/cbits/decaf/ed448goldilocks/decaf_all.c @@ -0,0 +1,3 @@ +/* Combined to avoid link failure on OpenBSD with --strip-unneeded, see #186 */ +#include "decaf.c" +#include "decaf_tables.c" diff --git a/cbits/decaf/tools/generate.sh b/cbits/decaf/tools/generate.sh index 3323f58..c2ef662 100755 --- a/cbits/decaf/tools/generate.sh +++ b/cbits/decaf/tools/generate.sh @@ -33,6 +33,10 @@ # * function posix_memalign is defined in order to avoid a warning on # Windows/MinGW. Hopefully it is not called. This definition is put # inside portable_endian.h because this file is already included. +# +# * files decaf.c and decaf_tables.c are compiled to a single object file +# decaf_all.o to avoid link failure on OpenBSD with --strip-unneeded +# and old versions of binutils (see #186) SRC_DIR="$1/src" DEST_DIR="`dirname "$0"`"/.. @@ -90,6 +94,12 @@ for CURVE in ed448goldilocks; do convert "$SRC_DIR"/GENERATED/c/$CURVE/decaf_tables.c "$DEST_DIR"/$CURVE convert "$SRC_DIR"/GENERATED/c/$CURVE/eddsa.c "$DEST_DIR"/$CURVE convert "$SRC_DIR"/GENERATED/c/$CURVE/scalar.c "$DEST_DIR"/$CURVE + + cat > "$DEST_DIR"/$CURVE/decaf_all.c <