Skip to content

Commit

Permalink
Merge #6323: chore: bump dashbls subtree to 1.3.3
Browse files Browse the repository at this point in the history
02260cb build: stop tracking cmake dependency relic_conf.h.in (UdjinM6)
0210745 Squashed 'src/dashbls/' changes from 795660db76..4e070243ae (Odysseas Gabrielides)
314102e Revert "build: stop tracking cmake dependency relic_conf.h.in" (Odysseas Gabrielides)

Pull request description:

  ## Issue being fixed or feature implemented
  Bumped blsdash to version 1.3.3

  ## What was done?

  ## How Has This Been Tested?

  ## Breaking Changes

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  kwvg:
    utACK 02260cb
  UdjinM6:
    utACK 02260cb

Tree-SHA512: 5f45919d5cc8e2c2eb37427c4e3b110bf34884472f4de1e3cd0e6b6bd7fc71d71e7d63192e6a9a637f7181f2e16641dec3abc15cd41e1e5b7322185a2bc7a58e
  • Loading branch information
PastaPastaPasta committed Oct 10, 2024
2 parents 6157e67 + 02260cb commit 3f0c2ff
Show file tree
Hide file tree
Showing 17 changed files with 431 additions and 3,457 deletions.
2 changes: 2 additions & 0 deletions src/dashbls/.github/workflows/build-binds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ jobs:
cmake --build . -- -j 6
- name: Build Go bindings
# TODO: macos build is broken. Whoever needs this - please fix it and remove `if` below.
if: startsWith(matrix.os, 'ubuntu')
run: |
cd go-bindings
make
4 changes: 2 additions & 2 deletions src/dashbls/.github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos-11, ubuntu-20.04 ]
os: [ macos-latest, ubuntu-20.04 ]
builder: [ cmake, autotools ]
compiler:
- cc: gcc
Expand All @@ -47,7 +47,7 @@ jobs:
run: |
ls -l
export MACOSX_DEPLOYMENT_TARGET=10.14
brew install autoconf automake gmp pkg-config
brew install autoconf automake gmp libtool pkg-config
- name: Build library using CMake
if: startsWith(matrix.builder, 'cmake')
Expand Down
7 changes: 4 additions & 3 deletions src/dashbls/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ print-%: FORCE
ACLOCAL_AMFLAGS = -I build-aux/m4
.PHONY: deploy FORCE

AM_LDFLAGS = $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(CORE_LDFLAGS) $(GMP_LDFLAGS)
AM_CXXFLAGS = $(LIBTOOL_CXXFLAGS) $(HARDENED_CXXFLAGS) $(CORE_CXXFLAGS) $(PIC_FLAGS) $(PIE_FLAGS)
AM_CPPFLAGS = $(LIBTOOL_CPPFLAGS) $(HARDENED_CPPFLAGS) $(CORE_CPPFLAGS) $(PIC_FLAGS) $(GMP_CPPFLAGS)
AM_LDFLAGS = $(HARDENED_LDFLAGS) $(CORE_LDFLAGS) $(GMP_LDFLAGS)
AM_CFLAGS = $(DEBUG_FLAGS) $(HARDENED_FLAGS) $(CORE_FLAGS) $(WARN_FLAGS) $(NOWARN_FLAGS)
AM_CPPFLAGS = $(CORE_CPPFLAGS) $(GMP_CPPFLAGS)
AM_CXXFLAGS = $(DEBUG_FLAGS) $(HARDENED_FLAGS) $(CORE_FLAGS) $(WARN_FLAGS) $(NOWARN_FLAGS)
PTHREAD_FLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)

EXTRA_LIBRARIES =
Expand Down
2 changes: 1 addition & 1 deletion src/dashbls/Makefile.relic.include
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ librelic_la_SOURCES = \

