guix: turn linux/win linker warnings into errors

Can do this now that the GUI has been split out.

riscv64-linux-gnu failus due to
https://github.com/boostorg/test/issues/345:
```bash
[102%] Linking CXX executable ../../bin/test_bitcoin
/gnu/store/r03804zpq5i6wsalx0yaqrr5jb7pqrmv-binutils-cross-riscv64-linux-gnu-2.46.0/bin/riscv64-linux-gnu-ld: CMakeFiles/test_bitcoin.dir/main.cpp.o: in function `boost::fpe::disable(unsigned int)':
/bitcoin/depends/riscv64-linux-gnu/boost/include/boost/test/impl/execution_monitor.ipp:1538:(.text+0x9dc8): warning: fedisableexcept is not implemented and will always fail
/gnu/store/r03804zpq5i6wsalx0yaqrr5jb7pqrmv-binutils-cross-riscv64-linux-gnu-2.46.0/bin/riscv64-linux-gnu-ld: CMakeFiles/test_bitcoin.dir/main.cpp.o: in function `boost::fpe::enable(unsigned int)':
/bitcoin/depends/riscv64-linux-gnu/boost/include/boost/test/impl/execution_monitor.ipp:1502:(.text+0x9d76): warning: feenableexcept is not implemented and will always fail
collect2: error: ld returned 1 exit status
```

Darwin could be done after something like
https://github.com/bitcoin/bitcoin/pull/35756.
This commit is contained in:
fanquake
2026-07-23 11:16:04 +01:00
parent fd7d4f2970
commit b12a70f330
3 changed files with 8 additions and 2 deletions

View File

@@ -65,6 +65,12 @@ esac
# LDFLAGS
HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$(glibc_dynamic_linker "$HOST") -Wl,-O2"
# Use LINK_WARNING_AS_ERROR when using CMake 4.x
case "$HOST" in
riscv64-linux-gnu) ;; # https://github.com/boostorg/test/issues/345
*) HOST_LDFLAGS="${HOST_LDFLAGS} -Wl,--fatal-warnings" ;;
esac
mkdir -p "$DISTSRC"
(
cd "$DISTSRC"

View File

@@ -54,7 +54,7 @@ HOST_CFLAGS+=" -fno-ident"
HOST_CXXFLAGS="$HOST_CFLAGS"
# LDFLAGS
HOST_LDFLAGS="-Wl,--no-insert-timestamp"
HOST_LDFLAGS="-Wl,--no-insert-timestamp -Wl,--fatal-warnings"
mkdir -p "$DISTSRC"
(

View File

@@ -53,7 +53,7 @@ HOST_CFLAGS+=" -fno-ident"
HOST_CXXFLAGS="$HOST_CFLAGS"
# LDFLAGS
HOST_LDFLAGS="-Wl,--no-insert-timestamp"
HOST_LDFLAGS="-Wl,--no-insert-timestamp -Wl,--fatal-warnings"
mkdir -p "$DISTSRC"
(