From d7bc70dd9d19ad1a7b80e03775f88a26e52e6846 Mon Sep 17 00:00:00 2001 From: Johannes Kliemann Date: Mon, 26 Aug 2024 10:46:27 +0000 Subject: [PATCH] Select the proper sources for Windows native runtimes With the separate Linux source profile Windows native targets use a different set of sources. Once a source profile for Windows exists this commit should be reversed. ref eng/toolchain/bb-runtimes#78 --- build_rts.py | 6 +++--- native/__init__.py | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/build_rts.py b/build_rts.py index 32a8f870..efcff30c 100755 --- a/build_rts.py +++ b/build_rts.py @@ -283,11 +283,11 @@ def build_configs(target): t = X8664Generic() # native platforms elif target in ("x86-linux", "x86-windows"): - t = X86Native() + t = X86Native(target) elif target in ("x86_64-linux", "x86_64-windows", "x86_64-windows64"): - t = X8664Native() + t = X8664Native(target) elif target in ("aarch64-linux",): - t = Aarch64Native() + t = Aarch64Native(target) # vx7r2cert elif target == "aarch64-vx7r2cert": t = AArch64Vx7r2Cert() diff --git a/native/__init__.py b/native/__init__.py index 80f0b879..28ba6e2c 100644 --- a/native/__init__.py +++ b/native/__init__.py @@ -2,9 +2,14 @@ class Native(DFBBTarget): - def __init__(self): + def __init__(self, target): super().__init__() self.add_gnat_sources("src/s-macres__native.adb") + # Use the bb source of s-textio for Windows as a custom + # source profile is not yet supported. + # eng/toolchain/bb-runtimes#78 + if "windows" in target: + self.add_gnat_sources("src/s-textio__stdio.adb") @property def target(self):