Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNAT 14.2 #77

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/macos_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions lib/platform_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
Expand Down Expand Up @@ -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},
Expand All @@ -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"},
Expand Down
6 changes: 6 additions & 0 deletions sanity-checking/drivers/platform_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
Expand All @@ -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",
Expand All @@ -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},
Expand All @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion specs/avrlibc.anod
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
]

Expand Down
9 changes: 7 additions & 2 deletions specs/gcc.anod
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)
Expand Down Expand Up @@ -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):
Expand Down
27 changes: 21 additions & 6 deletions specs/release_package.anod
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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 [
Expand Down
Loading