Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion build-binutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
help='''
The script can build binutils targeting arm-linux-gnueabi, aarch64-linux-gnu,
mips-linux-gnu, mipsel-linux-gnu, powerpc-linux-gnu, powerpc64-linux-gnu,
powerpc64le-linux-gnu, riscv64-linux-gnu, s390x-linux-gnu, and x86_64-linux-gnu.
powerpc64le-linux-gnu, riscv64-linux-gnu, s390x-linux-gnu, sparc64-linux-gnu,
and x86_64-linux-gnu.

By default, it builds all supported targets ("all"). If you would like to build
specific targets only, pass them to this script. It can be either the full target
Expand Down Expand Up @@ -120,6 +121,7 @@
'powerpc64le': tc_build.binutils.PowerPC64LEBinutilsBuilder,
'riscv64': tc_build.binutils.RISCV64BinutilsBuilder,
's390x': tc_build.binutils.S390XBinutilsBuilder,
'sparc64': tc_build.binutils.Sparc64BinutilsBuilder,
'x86_64': tc_build.binutils.X8664BinutilsBuilder,
}
if 'loongarch64' in default_targets:
Expand Down
10 changes: 10 additions & 0 deletions tc_build/binutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@ def __init__(self) -> None:
self.target = 's390x-linux-gnu'


class Sparc64BinutilsBuilder(StandardBinutilsBuilder):
def __init__(self) -> None:
super().__init__()

self.extra_targets.append('sparc-linux-gnu')
self.native_arch = 'sparc64'
self.target = 'sparc64-linux-gnu'


class X8664BinutilsBuilder(StandardBinutilsBuilder):
def __init__(self) -> None:
super().__init__()
Expand All @@ -209,6 +218,7 @@ def default_targets(self) -> list[str]:
'powerpc64le',
'riscv64',
's390x',
'sparc64',
'x86_64',
]
if Path(self.location, 'gas/config/tc-loongarch.c').exists():
Expand Down
Loading