More stuff, didn't test
This commit is contained in:
@@ -5,14 +5,14 @@ metadata = meta(
|
||||
license = "GPL-3.0-or-later",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = "https://ftp.gnu.org/gnu/binutils/binutils-" + version + ".tar.xz",
|
||||
url = f"https://ftp.gnu.org/gnu/binutils/binutils-{version}.tar.xz",
|
||||
sha256 = "d75a94f4d73e7a4086f7513e67e439e8fcdcbb726ffe63f4661744e6256b2cf2",
|
||||
strip_components = 1,
|
||||
)
|
||||
|
||||
def configure(ctx):
|
||||
ctx.run([
|
||||
ctx.source_dir + "/configure",
|
||||
configure_args = [
|
||||
ctx.source_dir / "configure",
|
||||
"--prefix=" + ctx.prefix,
|
||||
"--target=" + options.target_triple,
|
||||
"--with-sysroot=" + ctx.sysroot,
|
||||
@@ -26,11 +26,14 @@ def configure(ctx):
|
||||
"--enable-relro",
|
||||
"--enable-separate-code",
|
||||
"--enable-threads",
|
||||
# gprofng's libcollector does not build against musl.
|
||||
"--disable-gprofng",
|
||||
"--disable-nls",
|
||||
"--disable-werror",
|
||||
], env = {
|
||||
]
|
||||
# gprofng's libcollector relies on glibc-specific internals.
|
||||
if options.libc == "musl":
|
||||
configure_args.append("--disable-gprofng")
|
||||
|
||||
ctx.run(configure_args, env = {
|
||||
"CFLAGS": options.host_cflags,
|
||||
"CXXFLAGS": options.host_cxxflags,
|
||||
"LDFLAGS": options.host_ldflags,
|
||||
|
||||
@@ -13,7 +13,7 @@ host_deps = ["binutils"]
|
||||
|
||||
def configure(ctx):
|
||||
ctx.run([
|
||||
ctx.source_dir + "/configure",
|
||||
ctx.source_dir / "configure",
|
||||
"--target=" + options.target_triple,
|
||||
"--prefix=" + ctx.prefix,
|
||||
"--with-sysroot=" + ctx.sysroot,
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
version = "16.1.0"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "GNU GCC cross-compiler targeting the system triple",
|
||||
license = "GPL-3.0-or-later",
|
||||
website = "https://gcc.gnu.org/",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://ftp.gnu.org/gnu/gcc/gcc-{version}/gcc-{version}.tar.xz",
|
||||
sha256 = "50efb4d94c3397aff3b0d61a5abd748b4dd31d9d3f2ab7be05b171d36a510f79",
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils", "gcc-bootstrap"]
|
||||
deps = [options.libc, "linux-headers"]
|
||||
|
||||
def configure(ctx):
|
||||
ctx.run([
|
||||
ctx.source_dir / "configure",
|
||||
"--target=" + options.target_triple,
|
||||
"--prefix=" + ctx.prefix,
|
||||
"--with-sysroot=" + ctx.sysroot,
|
||||
"--with-build-sysroot=" + ctx.sysroot,
|
||||
"--enable-languages=c,c++,lto",
|
||||
"--disable-bootstrap",
|
||||
"--enable-default-pie",
|
||||
"--enable-default-ssp",
|
||||
"--enable-lto",
|
||||
"--enable-threads=posix",
|
||||
"--enable-tls",
|
||||
"--enable-libstdcxx-time",
|
||||
"--enable-checking=release",
|
||||
"--enable-cet=auto",
|
||||
"--enable-linker-build-id",
|
||||
"--disable-nls",
|
||||
"--disable-multilib",
|
||||
"--disable-fixed-point",
|
||||
"--disable-werror",
|
||||
"--disable-libsanitizer",
|
||||
"--disable-symvers",
|
||||
], env = {
|
||||
"CFLAGS": options.host_cflags,
|
||||
"CXXFLAGS": options.host_cxxflags,
|
||||
"LDFLAGS": options.host_ldflags,
|
||||
})
|
||||
|
||||
def build(ctx):
|
||||
ctx.run(["make", "-j" + str(ctx.jobs)])
|
||||
|
||||
def install(ctx, pkg):
|
||||
ctx.run(["make", "install-strip"], env = {"DESTDIR": pkg.dest_dir})
|
||||
# Drop libtool archives — they bake build-time paths into target programs.
|
||||
ctx.run([
|
||||
"find", pkg.dest_dir + ctx.prefix, "-name", "*.la", "-delete",
|
||||
])
|
||||
@@ -0,0 +1,52 @@
|
||||
version = "20.1.0"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "LLVM compiler infrastructure with clang and lld",
|
||||
license = "Apache-2.0 WITH LLVM-exception",
|
||||
website = "https://llvm.org/",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/llvm-project-{version}.src.tar.xz",
|
||||
sha256 = "?",
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils"]
|
||||
|
||||
def configure(ctx):
|
||||
ctx.run([
|
||||
"cmake",
|
||||
"-S", ctx.source_dir / "llvm",
|
||||
"-B", ctx.build_dir,
|
||||
"-G", "Ninja",
|
||||
"-DCMAKE_BUILD_TYPE=Release",
|
||||
"-DCMAKE_INSTALL_PREFIX=" + ctx.prefix,
|
||||
"-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;lld",
|
||||
"-DLLVM_ENABLE_RUNTIMES=compiler-rt",
|
||||
"-DLLVM_TARGETS_TO_BUILD=X86;AArch64;RISCV",
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=" + options.target_triple,
|
||||
"-DLLVM_HOST_TRIPLE=" + options.target_triple,
|
||||
"-DLLVM_ENABLE_LIBXML2=OFF",
|
||||
"-DLLVM_ENABLE_LIBEDIT=OFF",
|
||||
"-DLLVM_ENABLE_TERMINFO=OFF",
|
||||
"-DLLVM_ENABLE_ASSERTIONS=OFF",
|
||||
"-DLLVM_ENABLE_PIC=ON",
|
||||
"-DLLVM_BUILD_LLVM_DYLIB=ON",
|
||||
"-DLLVM_LINK_LLVM_DYLIB=ON",
|
||||
"-DLLVM_INSTALL_UTILS=ON",
|
||||
"-DLLVM_INCLUDE_TESTS=OFF",
|
||||
"-DLLVM_INCLUDE_EXAMPLES=OFF",
|
||||
"-DLLVM_INCLUDE_BENCHMARKS=OFF",
|
||||
"-DCLANG_DEFAULT_LINKER=lld",
|
||||
"-DCLANG_DEFAULT_RTLIB=compiler-rt",
|
||||
"-DCLANG_DEFAULT_CXX_STDLIB=libstdc++",
|
||||
], env = {
|
||||
"CFLAGS": options.host_cflags,
|
||||
"CXXFLAGS": options.host_cxxflags,
|
||||
"LDFLAGS": options.host_ldflags,
|
||||
})
|
||||
|
||||
def build(ctx):
|
||||
ctx.run(["cmake", "--build", ctx.build_dir, "-j" + str(ctx.jobs)])
|
||||
|
||||
def install(ctx, pkg):
|
||||
ctx.run(["cmake", "--install", ctx.build_dir], env = {"DESTDIR": pkg.dest_dir})
|
||||
Reference in New Issue
Block a user