librelic_la_CPPFLAGS = $(AM_CPPFLAGS) $(RELIC_CPPFLAGS) $(RELIC_INCLUDES)
librelic_la_CXXFLAGS = $(AM_CXXFLAGS)
librelic_la_CFLAGS = $(AM_CFLAGS) $(WARN_CFLAGS) $(NOWARN_CFLAGS)
librelic_la_CFLAGS = $(AM_CFLAGS)
librelic_la_LDFLAGS = $(AM_LDFLAGS)

noinst_LTLIBRARIES += $(LIBRELIC)
47 changes: 24 additions & 23 deletions src/dashbls/apple.rust.deps.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
set -x
set -e
# "x86_64-apple-ios"
# "aarch64-apple-ios"
# "aarch64-apple-ios-sim"
Expand Down Expand Up @@ -51,22 +52,20 @@ version_min_flag() {

prepare() {
download_gmp() {
GMP_VERSION="6.2.1"
GMP_VERSION="6.3.0"
CURRENT_DIR=$(pwd)
echo "$CURRENT_DIR"
# shellcheck disable=SC2039,SC2164
pushd ${BUILD}
mkdir -p "contrib"
if [ ! -s "contrib/gmp-${GMP_VERSION}.tar.bz2" ]; then
curl -L -o "contrib/gmp-${GMP_VERSION}.tar.bz2" https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.bz2
curl -L -o "contrib/gmp-${GMP_VERSION}.tar.bz2" https://ftp.gnu.org/gnu/gmp/gmp-${GMP_VERSION}.tar.bz2
fi
rm -rf "contrib/gmp"
# shellcheck disable=SC2039,SC2164
pushd contrib
tar xfj "gmp-${GMP_VERSION}.tar.bz2"
mv gmp-${GMP_VERSION} gmp
rm gmp/compat.c && cp ../../contrib/gmp-patch-6.2.1/compat.c gmp/compat.c
rm gmp/longlong.h && cp ../../contrib/gmp-patch-6.2.1/longlong.h gmp/longlong.h
# shellcheck disable=SC2039,SC2164
popd #contrib
# shellcheck disable=SC2039,SC2164
Expand All @@ -88,10 +87,10 @@ prepare() {
download_relic() {
CURRENT_DIR=$(pwd)
echo "$CURRENT_DIR"
mkdir -p "${CURRENT_DIR}/${BUILD}/contrib"
if [ ! -s "${CURRENT_DIR}/${BUILD}/contrib/relic" ]; then
mkdir -p "${CURRENT_DIR}/${BUILD}/depends"
if [ ! -s "${CURRENT_DIR}/${BUILD}/depends/relic" ]; then
# shellcheck disable=SC2039,SC2164
pushd "${CURRENT_DIR}/${BUILD}/contrib"
pushd "${CURRENT_DIR}/${BUILD}/depends"
git clone --depth 1 --branch "feat/ios-support" https://github.com/pankcuf/relic
# shellcheck disable=SC2039,SC2164
pushd relic
Expand All @@ -100,7 +99,7 @@ prepare() {
# shellcheck disable=SC2039,SC2164
popd #relic
# shellcheck disable=SC2039,SC2164
popd #contrib
popd #depends
fi
}
rm -rf ${BUILD}
Expand All @@ -115,7 +114,7 @@ build_gmp_arch() {
ARCH=$2
PFX=${PLATFORM}-${ARCH}
# why this works with this host only?
HOST=arm-apple-darwin
HOST=aarch64-apple-darwin
# shellcheck disable=SC2039,SC2164
pushd ${BUILD}
SDK=$(xcrun --sdk "$PLATFORM" --show-sdk-path)
Expand Down Expand Up @@ -143,7 +142,7 @@ CC="$CLANG" CFLAGS="$CFLAGS" CPPFLAGS="$CFLAGS" LDFLAGS="$CFLAGS" \
--host=${HOST} --prefix="${CURRENT_DIR}/gmplib-${PFX}" \
--disable-shared --enable-static --disable-assembly -v
EOF

chmod a+x "$CONFIGURESCRIPT"
sh "$CONFIGURESCRIPT"
rm "$CONFIGURESCRIPT"
Expand All @@ -154,6 +153,8 @@ EOF
make -j "$LOGICALCPU_MAX" &> "${CURRENT_DIR}"/log/gmplib-"${PFX}"-build.log
# shellcheck disable=SC2039
make install &> "${CURRENT_DIR}"/log/gmplib-"${PFX}"-install.log
#make check
#exit 1
# shellcheck disable=SC2039,SC2164
popd # gmp
# shellcheck disable=SC2039,SC2164
Expand Down Expand Up @@ -258,15 +259,15 @@ build_relic_arch() {
EXTRA_ARGS+=" -DARCH=X86"
elif [[ $ARCH = "x86_64" ]]; then
EXTRA_ARGS+=" -DARCH=X64"
else
EXTRA_ARGS+=" -DARCH=ARM"
if [[ $ARCH = "armv7s" ]]; then
EXTRA_ARGS+=" -DIOS_ARCH=armv7s"
elif [[ $ARCH = "armv7k" ]]; then
EXTRA_ARGS+=" -DIOS_ARCH=armv7k"
elif [[ $ARCH = "arm64_32" ]]; then
EXTRA_ARGS+=" -DIOS_ARCH=arm64_32"
fi
elif [[ $ARCH = "arm64" ]]; then
# Relic doesn't support aarch64 yet, "ARCH=ARM" is for ARM 32-bit architecture only
EXTRA_ARGS+=" -DIOS_ARCH=arm64 -DARCH="
elif [[ $ARCH = "armv7s" ]]; then
EXTRA_ARGS+=" -DIOS_ARCH=armv7s -DARCH=ARM"
elif [[ $ARCH = "armv7k" ]]; then
EXTRA_ARGS+=" -DIOS_ARCH=armv7k -DARCH=ARM"
elif [[ $ARCH = "arm64_32" ]]; then
EXTRA_ARGS+=" -DIOS_ARCH=arm64_32 -DARCH=ARM"
fi

CURRENT_DIR=$(pwd)
Expand All @@ -281,7 +282,7 @@ build_relic_arch() {
# shellcheck disable=SC2039,SC2164
popd # "$BUILDDIR"
# shellcheck disable=SC2039,SC2164
popd # contrib/relic
popd # depends/relic
}

build_bls_arch() {
Expand Down Expand Up @@ -311,7 +312,7 @@ build_bls_arch() {
clang -I"../contrib/relic/include" \
-I"../../depends/relic/include" \
-I"../../include/dashbls" \
-I"../relic-${PFX}/_deps/relic-build/include" \
-I"../relic-${PFX}/depends/relic/include" \
-I"../../src/" \
-I"../gmplib-${PFX}/include" \
-x c++ -std=c++14 -stdlib=libc++ -fembed-bitcode -arch "${ARCH}" -isysroot "${SDK}" "${EXTRA_ARGS}" \
Expand Down Expand Up @@ -360,8 +361,8 @@ build_target() {
rm -rf "build/artefacts/${BUILD_IN}"
mkdir -p "build/artefacts/${BUILD_IN}"
cp "build/gmplib-${PFX}/lib/libgmp.a" "build/artefacts/${BUILD_IN}"
cp "build/relic-${PFX}/_deps/relic-build/lib/librelic_s.a" "build/artefacts/${BUILD_IN}"
cp "build/relic-${PFX}/_deps/sodium-build/libsodium.a" "build/artefacts/${BUILD_IN}"
cp "build/relic-${PFX}/depends/relic/lib/librelic_s.a" "build/artefacts/${BUILD_IN}"
# cp "build/relic-${PFX}/depends/sodium/libsodium.a" "build/artefacts/${BUILD_IN}"
cp "build/bls-${PFX}/libbls.a" "build/artefacts/${BUILD_IN}"
# cp -rf build/bls-"${PFX}"/*.o build/artefacts/"${BUILD_IN}"/include
# cp -rf src/*.hpp build/artefacts/"${BUILD_IN}"/include
Expand Down
Loading

0 comments on commit 3f0c2ff

Please sign in to comment.