Skip to content

Commit 73d9230

Browse files
committed
guix: use GCC 11 for macOS builds
Note that this is just the native compiler, that is used to build the toolchain we use to build the actual binaries. Partially motivated by 29091.
1 parent 71b6319 commit 73d9230

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

contrib/guix/libexec/build.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ store_path() {
6161
# Set environment variables to point the NATIVE toolchain to the right
6262
# includes/libs
6363
NATIVE_GCC="$(store_path gcc-toolchain)"
64-
NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)"
6564

6665
unset LIBRARY_PATH
6766
unset CPATH
@@ -70,12 +69,21 @@ unset CPLUS_INCLUDE_PATH
7069
unset OBJC_INCLUDE_PATH
7170
unset OBJCPLUS_INCLUDE_PATH
7271

73-
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC_STATIC}/lib"
7472
export C_INCLUDE_PATH="${NATIVE_GCC}/include"
7573
export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
7674
export OBJC_INCLUDE_PATH="${NATIVE_GCC}/include"
7775
export OBJCPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
7876

77+
case "$HOST" in
78+
*darwin*)
79+
export LIBRARY_PATH="${NATIVE_GCC}/lib"
80+
;;
81+
*)
82+
NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)"
83+
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC_STATIC}/lib"
84+
;;
85+
esac
86+
7987
# Set environment variables to point the CROSS toolchain to the right
8088
# includes/libs for $HOST
8189
case "$HOST" in

contrib/guix/manifest.scm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,8 @@ inspecting signatures in Mach-O binaries.")
527527
(list gcc-toolchain-12 "static")
528528
(make-bitcoin-cross-toolchain target)))
529529
((string-contains target "darwin")
530-
(list ;; Native GCC 10 toolchain
531-
gcc-toolchain-10
532-
(list gcc-toolchain-10 "static")
530+
(list ;; Native GCC 11 toolchain
531+
gcc-toolchain-11
533532
binutils
534533
clang-toolchain-17
535534
cmake-minimal

0 commit comments

Comments
 (0)