diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 64e8a01..ed2a6cc 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -96,7 +96,7 @@ jobs: gnat_cross: strategy: matrix: - target: ["arm-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "riscv64-elf", "avr-elf", "xtensa-esp32-elf"] name: GNAT ${{ matrix.target }}-linux needs: gnat runs-on: ubuntu-20.04 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index c6ff4e8..443ac26 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -93,7 +93,7 @@ jobs: gnat_cross: strategy: matrix: - target: ["arm-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "riscv64-elf", "avr-elf", "xtensa-esp32-elf"] name: GNAT ${{ matrix.target }}-darwin needs: gnat runs-on: macos-12 diff --git a/.github/workflows/macos_arm.yml b/.github/workflows/macos_arm.yml index 4aebc29..c293b12 100644 --- a/.github/workflows/macos_arm.yml +++ b/.github/workflows/macos_arm.yml @@ -53,7 +53,10 @@ jobs: gnat_cross: strategy: matrix: - target: ["arm-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "riscv64-elf", "xtensa-esp32-elf"] + # We don't enable avr on aarch64 macOS as libc-avr doesn't recognize + # aarch64-apple machine https://github.com/avrdudes/avr-libc/issues/978 + name: GNAT ${{ matrix.target }}-darwin needs: gnat runs-on: macos-14 @@ -64,6 +67,10 @@ jobs: - name: Checkout Project uses: actions/checkout@v2 + + - name: Install texinfo with Homebrew + run: brew install texinfo + - uses: actions/download-artifact@v2 with: name: anod-artifacts diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 32259e4..fe88fe4 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -127,7 +127,7 @@ jobs: gnat_cross: strategy: matrix: - target: ["arm-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "riscv64-elf", "avr-elf", "xtensa-esp32-elf"] name: GNAT ${{ matrix.target }}-windows needs: gnat runs-on: windows-2019 diff --git a/lib/platform_db.py b/lib/platform_db.py index 3f34762..e7408c6 100644 --- a/lib/platform_db.py +++ b/lib/platform_db.py @@ -4,6 +4,7 @@ class PlatDB(PlatformDBPlugin): def update_db(self) -> None: self.cpu_info.update( { + "xtensa": {"endian": "little", "bits": 32}, "riscv32": {"endian": "little", "bits": 32}, "riscv64": {"endian": "little", "bits": 64}, } @@ -34,6 +35,7 @@ def update_db(self) -> None: self.platform_info.update( { "aarch64-darwin": {"cpu": "aarch64", "os": "darwin", "is_hie": False}, + "xtensa-esp32-elf": {"cpu": "xtensa", "os": "none", "is_hie": True}, "riscv32-elf": {"cpu": "riscv32", "os": "none", "is_hie": True}, "riscv64-elf": {"cpu": "riscv64", "os": "none", "is_hie": True}, "riscv32-unknown-elf": {"cpu": "riscv32", "os": "none", "is_hie": True}, @@ -44,6 +46,7 @@ def update_db(self) -> None: self.build_targets.update( { "aarch64-darwin": {"name": "aarch64-apple-darwin%(os_version)s"}, + "xtensa-esp32-elf": {"name": "xtensa-esp32-elf"}, "riscv32-elf": {"name": "riscv32-elf"}, "riscv64-elf": {"name": "riscv64-elf"}, "riscv32-unknown-elf": {"name": "riscv32-unknown-elf"}, diff --git a/sanity-checking/drivers/platform_db.py b/sanity-checking/drivers/platform_db.py index c88aed9..e7408c6 100644 --- a/sanity-checking/drivers/platform_db.py +++ b/sanity-checking/drivers/platform_db.py @@ -4,6 +4,7 @@ class PlatDB(PlatformDBPlugin): def update_db(self) -> None: self.cpu_info.update( { + "xtensa": {"endian": "little", "bits": 32}, "riscv32": {"endian": "little", "bits": 32}, "riscv64": {"endian": "little", "bits": 64}, } @@ -23,6 +24,7 @@ def update_db(self) -> None: self.host_guess.pop("x86-windows") self.host_guess.update( { + "aarch64-darwin": {"os": "Darwin", "cpu": "arm64"}, "x86_64-windows64": { "os": "Windows", "cpu": "AMD64", @@ -32,6 +34,8 @@ def update_db(self) -> None: self.platform_info.update( { + "aarch64-darwin": {"cpu": "aarch64", "os": "darwin", "is_hie": False}, + "xtensa-esp32-elf": {"cpu": "xtensa", "os": "none", "is_hie": True}, "riscv32-elf": {"cpu": "riscv32", "os": "none", "is_hie": True}, "riscv64-elf": {"cpu": "riscv64", "os": "none", "is_hie": True}, "riscv32-unknown-elf": {"cpu": "riscv32", "os": "none", "is_hie": True}, @@ -41,6 +45,8 @@ def update_db(self) -> None: self.build_targets.update( { + "aarch64-darwin": {"name": "aarch64-apple-darwin%(os_version)s"}, + "xtensa-esp32-elf": {"name": "xtensa-esp32-elf"}, "riscv32-elf": {"name": "riscv32-elf"}, "riscv64-elf": {"name": "riscv64-elf"}, "riscv32-unknown-elf": {"name": "riscv32-unknown-elf"}, diff --git a/specs/avrlibc.anod b/specs/avrlibc.anod index 1c699db..6f08885 100644 --- a/specs/avrlibc.anod +++ b/specs/avrlibc.anod @@ -18,7 +18,7 @@ class AVRLibc(spec("common")): return [ self.HTTPSSourceBuilder( name=self.tarball, - url="http://download.savannah.gnu.org/releases/avr-libc/" + self.tarball, + url="https://download.savannah.gnu.org/releases/avr-libc/" + self.tarball, ) ] diff --git a/specs/gcc.anod b/specs/gcc.anod index eb8b805..b3ef2e3 100644 --- a/specs/gcc.anod +++ b/specs/gcc.anod @@ -13,7 +13,7 @@ patch_name = "ld" class GCC(spec("gh-artifact")): @property def version(self): - return "14.1.0" + return "14.2.0" @property def tarball(self): @@ -30,7 +30,7 @@ class GCC(spec("gh-artifact")): if not self.host_is_macos_arm else "https://github.com/iains/gcc-14-branch/archive/refs/" - + "tags/gcc-14.1-darwin-r1.tar.gz" + + "tags/gcc-14.2-darwin-r1.tar.gz" ) ), self.LocalSourceBuilder(name=patch_name) @@ -176,6 +176,11 @@ class GCC(spec("gh-artifact")): args += cross_commons args.append("--enable-multilib") + if self.env.target.triplet == "extensa-esp32-elf": + args += cross_commons + args.append("--enable-multilib") + + return args def artifact_build(self): diff --git a/specs/release_package.anod b/specs/release_package.anod index 0e2925c..a43c03d 100644 --- a/specs/release_package.anod +++ b/specs/release_package.anod @@ -54,19 +54,28 @@ class ReleasePackage(spec("common")): return "1" elif package == "gnat": if self.env.target.triplet == "arm-eabi": - return "3" + return "1" elif self.env.target.triplet == "riscv64-elf": - return "3" - elif self.env.target.triplet == "avr-elf": - return "3" + return "1" + elif self.env.target.triplet == "avr": + return "1" else: - return "3" + return "1" @property def release_name(self): + platform = self.env.platform + + # The target triplet for cross compilers on macOS (darwin) x86 and + # aarch64 is the same, to differentiate the two hosts we add host CPU + # name at the end of platform name. And for consistency we do this on + # all other hosts as well. + if self.env.is_cross: + platform += "-" + self.env.host.cpu.name + return "%s-%s-%s-%s" % ( self.package, - self.env.platform, + platform, self.version, self.package_release, ) @@ -131,6 +140,12 @@ class ReleasePackage(spec("common")): Anod.Dependency("avrlibc", track=True), ] + elif self.env.target.triplet == "xtensa-esp32-elf": + return [ + Anod.Dependency("gcc", track=True), + Anod.Dependency("gdb", track=True), + ] + elif self.env.host.triplet == self.env.target.triplet: # Native return [