More stuff, didn't test
This commit is contained in:
@@ -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",
|
||||
])
|
||||
Reference in New Issue
Block a user