Better scripts/build.*.sh compatibility.
This commit is contained in:
parent
879e160ba3
commit
4b682b6633
@ -96,6 +96,10 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_STATIC)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if (NOT WIN32)
|
||||
|
@ -13,7 +13,7 @@ tar -xzf hwloc-${HWLOC_VERSION}.tar.gz
|
||||
|
||||
cd hwloc-${HWLOC_VERSION}
|
||||
./configure --disable-shared --enable-static --disable-io --disable-libudev --disable-libxml2
|
||||
make -j$(nproc)
|
||||
cp -fr include/ ../../deps
|
||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||
cp -fr include ../../deps
|
||||
cp hwloc/.libs/libhwloc.a ../../deps/lib
|
||||
cd ..
|
19
scripts/build.hwloc1.sh
Executable file
19
scripts/build.hwloc1.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
HWLOC_VERSION="1.11.13"
|
||||
|
||||
mkdir -p deps
|
||||
mkdir -p deps/include
|
||||
mkdir -p deps/lib
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
wget https://download.open-mpi.org/release/hwloc/v1.11/hwloc-${HWLOC_VERSION}.tar.gz -O hwloc-${HWLOC_VERSION}.tar.gz
|
||||
tar -xzf hwloc-${HWLOC_VERSION}.tar.gz
|
||||
|
||||
cd hwloc-${HWLOC_VERSION}
|
||||
./configure --disable-shared --enable-static --disable-io --disable-libudev --disable-libxml2
|
||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||
cp -fr include ../../deps
|
||||
cp src/.libs/libhwloc.a ../../deps/lib
|
||||
cd ..
|
@ -13,8 +13,8 @@ tar -xzf libressl-${LIBRESSL_VERSION}.tar.gz
|
||||
|
||||
cd libressl-${LIBRESSL_VERSION}
|
||||
./configure --disable-shared
|
||||
make -j$(nproc)
|
||||
cp -fr include/ ../../deps
|
||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||
cp -fr include ../../deps
|
||||
cp crypto/.libs/libcrypto.a ../../deps/lib
|
||||
cp ssl/.libs/libssl.a ../../deps/lib
|
||||
cd ..
|
@ -13,8 +13,8 @@ tar -xzf openssl-${OPENSSL_VERSION}.tar.gz
|
||||
|
||||
cd openssl-${OPENSSL_VERSION}
|
||||
./config -no-shared -no-asm -no-zlib -no-comp -no-dgram -no-filenames -no-cms
|
||||
make -j$(nproc)
|
||||
cp -fr include/ ../../deps
|
||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||
cp -fr include ../../deps
|
||||
cp libcrypto.a ../../deps/lib
|
||||
cp libssl.a ../../deps/lib
|
||||
cd ..
|
@ -14,7 +14,7 @@ tar -xzf v${UV_VERSION}.tar.gz
|
||||
cd libuv-${UV_VERSION}
|
||||
sh autogen.sh
|
||||
./configure --disable-shared
|
||||
make -j$(nproc)
|
||||
cp -fr include/ ../../deps
|
||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||
cp -fr include ../../deps
|
||||
cp .libs/libuv.a ../../deps/lib
|
||||
cd ..
|
@ -1,4 +1,4 @@
|
||||
if (BUILD_STATIC AND XMRIG_OS_LINUX AND WITH_CUDA)
|
||||
if (BUILD_STATIC AND XMRIG_OS_UNIX AND WITH_CUDA)
|
||||
message(WARNING "CUDA backend is not compatible with static build, use -DWITH_CUDA=OFF to suppress this warning")
|
||||
|
||||
set(WITH_CUDA OFF)
|
||||
|
@ -1,4 +1,4 @@
|
||||
if (BUILD_STATIC AND XMRIG_OS_LINUX AND WITH_OPENCL)
|
||||
if (BUILD_STATIC AND XMRIG_OS_UNIX AND WITH_OPENCL)
|
||||
message(WARNING "OpenCL backend is not compatible with static build, use -DWITH_OPENCL=OFF to suppress this warning")
|
||||
|
||||
set(WITH_OPENCL OFF)
|
||||
|
Loading…
x
Reference in New Issue
Block a user