]> mj.ucw.cz Git - libucw.git/commitdiff
Build: Added support for aarch64 architecture. v6.5.15
authorMilan Rusek <milan.rusek@economia.cz>
Tue, 7 Feb 2023 10:14:03 +0000 (10:14 +0000)
committerPavel Charvat <pchar@ucw.cz>
Tue, 7 Feb 2023 10:16:09 +0000 (10:16 +0000)
ucw/perl/UCW/Configure/C.pm

index 730b5145357a87da048b2196b6447e5944c7d113..9265a8801a32e3b993941a4ca8543b580bc1cf32 100644 (file)
@@ -2,6 +2,7 @@
 # (c) 2005--2012 Martin Mares <mj@ucw.cz>
 # (c) 2006 Robert Spalek <robert@ucw.cz>
 # (c) 2008 Michal Vaner <vorner@ucw.cz>
+# (c) 2023 Milan Rusek <milan.rusek@economia.cz>
 
 ### OS ###
 
@@ -67,6 +68,8 @@ Test("ARCH", "Checking for machine architecture", sub {
                return "amd64";
        } elsif ($mach eq 'powerpc') {
                return $mach;
+       } elsif ($mach eq 'aarch64') {
+               return $mach;
        } else {
                return "unknown ($mach)";
        }
@@ -101,6 +104,13 @@ if ($arch eq 'i386') {
        UnSet("CPU_BIG_ENDIAN");
        UnSet("CPU_ALLOW_UNALIGNED");
        Set("CPU_STRUCT_ALIGN" => 4);
+} elsif ($arch eq "aarch64") {
+       Set("CPU_ARM");
+       Set("CPU_64BIT_POINTERS");
+       Set("CPU_LITTLE_ENDIAN");
+       UnSet("CPU_BIG_ENDIAN");
+       UnSet("CPU_ALLOW_UNALIGNED");
+       Set("CPU_STRUCT_ALIGN" => 8);
 } elsif (!Get("CPU_LITTLE_ENDIAN") && !Get("CPU_BIG_ENDIAN")) {
        Fail "Architecture not recognized, please set CPU_xxx variables manually.";
 }