mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-07-28 09:08:40 +02:00
Merge bitcoin/bitcoin#35649: depends: move FreeBSD SDK handling to CI
22ac4ad949ci: ensure we use correct lld version in OpenBSD job (fanquake)495f43f7b3ci: FreeBSD 15.1 (fanquake)244739db9ddepends: move FreeBSD SDK handling to CI (fanquake) Pull request description: Followup to https://github.com/bitcoin/bitcoin/pull/35397#discussion_r3493131172, which partially reverts changes from #34491. Also, make sure we install the correct version of `lld` in OpenBSD job. ACKs for top commit: willcl-ark: ACK22ac4ad949Tree-SHA512: 0ce4bdebbeaf5a0c65f2fa4ae177853be246e69a8cab3943cad610a32e990b1d199ae3795d99b889a1d47dbc9c27e0311b026e26ce9f23312581056183dd0a1f
This commit is contained in:
@@ -9,13 +9,25 @@ export LC_ALL=C.UTF-8
|
||||
export CONTAINER_NAME=ci_freebsd_cross
|
||||
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
|
||||
export APT_LLVM_V="22"
|
||||
export FREEBSD_VERSION=15.0
|
||||
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} lld"
|
||||
export HOST=x86_64-unknown-freebsd
|
||||
export DEP_OPTS="build_CC=clang build_CXX=clang++ AR=llvm-ar-${APT_LLVM_V} STRIP=llvm-strip-${APT_LLVM_V} NM=llvm-nm-${APT_LLVM_V} RANLIB=llvm-ranlib-${APT_LLVM_V}"
|
||||
export FREEBSD_VERSION=15.1
|
||||
export FREEBSD_SDK_BASENAME="freebsd-${HOST}-${FREEBSD_VERSION}"
|
||||
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} lld-${APT_LLVM_V}"
|
||||
export SYSROOT="--sysroot=${DEPENDS_DIR}/SDKs/${FREEBSD_SDK_BASENAME}"
|
||||
export DEP_OPTS="build_CC=clang build_CXX=clang++ \
|
||||
CC='clang --target=${HOST} ${SYSROOT}' \
|
||||
CXX='clang++ --target=${HOST} ${SYSROOT} -stdlib=libc++' \
|
||||
LDFLAGS='-Wc,-fuse-ld=lld -fuse-ld=lld' \
|
||||
AR=llvm-ar-${APT_LLVM_V} \
|
||||
NM=llvm-nm-${APT_LLVM_V} \
|
||||
OBJCOPY=llvm-objcopy-${APT_LLVM_V} \
|
||||
OBJDUMP=llvm-objdump-${APT_LLVM_V} \
|
||||
RANLIB=llvm-ranlib-${APT_LLVM_V} \
|
||||
STRIP=llvm-strip-${APT_LLVM_V}"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="\
|
||||
--preset=dev-mode \
|
||||
-DCMAKE_LINKER_TYPE=LLD \
|
||||
-DREDUCE_EXPORTS=ON \
|
||||
-DWITH_USDT=OFF \
|
||||
"
|
||||
|
||||
@@ -12,7 +12,7 @@ export APT_LLVM_V="22"
|
||||
export HOST=x86_64-unknown-openbsd
|
||||
export OPENBSD_VERSION=7.9
|
||||
export OPENBSD_SDK_BASENAME="openbsd-${HOST}-${OPENBSD_VERSION}"
|
||||
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} lld"
|
||||
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} lld-${APT_LLVM_V}"
|
||||
export SYSROOT="--sysroot=${DEPENDS_DIR}/SDKs/${OPENBSD_SDK_BASENAME}"
|
||||
export DEP_OPTS="build_CC=clang build_CXX=clang++ \
|
||||
CC='clang --target=${HOST} ${SYSROOT}' \
|
||||
|
||||
@@ -118,8 +118,6 @@ if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ]
|
||||
tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
|
||||
fi
|
||||
|
||||
FREEBSD_SDK_BASENAME="freebsd-${HOST}-${FREEBSD_VERSION}"
|
||||
|
||||
if [ -n "$FREEBSD_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${FREEBSD_SDK_BASENAME}" ]; then
|
||||
FREEBSD_SDK_FILENAME="base-${FREEBSD_VERSION}.txz"
|
||||
FREEBSD_SDK_PATH="${DEPENDS_DIR}/sdk-sources/${FREEBSD_SDK_FILENAME}"
|
||||
|
||||
@@ -1,26 +1,6 @@
|
||||
FREEBSD_VERSION ?= 15.0
|
||||
FREEBSD_SDK=$(SDK_PATH)/freebsd-$(host)-$(FREEBSD_VERSION)/
|
||||
|
||||
clang_prog=$(shell command -v clang)
|
||||
clangxx_prog=$(shell command -v clang++)
|
||||
|
||||
freebsd_AR=$(shell command -v llvm-ar)
|
||||
freebsd_NM=$(shell command -v llvm-nm)
|
||||
freebsd_OBJCOPY=$(shell command -v llvm-objcopy)
|
||||
freebsd_OBJDUMP=$(shell command -v llvm-objdump)
|
||||
freebsd_RANLIB=$(shell command -v llvm-ranlib)
|
||||
freebsd_STRIP=$(shell command -v llvm-strip)
|
||||
|
||||
|
||||
freebsd_CC=$(clang_prog) --target=$(host) \
|
||||
--sysroot=$(FREEBSD_SDK)
|
||||
|
||||
freebsd_CXX=$(clangxx_prog) --target=$(host) \
|
||||
--sysroot=$(FREEBSD_SDK) -stdlib=libc++
|
||||
|
||||
freebsd_CFLAGS=
|
||||
freebsd_CXXFLAGS=
|
||||
freebsd_LDFLAGS=-fuse-ld=lld
|
||||
freebsd_LDFLAGS=
|
||||
|
||||
freebsd_release_CFLAGS=-O2
|
||||
freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS)
|
||||
@@ -28,4 +8,25 @@ freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS)
|
||||
freebsd_debug_CFLAGS=-O1 -g
|
||||
freebsd_debug_CXXFLAGS=$(freebsd_debug_CFLAGS)
|
||||
|
||||
ifeq (86,$(findstring 86,$(build_arch)))
|
||||
i686_freebsd_CC=clang -m32
|
||||
i686_freebsd_CXX=clang++ -m32
|
||||
i686_freebsd_AR=ar
|
||||
i686_freebsd_RANLIB=ranlib
|
||||
i686_freebsd_NM=nm
|
||||
i686_freebsd_STRIP=strip
|
||||
|
||||
x86_64_freebsd_CC=clang -m64
|
||||
x86_64_freebsd_CXX=clang++ -m64
|
||||
x86_64_freebsd_AR=ar
|
||||
x86_64_freebsd_RANLIB=ranlib
|
||||
x86_64_freebsd_NM=nm
|
||||
x86_64_freebsd_STRIP=strip
|
||||
else
|
||||
i686_freebsd_CC=$(default_host_CC) -m32
|
||||
i686_freebsd_CXX=$(default_host_CXX) -m32
|
||||
x86_64_freebsd_CC=$(default_host_CC) -m64
|
||||
x86_64_freebsd_CXX=$(default_host_CXX) -m64
|
||||
endif
|
||||
|
||||
freebsd_cmake_system_name=FreeBSD
|
||||
|
||||
Reference in New Issue
Block a user