Skip to content

Commit 43be09b

Browse files
committed
depends: Switch from multilib to platform-specific toolchains
1 parent 4c1906a commit 43be09b

File tree

4 files changed

+27
-48
lines changed

4 files changed

+27
-48
lines changed

ci/test/00_setup_env_i686_multiprocess.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export HOST=i686-pc-linux-gnu
1010
export CONTAINER_NAME=ci_i686_multiprocess
1111
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
1212
export CI_IMAGE_PLATFORM="linux/amd64"
13-
export PACKAGES="llvm clang g++-multilib"
13+
export PACKAGES="llvm clang g++-i686-linux-gnu binutils-i686-linux-gnu"
1414
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
1515
export GOAL="install"
1616
export TEST_RUNNER_EXTRA="--v2transport"

contrib/guix/libexec/build.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,18 +165,12 @@ export TZ="UTC"
165165
# Depends Building #
166166
####################
167167

168-
# Build the depends tree, overriding variables that assume multilib gcc
168+
# Build the depends tree
169169
make -C depends --jobs="$JOBS" HOST="$HOST" \
170170
${V:+V=1} \
171171
${SOURCES_PATH+SOURCES_PATH="$SOURCES_PATH"} \
172172
${BASE_CACHE+BASE_CACHE="$BASE_CACHE"} \
173-
${SDK_PATH+SDK_PATH="$SDK_PATH"} \
174-
x86_64_linux_CC=x86_64-linux-gnu-gcc \
175-
x86_64_linux_CXX=x86_64-linux-gnu-g++ \
176-
x86_64_linux_AR=x86_64-linux-gnu-gcc-ar \
177-
x86_64_linux_RANLIB=x86_64-linux-gnu-gcc-ranlib \
178-
x86_64_linux_NM=x86_64-linux-gnu-gcc-nm \
179-
x86_64_linux_STRIP=x86_64-linux-gnu-strip
173+
${SDK_PATH+SDK_PATH="$SDK_PATH"}
180174

181175
case "$HOST" in
182176
*darwin*)

depends/README.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ To build dependencies for the current arch+OS:
44

55
make
66

7-
To build for another arch/OS:
7+
To build for another arch+OS:
88

99
make HOST=host-platform-triplet
1010

@@ -22,17 +22,17 @@ created. To use it during configuring Bitcoin Core:
2222

2323
Common `host-platform-triplet`s for cross compilation are:
2424

25-
- `i686-pc-linux-gnu` for Linux x86 32 bit
26-
- `x86_64-pc-linux-gnu` for Linux x86 64 bit
27-
- `x86_64-w64-mingw32` for Win64
25+
- `i686-linux-gnu` for Linux x86 32-bit
26+
- `x86_64-linux-gnu` for Linux x86 64-bit
27+
- `x86_64-w64-mingw32` for Windows
2828
- `x86_64-apple-darwin` for macOS
2929
- `arm64-apple-darwin` for ARM macOS
30-
- `arm-linux-gnueabihf` for Linux ARM 32 bit
31-
- `aarch64-linux-gnu` for Linux ARM 64 bit
32-
- `powerpc64-linux-gnu` for Linux POWER 64 bit (big endian)
33-
- `powerpc64le-linux-gnu` for Linux POWER 64 bit (little endian)
34-
- `riscv32-linux-gnu` for Linux RISC-V 32 bit
35-
- `riscv64-linux-gnu` for Linux RISC-V 64 bit
30+
- `arm-linux-gnueabihf` for Linux ARM 32-bit
31+
- `aarch64-linux-gnu` for Linux ARM 64-bit
32+
- `powerpc64-linux-gnu` for Linux POWER 64-bit (big endian)
33+
- `powerpc64le-linux-gnu` for Linux POWER 64-bit (little endian)
34+
- `riscv32-linux-gnu` for Linux RISC-V 32-bit
35+
- `riscv64-linux-gnu` for Linux RISC-V 64-bit
3636
- `s390x-linux-gnu` for Linux S390X
3737

3838
The paths are automatically configured and no other options are needed.
@@ -62,29 +62,35 @@ For more information, see [SDK Extraction](../contrib/macdeploy/README.md#sdk-ex
6262

6363
apt install g++-mingw-w64-x86-64-posix
6464

65-
#### For linux (including i386, ARM) cross compilation
65+
#### For Linux cross compilation
6666

67-
Common linux dependencies:
67+
Please note that package availability might depend on your arch+OS your are building on.
6868

69-
sudo apt-get install g++-multilib binutils
69+
For Linux x86 32-bit cross compilation:
7070

71-
For linux ARM cross compilation:
71+
sudo apt-get install g++-i686-linux-gnu binutils-i686-linux-gnu
72+
73+
For Linux x86 64-bit cross compilation:
74+
75+
sudo apt-get install g++-x86-64-linux-gnu binutils-x86-64-linux-gnu
76+
77+
For Linux ARM 32-bit cross compilation:
7278

7379
sudo apt-get install g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
7480

75-
For linux AARCH64 cross compilation:
81+
For Linux ARM 64-bit cross compilation:
7682

7783
sudo apt-get install g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
7884

79-
For linux POWER 64-bit cross compilation (there are no packages for 32-bit):
85+
For Linux POWER 64-bit cross compilation (there are no packages for 32-bit):
8086

8187
sudo apt-get install g++-powerpc64-linux-gnu binutils-powerpc64-linux-gnu g++-powerpc64le-linux-gnu binutils-powerpc64le-linux-gnu
8288

83-
For linux RISC-V 64-bit cross compilation (there are no packages for 32-bit):
89+
For Linux RISC-V 64-bit cross compilation (there are no packages for 32-bit):
8490

8591
sudo apt-get install g++-riscv64-linux-gnu binutils-riscv64-linux-gnu
8692

87-
For linux S390X cross compilation:
93+
For Linux S390X cross compilation:
8894

8995
sudo apt-get install g++-s390x-linux-gnu binutils-s390x-linux-gnu
9096

depends/hosts/linux.mk

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,6 @@ linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
1919
# https://libcxx.llvm.org/Hardening.html
2020
linux_debug_CPPFLAGS+=-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG
2121

22-
ifeq (86,$(findstring 86,$(build_arch)))
23-
i686_linux_CC=gcc -m32
24-
i686_linux_CXX=g++ -m32
25-
i686_linux_AR=ar
26-
i686_linux_RANLIB=ranlib
27-
i686_linux_NM=nm
28-
i686_linux_STRIP=strip
29-
30-
x86_64_linux_CC=gcc -m64
31-
x86_64_linux_CXX=g++ -m64
32-
x86_64_linux_AR=ar
33-
x86_64_linux_RANLIB=ranlib
34-
x86_64_linux_NM=nm
35-
x86_64_linux_STRIP=strip
36-
else
37-
i686_linux_CC=$(default_host_CC) -m32
38-
i686_linux_CXX=$(default_host_CXX) -m32
39-
x86_64_linux_CC=$(default_host_CC) -m64
40-
x86_64_linux_CXX=$(default_host_CXX) -m64
41-
endif
42-
4322
linux_cmake_system_name=Linux
4423
# Refer to doc/dependencies.md for the minimum required kernel.
4524
linux_cmake_system_version=3.17.0

0 commit comments

Comments
 (0)