]> git.pld-linux.org Git - packages/dietlibc.git/blame - x32-fixes.patch
always pass MYARCH explicitly
[packages/dietlibc.git] / x32-fixes.patch
CommitLineData
f5ffcb6a
JR
1--- dietlibc-0.33/Makefile~ 2015-01-01 13:33:23.000000000 +0000
2+++ dietlibc-0.33/Makefile 2015-01-01 14:02:17.398044560 +0000
3@@ -10,7 +10,7 @@
4
5 EXTRACFLAGS=
6
8f178a7a
JP
7-MYARCH:=$(shell uname -m | sed -e 's/i[4-9]86/i386/' -e 's/armv[3-7]t\?e\?[lb]/arm/')
8+MYARCH?=$(shell uname -m | sed -e 's/i[4-9]86/i386/' -e 's/armv[3-7]t\?e\?[lb]/arm/')
f5ffcb6a
JR
9
10 # This extra-ugly cruft is here so make will not run uname and sed each
11 # time it looks at $(OBJDIR). This alone sped up running make when
12@@ -65,10 +65,14 @@
13 ifeq ($(MYARCH),armeb)
14 ARCH=arm
15 else
16+ifeq ($(MYARCH),x32)
17+ARCH=x32
18+else
19 $(error unknown architecture, please fix Makefile)
20 endif
21 endif
22 endif
23+endif
24 endif
25 endif
26 endif
27--- dietlibc-0.33/x86_64/start.S 2012-11-02 11:17:28.000000000 +0000
28+++ dietlibc/x86_64/start.S 2015-01-01 12:14:43.541605560 +0000
29@@ -1,5 +1,7 @@
30 #include "dietfeatures.h"
31
32+#define SYS_exit 0x3c
33+
34 .text
35 .global _start
36 _start:
37--- dietlibc-0.33/diet.c.orig 2015-01-01 14:22:18.024668874 +0000
38+++ dietlibc-0.33/diet.c 2015-01-01 14:42:07.241293590 +0000
39@@ -140,8 +143,12 @@
40 if (tmp3<tmp2) tmp2=tmp3;
41 if (tmp2-cc>90) error("platform name too long!\n");
42 shortplatform=platform+len;
43+#if defined(__x86_64__) && defined (__ILP32__)
44+ strcat(shortplatform,"x32");
45+#else
46 memmove(shortplatform,argv[1],(size_t)(tmp2-cc));
47 platform[tmp2-cc+len]=0;
48+#endif
49 if (shortplatform[0]=='i' && shortplatform[2]=='8' && shortplatform[3]=='6') shortplatform[1]='3';
50 else if (!strncmp(shortplatform, "pentium4", 8)) strcpy(shortplatform, "i386");
51 else if (!strncmp(shortplatform, "pentium3", 8)) strcpy(shortplatform, "i386");
52@@ -196,8 +211,12 @@
53 shortplatform="parisc";
54 #endif
55 #ifdef __x86_64__
56+#ifdef __ILP32__
57+ shortplatform=(m==32?"i386":(m==64?"x86_64":"x32"));
58+#else
59 shortplatform=(m==32?"i386":(m==33?"x32":"x86_64"));
60 #endif
61+#endif
62 #ifdef __ia64__
63 shortplatform="ia64";
64 #endif
65--- /dev/null 2014-12-27 02:30:11.755493543 +0000
66+++ dietlibc-0.33/x32/time.S 2015-01-01 14:51:28.000000000 +0000
67@@ -0,0 +1 @@
68+/* avoid empty source file */
This page took 0.11068 seconds and 4 git commands to generate.