Skip to content

Commit 324db3d

Browse files
roxellbhcopeland
authored andcommitted
arch: unify sh, sh2 and sh4 into a single sh architecture
Debian only ships an sh4 cross compiler for sh. Add sh2 and sh4 as aliases for sh instead of having separate config files. Resolve aliases before config file lookup so they work without a .ini file. Remove sh2.ini and the sh4.ini symlink. Use sh instead of sh2 and sh4 in the korg-gcc target lists. Suggested-by: Arnd Bergmann <arnd@linaro.org> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
1 parent b9b60fb commit 324db3d

6 files changed

Lines changed: 14 additions & 24 deletions

File tree

docs/architectures.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ parisc | | 64-bit parisc | yes¹ ² | no
3030
powerpc | | 64-bit PowerPC (EL) | yes¹ ² ³ | yes
3131
riscv | | 64-bit RISC-V | yes¹ ² ³ | no
3232
s390 | *s390x* | 64-bit IBM S/390 | yes | yes
33-
sh | | 32-bit sh4 | yes¹ | no
34-
sh2 | | 32-bit sh2 | yes³ | no
35-
sh4 | | 32-bit sh4 | yes³ | no
33+
sh | *sh2*, *sh4*| 32-bit sh4 | yes¹ ³ | no
3634
sparc | | 64-bit Sparc | yes¹ ² ³ | no
3735
um | | User-Mode Linux | yes¹ ² | no
3836
x86_64 | *amd64* | 64-bit X86 | yes | yes

tuxmake/arch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class Architecture(ConfigurableObject):
1515
"armv8l": "arm",
1616
"i686": "i386",
1717
"s390x": "s390",
18+
"sh2": "sh",
19+
"sh4": "sh",
1820
}
1921

2022
def __init_config__(self):

tuxmake/arch/sh2.ini

Lines changed: 0 additions & 9 deletions
This file was deleted.

tuxmake/arch/sh4.ini

Lines changed: 0 additions & 1 deletion
This file was deleted.

tuxmake/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ def __repr__(self):
2828
@lru_cache(None)
2929
def read_config(cls, name: str) -> Tuple[str, ConfigParser]:
3030
commonconf = Path(__file__).parent / cls.basedir / "common.ini"
31+
name = cls.config_aliases.get(name, name)
3132
conffile = Path(__file__).parent / cls.basedir / f"{name}.ini"
3233
if not conffile.exists():
3334
raise cls.exception(name)
34-
name = cls.config_aliases.get(conffile.stem, name)
3535
config = ConfigParser()
3636
config.read(commonconf)
3737
config.read(conffile)

tuxmake/runtime/docker.ini

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,8 @@ rebuild = monthly
542542
kind = korg-gcc-build
543543
base = base-debian13
544544
hosts = amd64, arm64
545-
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, powerpc, riscv, s390, sh2, sh4, sparc, x86_64, xtensa
546-
target_skip = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, riscv, s390, sh2, sh4, sparc, x86_64, xtensa
545+
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, powerpc, riscv, s390, sh, sparc, x86_64, xtensa
546+
target_skip = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, riscv, s390, sh, sparc, x86_64, xtensa
547547
tc_full_version = 14.2.0
548548
rebuild = monthly
549549

@@ -553,7 +553,7 @@ skip_build = True
553553
kind = korg-gcc-build
554554
base = base-debian13
555555
hosts = amd64, arm64
556-
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh2, sh4, sparc, x86_64, xtensa
556+
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh, sparc, x86_64, xtensa
557557
tc_full_version = 8.5.0
558558
rebuild = monthly
559559

@@ -563,7 +563,7 @@ skip_build = True
563563
kind = korg-gcc-build
564564
base = base-debian13
565565
hosts = amd64, arm64
566-
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh2, sh4, sparc, x86_64, xtensa
566+
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh, sparc, x86_64, xtensa
567567
tc_full_version = 9.5.0
568568
rebuild = monthly
569569

@@ -573,7 +573,7 @@ skip_build = True
573573
kind = korg-gcc-build
574574
base = base-debian13
575575
hosts = amd64, arm64
576-
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh2, sh4, sparc, x86_64, xtensa
576+
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh, sparc, x86_64, xtensa
577577
tc_full_version = 10.5.0
578578
rebuild = monthly
579579

@@ -583,7 +583,7 @@ skip_build = True
583583
kind = korg-gcc-build
584584
base = base-debian13
585585
hosts = amd64, arm64
586-
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh2, sh4, sparc, x86_64, xtensa
586+
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh, sparc, x86_64, xtensa
587587
tc_full_version = 11.5.0
588588
rebuild = monthly
589589

@@ -593,7 +593,7 @@ skip_build = True
593593
kind = korg-gcc-build
594594
base = base-debian13
595595
hosts = amd64, arm64
596-
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh2, sh4, sparc, x86_64, xtensa
596+
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh, sparc, x86_64, xtensa
597597
tc_full_version = 12.4.0
598598
rebuild = monthly
599599

@@ -603,7 +603,7 @@ skip_build = True
603603
kind = korg-gcc-build
604604
base = base-debian13
605605
hosts = amd64, arm64
606-
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh2, sh4, sparc, x86_64, xtensa
606+
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh, sparc, x86_64, xtensa
607607
tc_full_version = 13.3.0
608608
rebuild = monthly
609609

@@ -614,7 +614,7 @@ kind = korg-gcc-build
614614
target_kinds = alpha:korg-gcc
615615
base = base-debian13
616616
hosts = amd64, arm64
617-
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, powerpc, riscv, s390, sh2, sh4, sparc, x86_64, xtensa
617+
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, powerpc, riscv, s390, sh, sparc, x86_64, xtensa
618618
tc_full_version = 14.2.0
619619
rebuild = monthly
620620

@@ -625,6 +625,6 @@ kind = korg-gcc-build
625625
target_kinds = alpha:korg-gcc
626626
base = base-debian13
627627
hosts = amd64, arm64
628-
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, powerpc, riscv, s390, sh2, sh4, sparc, x86_64, xtensa
628+
targets = alpha, arc, arm64, arm, csky, i386, loongarch, m68k, microblaze, mips, nios2, openrisc, powerpc, riscv, s390, sh, sparc, x86_64, xtensa
629629
tc_full_version = 15.2.0
630630
rebuild = monthly

0 commit comments

Comments
 (0)