-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from fangohr/add-support-linux-arm64
Support to enable compilation of OOMMF on Linux with ARM64 hardware
- Loading branch information
Showing
2 changed files
with
478 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Oops, something went wrong.