Skip to content

Commit da3a8dd

Browse files
committed
Add Motorola M-CORE Linux platform support.
1 parent 25e2fdf commit da3a8dd

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

platform/linux/platform_linux.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,30 @@ extern "C"
460460
}
461461

462462
#ifdef ULTIMATE_EDITION
463+
Ref<Architecture> mcore_le = Architecture::GetByName("mcore_le");
464+
if (mcore_le)
465+
{
466+
Ref<Platform> platform;
467+
468+
platform = new LinuxCSkyV1Platform(mcore_le, "linux-mcore_le");
469+
Platform::Register("linux", platform);
470+
// Linux binaries sometimes have an OS identifier of zero, even though 3 is the correct one
471+
BinaryViewType::RegisterPlatform("ELF", 0, platform);
472+
BinaryViewType::RegisterPlatform("ELF", 3, platform);
473+
}
474+
475+
Ref<Architecture> mcore_be = Architecture::GetByName("mcore_be");
476+
if (mcore_be)
477+
{
478+
Ref<Platform> platform;
479+
480+
platform = new LinuxCSkyV1Platform(mcore_be, "linux-mcore_be");
481+
Platform::Register("linux", platform);
482+
// Linux binaries sometimes have an OS identifier of zero, even though 3 is the correct one
483+
BinaryViewType::RegisterPlatform("ELF", 0, platform);
484+
BinaryViewType::RegisterPlatform("ELF", 3, platform);
485+
}
486+
463487
Ref<Architecture> cskyv1 = Architecture::GetByName("csky_le_v1");
464488
if (cskyv1)
465489
{

0 commit comments

Comments
 (0)