Skip to content

Commit 5dc4d7d

Browse files
authored
Merge pull request #5005 from martin-frbg/evbarm
Improve support for NetBSD on arm64 (evbarm)
2 parents 4ba471d + a791912 commit 5dc4d7d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

c_check

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ hostarch=`uname -m | sed -e 's/i.86/x86/'`
66
if [ "$hostos" = "AIX" ] || [ "$hostos" = "SunOS" ]; then
77
hostarch=`uname -p`
88
fi
9+
if [ "$hostarch" = "evbarm" ]; then
10+
hostarch=`uname -p`
11+
fi
912
case "$hostarch" in
1013
amd64) hostarch=x86_64 ;;
1114
arm*) [ "$hostarch" = "arm64" ] || hostarch='arm' ;;

cpuid_arm64.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static char *cpuname_lower[] = {
127127
int get_feature(char *search)
128128
{
129129

130-
#ifdef __linux
130+
#if defined( __linux ) || defined( __NetBSD__ )
131131
FILE *infile;
132132
char buffer[2048], *p,*t;
133133
p = (char *) NULL ;
@@ -163,7 +163,7 @@ int get_feature(char *search)
163163
int detect(void)
164164
{
165165

166-
#ifdef __linux
166+
#if defined( __linux ) || defined( __NetBSD__ )
167167

168168
FILE *infile;
169169
char buffer[512], *p, *cpu_part = NULL, *cpu_implementer = NULL;
@@ -314,7 +314,7 @@ void get_cpucount(void)
314314
{
315315
int n=0;
316316

317-
#ifdef __linux
317+
#if defined( __linux ) || defined( __NetBSD__ )
318318
FILE *infile;
319319
char buffer[2048], *p,*t;
320320
p = (char *) NULL ;
@@ -608,7 +608,7 @@ void get_libname(void)
608608
void get_features(void)
609609
{
610610

611-
#ifdef __linux
611+
#if defined( __linux ) || defined( __NetBSD__ )
612612
FILE *infile;
613613
char buffer[2048], *p,*t;
614614
p = (char *) NULL ;

0 commit comments

Comments
 (0)