From: Milan Rusek Date: Tue, 7 Feb 2023 10:14:03 +0000 (+0000) Subject: Build: Added support for aarch64 architecture. X-Git-Tag: v6.5.15^0 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=1be7157ea7055b8e6a50d8443b789558825be283;p=libucw.git Build: Added support for aarch64 architecture. --- diff --git a/ucw/perl/UCW/Configure/C.pm b/ucw/perl/UCW/Configure/C.pm index 730b5145..9265a880 100644 --- a/ucw/perl/UCW/Configure/C.pm +++ b/ucw/perl/UCW/Configure/C.pm @@ -2,6 +2,7 @@ # (c) 2005--2012 Martin Mares # (c) 2006 Robert Spalek # (c) 2008 Michal Vaner +# (c) 2023 Milan Rusek ### 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."; }