Page MenuHomePhabricator

D14064.id40806.diff
No OneTemporary

D14064.id40806.diff

diff --git a/cmake/platforms/Linux64.cmake b/cmake/platforms/Linux64.cmake
--- a/cmake/platforms/Linux64.cmake
+++ b/cmake/platforms/Linux64.cmake
@@ -7,9 +7,18 @@
# Set Corrosion Rust target
set(Rust_CARGO_TARGET "x86_64-unknown-linux-gnu")
+variable_watch($ENV{CROSS_GCC} $ENV{HOST} $ENV{CC})
+
# Cross compilers to use for C and C++
-set(CMAKE_C_COMPILER gcc)
-set(CMAKE_CXX_COMPILER g++)
+if(DEFINED ENV{CROSS_GCC})
+ # The guix build uses customized compilers
+ set(CMAKE_C_COMPILER $ENV{CROSS_GCC}/bin/x86_64-linux-gnu-gcc)
+ set(CMAKE_CXX_COMPILER $ENV{CROSS_GCC}/bin/x86_64-linux-gnu-g++)
+else()
+ set(CMAKE_C_COMPILER gcc)
+ set(CMAKE_CXX_COMPILER g++)
+endif()
+
set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN_PREFIX})
set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN_PREFIX})
diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh
--- a/contrib/guix/libexec/build.sh
+++ b/contrib/guix/libexec/build.sh
@@ -82,6 +82,7 @@
# Determine output paths to use in CROSS_* environment variables
CROSS_GLIBC="$(store_path "mingw-w64-x86_64-winpthreads")"
CROSS_GCC="$(store_path "gcc-cross-${HOST}")"
+ export CROSS_GCC
CROSS_GCC_LIB_STORE="$(store_path "gcc-cross-${HOST}" lib)"
CROSS_GCC_LIBS=( "${CROSS_GCC_LIB_STORE}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one)
@@ -103,6 +104,7 @@
CROSS_GLIBC_STATIC="$(store_path "glibc-cross-${HOST}" static)"
CROSS_KERNEL="$(store_path "linux-libre-headers-cross-${HOST}")"
CROSS_GCC="$(store_path "gcc-cross-${HOST}")"
+ export CROSS_GCC
CROSS_GCC_LIB_STORE="$(store_path "gcc-cross-${HOST}" lib)"
CROSS_GCC_LIBS=( "${CROSS_GCC_LIB_STORE}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one)
@@ -201,7 +203,8 @@
# Any toolchain file will work for building the source package, just pick the
# first one
cmake -GNinja .. \
- -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux64.cmake
+ -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux64.cmake \
+ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
ninja package_source
SOURCEDIST=$(echo bitcoin-abc-*.tar.gz)

File Metadata

Mime Type
text/plain
Expires
Thu, Feb 6, 17:28 (18 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5082777
Default Alt Text
D14064.id40806.diff (2 KB)

Event Timeline