Skip to content

Commit

Permalink
Merge pull request #64 from fangohr/add-support-linux-arm64
Browse files Browse the repository at this point in the history
Support to enable compilation of OOMMF on Linux with ARM64 hardware
  • Loading branch information
fangohr authored Mar 15, 2024
2 parents bfd4e56 + 6d27a82 commit b24e72d
Show file tree
Hide file tree
Showing 2 changed files with 478 additions and 0 deletions.
43 changes: 43 additions & 0 deletions oommf/config/names/linux-arm64.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# linux-arm64.tcl
#
# Defines the Oc_Config name 'linux-arm64' to indicate the Linux
# operating system running on the arm64 architecture.

Oc_Config New _ [string tolower [file rootname [file tail [info script]]]] {
global tcl_platform

if {[llength [info commands LocalNameCheck]] == 0} {
# If local/mynames.tcl exists and defines LocalNameCheck,
# then use that.
set fn [file join \
[file dirname [file dirname [file dirname [info script]]]] \
config names local mynames.tcl]
if {[file readable $fn]} {
catch {source $fn}
}
}
if {[llength [info commands LocalNameCheck]] == 1} {
set localname [LocalNameCheck]
if {![string match {} $localname]} {
set checkname [$this GetValue platform_name]
return [expr {![string compare $checkname $localname]}]
}
}

# Otherwise, fall back on default rules
if {![regexp -nocase -- linux $tcl_platform(os)]} {
return 0
}
if {![string match aarch64 $tcl_platform(machine)]} {
return 0
}
if {[info exists tcl_platform(wordSize)] &&
$tcl_platform(wordSize) != 8} {
return 0
}
if {[info exists tcl_platform(pointerSize)] &&
$tcl_platform(pointerSize) != 8} {
return 0
}
return 1
}
Loading

0 comments on commit b24e72d

Please sign in to comment.