40 lines
1.0 KiB
Python
40 lines
1.0 KiB
Python
version = "2.46.0"
|
|
revision = 1
|
|
metadata = meta(
|
|
description = "GNU binutils cross-compiled for the target triple",
|
|
license = "GPL-3.0-or-later",
|
|
)
|
|
source = tarball(
|
|
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",
|
|
"--prefix=" + cfg.prefix,
|
|
"--target=" + cfg.target_triple,
|
|
"--with-sysroot=" + ctx.sysroot_dir,
|
|
"--with-pic",
|
|
"--enable-cet",
|
|
"--enable-default-execstack=no",
|
|
"--enable-deterministic-archives",
|
|
"--enable-ld=default",
|
|
"--enable-new-dtags",
|
|
"--enable-plugins",
|
|
"--enable-relro",
|
|
"--enable-separate-code",
|
|
"--enable-threads",
|
|
"--disable-nls",
|
|
"--disable-werror",
|
|
# gprofng's libcollector relies on glibc-specific internals.
|
|
"--disable-gprofng",
|
|
env = {
|
|
"CFLAGS": cfg.host_cflags,
|
|
"CXXFLAGS": cfg.host_cxxflags,
|
|
"LDFLAGS": cfg.host_ldflags,
|
|
})
|
|
|
|
_, build, install = autotools()
|