Browse Source

contrib: add instructions re cross-compiling libsecp to Linux x86

related: #6669

(note that instructions assume this commit as otherwise AUTOCONF_FLAGS is overwritten!)

based on https://stackoverflow.com/a/17748092
patch-4
SomberNight 5 years ago
parent
commit
21e46fb147
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      contrib/build_tools_util.sh
  2. 4
      contrib/make_libsecp256k1.sh

2
contrib/build_tools_util.sh

@ -119,8 +119,6 @@ export SOURCE_DATE_EPOCH=1530212462
export PYTHONHASHSEED=22 export PYTHONHASHSEED=22
# Set the build type, overridden by wine build # Set the build type, overridden by wine build
export BUILD_TYPE="${BUILD_TYPE:-$(uname | tr '[:upper:]' '[:lower:]')}" export BUILD_TYPE="${BUILD_TYPE:-$(uname | tr '[:upper:]' '[:lower:]')}"
# No additional autoconf flags by default
export AUTOCONF_FLAGS=""
# Add host / build flags if the triplets are set # Add host / build flags if the triplets are set
if [ -n "$GCC_TRIPLET_HOST" ] ; then if [ -n "$GCC_TRIPLET_HOST" ] ; then
export AUTOCONF_FLAGS="$AUTOCONF_FLAGS --host=$GCC_TRIPLET_HOST" export AUTOCONF_FLAGS="$AUTOCONF_FLAGS --host=$GCC_TRIPLET_HOST"

4
contrib/make_libsecp256k1.sh

@ -9,6 +9,10 @@
# $ GCC_TRIPLET_HOST="i686-w64-mingw32" ./contrib/make_libsecp256k1.sh # $ GCC_TRIPLET_HOST="i686-w64-mingw32" ./contrib/make_libsecp256k1.sh
# Or for a Windows x86_64 (64-bit) target, run: # Or for a Windows x86_64 (64-bit) target, run:
# $ GCC_TRIPLET_HOST="x86_64-w64-mingw32" ./contrib/make_libsecp256k1.sh # $ GCC_TRIPLET_HOST="x86_64-w64-mingw32" ./contrib/make_libsecp256k1.sh
#
# To cross-compile to Linux x86:
# sudo apt-get install gcc-multilib g++-multilib
# $ AUTOCONF_FLAGS="--host=i686-linux-gnu CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32" ./contrib/make_libsecp256k1.sh
LIBSECP_VERSION="dbd41db16a0e91b2566820898a3ab2d7dad4fe00" LIBSECP_VERSION="dbd41db16a0e91b2566820898a3ab2d7dad4fe00"

Loading…
Cancel
Save