From: Debian Science Team Date: Fri, 14 Jan 2022 14:21:00 +0000 (+0000) Subject: Fix compilation on mips64el X-Git-Tag: archive/raspbian/0.3.19+ds-3+rpi1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=35117f74ff90cfa81d98d7373c2757524feca619;p=openblas.git Fix compilation on mips64el Origin: upstream, https://github.com/xianyi/OpenBLAS/commit/2db0b2e4453b0a502cf336f6288688c23246d202 Applied-Upstream: 0.3.20 Last-Update: 2022-01-10 Last-Update: 2022-01-10 Gbp-Pq: Name mips64el.patch --- diff --git a/cpuid_mips.c b/cpuid_mips.c index 1946455..d787e71 100644 --- a/cpuid_mips.c +++ b/cpuid_mips.c @@ -165,7 +165,7 @@ void get_cpuconfig(void){ }else{ printf("#define UNKNOWN\n"); } - if (!get_feature(msa)) printf("#define NO_MSA\n"); + if (!get_feature("msa")) printf("#define NO_MSA\n"); } void get_libname(void){ @@ -193,7 +193,7 @@ int get_feature(char *search) while (fgets(buffer, sizeof(buffer), infile)) { - if (!strncmp("Features", buffer, 8)) + if (!strncmp("Features", buffer, 8) || !strncmp("ASEs implemented", buffer, 16)) { p = strchr(buffer, ':') + 2; break; @@ -207,7 +207,7 @@ int get_feature(char *search) t = strtok(p," "); while( t = strtok(NULL," ")) { - if (!strcmp(t, search)) { return(1); } + if (strstr(t, search)) { return(1); } } #endif diff --git a/cpuid_mips64.c b/cpuid_mips64.c index 97743bc..8753ee3 100644 --- a/cpuid_mips64.c +++ b/cpuid_mips64.c @@ -201,7 +201,7 @@ void get_cpuconfig(void){ printf("#define DTB_SIZE 4096\n"); printf("#define L2_ASSOCIATIVE 8\n"); } - if (!get_feature(msa)) printf("#define NO_MSA\n"); + if (!get_feature("msa")) printf("#define NO_MSA\n"); } void get_libname(void){ @@ -233,7 +233,7 @@ int get_feature(char *search) while (fgets(buffer, sizeof(buffer), infile)) { - if (!strncmp("Features", buffer, 8)) + if (!strncmp("Features", buffer, 8) || !strncmp("ASEs implemented", buffer, 16)) { p = strchr(buffer, ':') + 2; break; @@ -247,7 +247,7 @@ int get_feature(char *search) t = strtok(p," "); while( t = strtok(NULL," ")) { - if (!strcmp(t, search)) { return(1); } + if (strstr(t, search)) { return(1); } } #endif