]>
Commit | Line | Data |
---|---|---|
8f178a7a JP |
1 | --- dietlibc-0.34/diet.c.orig 2020-04-22 01:00:18.176151567 +0200 |
2 | +++ dietlibc-0.34/diet.c 2020-04-22 01:02:12.779007194 +0200 | |
3 | @@ -155,6 +155,14 @@ | |
458e4119 | 4 | else if (!strncmp(shortplatform, "amd64", 5)) strcpy(shortplatform, "x86_64"); |
8f178a7a | 5 | else if (!strncmp(shortplatform, "armv", 4)) strcpy(shortplatform, "arm"); |
c2a7b369 | 6 | else if (!strncmp(shortplatform, "sparcv", 6)) strcpy(shortplatform, "sparc"); |
458e4119 | 7 | + if (!strncmp(shortplatform, "x86_64", 6) && (m==32)) strcpy(shortplatform, "i386"); |
813b77ce | 8 | + else if (!strncmp(shortplatform, "i386", 4) && (m==64)) strcpy(shortplatform, "x86_64"); |
c2a7b369 | 9 | + else if (!strncmp(shortplatform, "sparc64", 7) && (m==32)) strcpy(shortplatform, "sparc"); |
458e4119 JB |
10 | + else if (!strncmp(shortplatform, "sparc", 5) && (m==64)) strcpy(shortplatform, "sparc64"); |
11 | + else if (!strncmp(shortplatform, "ppc64", 5) && (m==32)) strcpy(shortplatform, "ppc"); | |
12 | + else if (!strncmp(shortplatform, "ppc", 3) && (m==64)) strcpy(shortplatform, "ppc64"); | |
13 | + else if (!strncmp(shortplatform, "s390x", 5) && (m==32)) strcpy(shortplatform, "s390"); | |
14 | + else if (!strncmp(shortplatform, "s390", 4) && (m==64)) strcpy(shortplatform, "s390x"); | |
8f178a7a JP |
15 | if (!strncmp(shortplatform, "powerpc", 7)) { |
16 | shortplatform[0] = shortplatform[1] = 'p'; shortplatform[2] = 'c'; | |
17 | memmove(&shortplatform[3], &shortplatform[7], strlen(&shortplatform[7]) + 1); | |
18 | @@ -168,23 +176,23 @@ | |
458e4119 JB |
19 | } else { |
20 | #ifdef __sparc__ | |
21 | #ifdef __arch64__ | |
22 | - shortplatform="sparc64"; | |
23 | + shortplatform=(m==32?"sparc":"sparc64"); | |
24 | #else | |
813b77ce JB |
25 | - shortplatform="sparc"; |
26 | + shortplatform=(m==64?"sparc64":"sparc"); | |
458e4119 | 27 | #endif |
813b77ce JB |
28 | #endif |
29 | #ifdef __powerpc__ | |
30 | - shortplatform="ppc"; | |
8f178a7a | 31 | + shortplatform=(m==64?"ppc64":"ppc"); |
458e4119 JB |
32 | #endif |
33 | #ifdef __powerpc64__ | |
8f178a7a JP |
34 | #ifdef __LITTLE_ENDIAN__ |
35 | shortplatform="ppc64le"; | |
36 | #else | |
458e4119 JB |
37 | - shortplatform="ppc64"; |
38 | + shortplatform=(m==32?"ppc":"ppc64"); | |
8f178a7a | 39 | #endif |
458e4119 JB |
40 | #endif |
41 | #ifdef __i386__ | |
813b77ce JB |
42 | - shortplatform="i386"; |
43 | + shortplatform=(m==64?"x86_64":"i386"); | |
44 | #endif | |
45 | #ifdef __alpha__ | |
46 | shortplatform="alpha"; |