43 lines
1.3 KiB
Python
43 lines
1.3 KiB
Python
name = "binutils"
|
|
version = "2.46.0"
|
|
revision = 1
|
|
description = "GNU binutils cross-compiled for the target triple"
|
|
license = "GPL-3.0-or-later"
|
|
|
|
source = {
|
|
"url": "https://ftp.gnu.org/gnu/binutils/binutils-" + version + ".tar.xz",
|
|
"sha256": "d75a94f4d73e7a4086f7513e67e439e8fcdcbb726ffe63f4661744e6256b2cf2",
|
|
"strip_components": 1,
|
|
}
|
|
|
|
host_deps = []
|
|
|
|
def configure(ctx):
|
|
ctx.run([
|
|
ctx.source_dir + "/configure",
|
|
"--prefix=" + ctx.prefix,
|
|
"--target=" + OPTIONS.target_triple,
|
|
"--with-sysroot=" + ctx.prefix + "/" + OPTIONS.target_triple,
|
|
"--disable-nls",
|
|
"--disable-werror",
|
|
"--enable-deterministic-archives",
|
|
"--enable-ld=default",
|
|
"--enable-plugins",
|
|
"--enable-threads",
|
|
"--with-system-zlib",
|
|
# gprofng's libcollector does not build against musl/recent gcc.
|
|
"--disable-gprofng",
|
|
], 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", "DESTDIR=" + pkg.destdir, "install"])
|
|
# Drop static archives we don't need on the cross side.
|
|
ctx.run(["sh", "-c", "rm -f " + pkg.destdir + ctx.prefix + "/lib/*.a"])
|