Fix bunch of small blockers for stage3-sysroot
This commit is contained in:
parent
1820e1f46a
commit
2e1c5f6dd1
|
@ -17,4 +17,5 @@ build
|
|||
packages/stage1-sysroot/sysroot/
|
||||
packages/stage2-sysroot/sysroot/
|
||||
packages/stage3-sysroot/sysroot/
|
||||
*.zstd
|
||||
*.zstd
|
||||
tests/1/main
|
16
builder
16
builder
|
@ -37,8 +37,8 @@ set -e
|
|||
command=$1
|
||||
VERSION="0.9.0"
|
||||
|
||||
LLVM_VERSION="0e0db0a4d7fd606ee58595f997142f7f2476cbe6"
|
||||
LLVM_MAJOR_VERSION="17"
|
||||
LLVM_VERSION="da3cd333bea572fb10470f610a27f22bcb84b08c"
|
||||
LLVM_MAJOR_VERSION="16"
|
||||
CMAKE_VERSION="3.26.0"
|
||||
NINJA_VERSION="1.11.1"
|
||||
ZLIB_VERSION="1.2.13"
|
||||
|
@ -46,6 +46,7 @@ ZSTD_VERSION="1.5.4"
|
|||
KERNEL_VERSION="6.0"
|
||||
MUSL_VERSION="1.2.3"
|
||||
IWYU_VERSION="14e9b208914a84fcdf49bf9f5d08897a4b3dc4b8"
|
||||
BOEHMGC_VERSION="8.2.2"
|
||||
|
||||
TARGET=x86_64-pc-linux-musl
|
||||
|
||||
|
@ -58,7 +59,8 @@ export LLVM_VERSION \
|
|||
LLVM_MAJOR_VERSION \
|
||||
MUSL_VERSION \
|
||||
TARGET \
|
||||
IWYU_VERSION
|
||||
IWYU_VERSION \
|
||||
BOEHMGC_VERSION
|
||||
|
||||
ME=$(cd "$(dirname "$0")/." >/dev/null 2>&1 ; pwd -P)
|
||||
|
||||
|
@ -212,6 +214,14 @@ function build-toolchain() { ## Build the entire thing
|
|||
build-tarball
|
||||
}
|
||||
|
||||
function test-container() { ## Run an alpine container to test the toolchain in the .tmp dir
|
||||
# Make sure to run the build-stage3 first so the .tmp/2/stage3-sysroot/ exist
|
||||
docker run --rm -it -v "$ME/.tmp/2/stage3-sysroot/":/sysroot \
|
||||
-v "$ME/tests/":/tests \
|
||||
alpine:latest /bin/sh
|
||||
}
|
||||
|
||||
|
||||
function help() { ## Print out this help message
|
||||
echo "Commands:"
|
||||
grep -E '^function [a-zA-Z0-9_-]+\(\) \{ ## .*$$' "$0" | \
|
||||
|
|
|
@ -62,15 +62,20 @@ def copy_tree(src, dst, preserve_symlinks=True, ignore=None):
|
|||
if skip_this:
|
||||
continue
|
||||
if item.is_dir():
|
||||
shutil.copytree(
|
||||
copy_tree(
|
||||
item,
|
||||
dst / item.name,
|
||||
dirs_exist_ok=True,
|
||||
symlinks=preserve_symlinks,
|
||||
copy_function=shutil.copy2,
|
||||
preserve_symlinks,
|
||||
ignore,
|
||||
)
|
||||
elif item.is_file() or item.is_symlink:
|
||||
shutil.copy2(item, dst / item.name, follow_symlinks=not preserve_symlinks)
|
||||
try:
|
||||
shutil.copy2(
|
||||
item, dst / item.name, follow_symlinks=not preserve_symlinks
|
||||
)
|
||||
except Exception as e:
|
||||
if not item.is_symlink:
|
||||
raise e
|
||||
|
||||
|
||||
def with_static_flags(cmake_vars={}):
|
||||
|
|
|
@ -28,7 +28,7 @@ from conf.utils import get_version, with_musl_toolchain, copy_dependency_tree
|
|||
class BoehmGC(ConanFile):
|
||||
name = "boehmgc"
|
||||
settings = "os", "arch", "build_type", "compiler"
|
||||
version = "8.2.2"
|
||||
version = get_version("boehmgc")
|
||||
options = {
|
||||
"stage": [1, 2],
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ from conan import ConanFile
|
|||
from conan.tools.files import get
|
||||
from conan.tools.cmake import CMakeToolchain
|
||||
|
||||
from conf.utils import get_version, copy_template, copy_tree, copy_dependency_tree
|
||||
from conf.utils import get_version, copy_template, copy_dependency_tree
|
||||
|
||||
|
||||
class Stage3(ConanFile):
|
||||
|
@ -40,11 +40,20 @@ class Stage3(ConanFile):
|
|||
self.requires(f"zlib/{get_version('zlib')}@{self.user}/{self.channel}")
|
||||
self.requires(f"zstd/{get_version('zstd')}@{self.user}/{self.channel}")
|
||||
self.requires(f"musl/{get_version('musl')}@{self.user}/{self.channel}")
|
||||
# self.requires(f"cmake-musl/{get_version('cmake')}@{self.user}/{self.channel}")
|
||||
# self.requires(f"ninja-musl/{get_version('ninja')}@{self.user}/{self.channel}")
|
||||
self.requires(f"boehmgc/{get_version('boehmgc')}@{self.user}/{self.channel}")
|
||||
|
||||
def build(self):
|
||||
copy_dependency_tree(
|
||||
self,
|
||||
["toolchain", "musl", "zlib", "zstd"],
|
||||
[
|
||||
"toolchain",
|
||||
"musl",
|
||||
"zlib",
|
||||
"zstd",
|
||||
"boehmgc",
|
||||
],
|
||||
self.package_folder,
|
||||
)
|
||||
|
||||
|
|
|
@ -17,7 +17,9 @@ set(CMAKE_SYSTEM_NAME Linux)
|
|||
|
||||
set(triple @TRIPLE@)
|
||||
|
||||
set(CMAKE_SYSROOT @SYSROOT@)
|
||||
# You need to set SERENE_TOOLCHAIN_PATH before pointing to this toolchain
|
||||
# file
|
||||
set(CMAKE_SYSROOT ${SERENE_TOOLCHAIN_PATH})
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER "clang")
|
||||
|
|
|
@ -71,6 +71,7 @@ class Zlib(ZlibBase):
|
|||
"BUILD_SHARED_LIBS": False,
|
||||
"CMAKE_POSITION_INDEPENDENT_CODE": "ON",
|
||||
"CMAKE_SYSROOT": sysroot,
|
||||
"CMAKE_FIND_ROOT_PATH": sysroot,
|
||||
},
|
||||
build_script_folder=f"zlib-{self.version}",
|
||||
)
|
||||
|
|
|
@ -77,6 +77,7 @@ class Zstd(ZstdBase):
|
|||
"ZSTD_BUILD_SHARED": False,
|
||||
"CMAKE_POSITION_INDEPENDENT_CODE": "ON",
|
||||
"CMAKE_SYSROOT": sysroot,
|
||||
"CMAKE_FIND_ROOT_PATH": sysroot,
|
||||
},
|
||||
build_script_folder=f"zstd-{self.version}/build/cmake/",
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue