wip 2
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
name = "gcc"
|
||||
version = "16.1.0"
|
||||
revision = 1
|
||||
description = "GNU GCC cross-compiler (bootstrap stage, C/C++ only)"
|
||||
license = "GPL-3.0-or-later"
|
||||
|
||||
source = {
|
||||
"url": f"https://ftp.gnu.org/gnu/gcc/gcc-{version}/gcc-{version}.tar.xz",
|
||||
"sha256": "50efb4d94c3397aff3b0d61a5abd748b4dd31d9d3f2ab7be05b171d36a510f79",
|
||||
"strip_components": 1,
|
||||
}
|
||||
|
||||
metadata = meta(
|
||||
description = "GNU GCC cross-compiler (bootstrap stage, C/C++ only)",
|
||||
license = "GPL-3.0-or-later",
|
||||
)
|
||||
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"]
|
||||
|
||||
def configure(ctx):
|
||||
ctx.run([
|
||||
ctx.source_dir + "/configure",
|
||||
"--target=" + options.target_triple,
|
||||
"--prefix=" + ctx.prefix,
|
||||
"--target=" + OPTIONS.target_triple,
|
||||
"--with-sysroot=" + ctx.prefix + "/" + OPTIONS.target_triple,
|
||||
"--with-sysroot=" + ctx.sysroot,
|
||||
"--without-headers",
|
||||
"--with-newlib",
|
||||
"--enable-languages=c,c++",
|
||||
@@ -33,9 +32,9 @@ def configure(ctx):
|
||||
"--disable-libvtv",
|
||||
"--disable-multilib",
|
||||
], env = {
|
||||
"CFLAGS": OPTIONS.host_cflags,
|
||||
"CXXFLAGS": OPTIONS.host_cxxflags,
|
||||
"LDFLAGS": OPTIONS.host_ldflags,
|
||||
"CFLAGS": options.host_cflags,
|
||||
"CXXFLAGS": options.host_cxxflags,
|
||||
"LDFLAGS": options.host_ldflags,
|
||||
})
|
||||
|
||||
def build(ctx):
|
||||
@@ -44,5 +43,5 @@ def build(ctx):
|
||||
ctx.run(["make", jobs, "all-target-libgcc"])
|
||||
|
||||
def install(ctx, pkg):
|
||||
ctx.run(["make", "DESTDIR=" + pkg.destdir, "install-gcc"])
|
||||
ctx.run(["make", "DESTDIR=" + pkg.destdir, "install-target-libgcc"])
|
||||
ctx.run(["make", "install-gcc"], env = {"DESTDIR": pkg.dest_dir})
|
||||
ctx.run(["make", "install-target-libgcc"], env = {"DESTDIR": pkg.dest_dir})
|
||||
Reference in New Issue
Block a user