Bug#618978: afnix: FTBFS: #error "unknown processor type"
Source: afnix
Version: 2.0.0-1
Severity: wishlist
Tags: patch
User: debian-sh4@superh.org
Usertags: sh4
X-Debbugs-CC: debian-superh@lists.debian.org
Hi,
afnix FTBFS on sh4.
http://buildd.debian-ports.org/fetch.php?pkg=afnix&arch=sh4&ver=2.0.0-1&stamp=1300294439&file=log&as=raw
-----
make[5]: Entering directory
`/build/buildd-afnix_2.0.0-1-sh4-VRAnen/afnix-2.0.0/src/lib/plt/acf'
make[5]: Leaving directory
`/build/buildd-afnix_2.0.0-1-sh4-VRAnen/afnix-2.0.0/src/lib/plt/acf'
make[5]: Entering directory
`/build/buildd-afnix_2.0.0-1-sh4-VRAnen/afnix-2.0.0/src/lib/plt/shl'
g++ -Wall -fno-builtin -MMD -pthread -fPIC -O2 -I.
-I../acf -o cclk.o -c cclk.cxx
In file included from cclk.cxx:18:
cclk.hxx:24:2: error: #error "unknown processor type"
make[5]: *** [cclk.o] Error 1
-----
I made patch to support SH. Could you apply this patch?
Best regards,
Nobuhiro
--
Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org}
GPG ID: 40AD1FA6
--- afnix-2.0.0.orig/src/lib/plt/acf/ccnf.cpp
+++ afnix-2.0.0/src/lib/plt/acf/ccnf.cpp
@@ -46,6 +46,7 @@
#define AFNIX_PROCTYPE_IA64 10
#define AFNIX_PROCTYPE_S390 11
#define AFNIX_PROCTYPE_X64 12
+#define AFNIX_PROCTYPE_SH 13
// recognized processor name
#define AFNIX_PROCNAME_UNKNOWN "unknown"
@@ -61,6 +62,7 @@
#define AFNIX_PROCNAME_IA64 "ia64"
#define AFNIX_PROCNAME_S390 "s390"
#define AFNIX_PROCNAME_X64 "x64"
+#define AFNIX_PROCNAME_SH "sh"
// force size type with S390
#if defined(__s390__)
@@ -145,6 +147,9 @@ static int get_procid (const char* proc)
return AFNIX_PROCTYPE_UNKNOWN;
}
}
+ // SuperH
+ if (strcmp (proc, AFNIX_PROCNAME_SH) == 0)
+ return AFNIX_PROCTYPE_SH;
// unknown
return AFNIX_PROCTYPE_UNKNOWN;
}
@@ -164,6 +169,7 @@ static const char* get_procnm (const int
if (id == AFNIX_PROCTYPE_IA64) return AFNIX_PROCNAME_IA64;
if (id == AFNIX_PROCTYPE_S390) return AFNIX_PROCNAME_S390;
if (id == AFNIX_PROCTYPE_X64) return AFNIX_PROCNAME_X64;
+ if (id == AFNIX_PROCTYPE_SH) return AFNIX_PROCNAME_SH;
return AFNIX_PROCNAME_UNKNOWN;
}
@@ -308,6 +314,8 @@ int main (int, char**) {
AFNIX_PROCTYPE_S390);
fprintf (stdout, "#define AFNIX_PROCTYPE_X64 %d\n",
AFNIX_PROCTYPE_X64);
+ fprintf (stdout, "#define AFNIX_PROCTYPE_SH %d\n",
+ AFNIX_PROCTYPE_SH);
fprintf (stdout, "\n");
// recognized processor names
@@ -338,6 +346,8 @@ int main (int, char**) {
AFNIX_PROCNAME_S390);
fprintf (stdout, "#define AFNIX_PROCNAME_X64 \"%s\"\n",
AFNIX_PROCNAME_X64);
+ fprintf (stdout, "#define AFNIX_PROCNAME_SH \"%s\"\n",
+ AFNIX_PROCNAME_SH);
fprintf (stdout, "\n");
// install the darwin definition
Reply to: