Fix macOS Sequoia build with GCC 15 and update README
- Update compiler references from gcc-8 to gcc-15 across build system (build-mac.sh, darwin.mk, Makefile_custom) - Use system Rust (rustup) instead of bundled Rust 1.32.0 for librustzcash to fix rlib linker incompatibility on macOS Sequoia - Replace deprecated std::random_shuffle with std::shuffle (net.cpp, transaction_builder.cpp, wallet.cpp) - Fix -std=gnu17 -> -std=gnu++17 for C++ targets (libzcash, libhush) - Fix nodiscard warning in glibcxx_sanity.cpp - Replace deprecated OSMemoryBarrier with std::atomic_thread_fence in LevelDB - Add -Wno-error=deprecated-declarations to CXXFLAGS for third-party headers - Fix REMAINING_ARGS unbound variable in build.sh - Add --disable-tests handling to build-mac.sh - Update README with correct macOS build dependencies and instructions
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
export CC=gcc-8
|
||||
export CXX=g++-8
|
||||
export CC=gcc-15
|
||||
export CXX=g++-15
|
||||
export LIBTOOL=libtool
|
||||
export AR=ar
|
||||
export RANLIB=ranlib
|
||||
@@ -34,16 +34,24 @@ fi
|
||||
# If --enable-lcov is the first argument, enable lcov coverage support:
|
||||
LCOV_ARG=''
|
||||
HARDENING_ARG='--disable-hardening'
|
||||
TEST_ARG=''
|
||||
if [ "x${1:-}" = 'x--enable-lcov' ]
|
||||
then
|
||||
LCOV_ARG='--enable-lcov'
|
||||
HARDENING_ARG='--disable-hardening'
|
||||
shift
|
||||
elif [ "x${1:-}" = 'x--disable-tests' ]
|
||||
then
|
||||
TEST_ARG='--enable-tests=no'
|
||||
shift
|
||||
fi
|
||||
|
||||
TRIPLET=`./depends/config.guess`
|
||||
PREFIX="$(pwd)/depends/$TRIPLET"
|
||||
|
||||
# Ensure system Rust is in PATH for modern macOS compatibility
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
|
||||
make "$@" -C ./depends/ V=1 NO_QT=1
|
||||
|
||||
#BUILD CCLIB
|
||||
@@ -68,7 +76,7 @@ cd $WD
|
||||
|
||||
./autogen.sh
|
||||
CPPFLAGS="-I$PREFIX/include -arch x86_64" LDFLAGS="-L$PREFIX/lib -arch x86_64 -Wl,-no_pie" \
|
||||
CXXFLAGS='-arch x86_64 -I/usr/local/Cellar/gcc\@8/8.3.0/include/c++/8.3.0/ -I$PREFIX/include -fwrapv -fno-strict-aliasing -Wno-builtin-declaration-mismatch -Werror -g -Wl,-undefined -Wl,dynamic_lookup' \
|
||||
./configure --prefix="${PREFIX}" --with-gui=no "$HARDENING_ARG" "$LCOV_ARG"
|
||||
CXXFLAGS='-arch x86_64 -I/usr/local/Cellar/gcc/15.2.0_1/include/c++/15/ -I$PREFIX/include -fwrapv -fno-strict-aliasing -Wno-builtin-declaration-mismatch -Werror -Wno-error=deprecated-declarations -g -Wl,-undefined -Wl,dynamic_lookup' \
|
||||
./configure --prefix="${PREFIX}" --with-gui=no "$HARDENING_ARG" "$LCOV_ARG" $TEST_ARG
|
||||
|
||||
make "$@" V=1 NO_GTEST=1 STATIC=1
|
||||
|
||||
Reference in New Issue
Block a user