blob: 58925a83b87944b827f90c19e106a134a8c2ca09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mageia-dev] Cross compile x86_64 on i586 for icecream?
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20Cross%20compile%20x86_64%20on%20i586%20for%20icecream%3F&In-Reply-To=%3C4DF72DA0.8050805%40colin.guthr.ie%3E">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="005584.html">
<LINK REL="Next" HREF="005462.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mageia-dev] Cross compile x86_64 on i586 for icecream?</H1>
<B>Colin Guthrie</B>
<A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20Cross%20compile%20x86_64%20on%20i586%20for%20icecream%3F&In-Reply-To=%3C4DF72DA0.8050805%40colin.guthr.ie%3E"
TITLE="[Mageia-dev] Cross compile x86_64 on i586 for icecream?">mageia at colin.guthr.ie
</A><BR>
<I>Tue Jun 14 11:45:04 CEST 2011</I>
<P><UL>
<LI>Previous message: <A HREF="005584.html">[Mageia-dev] Cross compile x86_64 on i586 for icecream?
</A></li>
<LI>Next message: <A HREF="005462.html">[Mageia-dev] [RPM] cauldron core/release biew-6.1.0-1.mga2
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#5588">[ date ]</a>
<a href="thread.html#5588">[ thread ]</a>
<a href="subject.html#5588">[ subject ]</a>
<a href="author.html#5588">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>'Twas brillig, and Colin Guthrie at 14/06/11 09:27 did gyre and gimble:
><i> 'Twas brillig, and Christiaan Welvaart at 13/06/11 12:24 did gyre and
</I>><i> gimble:
</I>>><i> On Mon, 13 Jun 2011, Colin Guthrie wrote:
</I>>><i>
</I>>>><i> I'm not exactly a guru with icecream but is it possible to build a
</I>>>><i> toolchain that can allow i586 nodes to compile x86_64 code?
</I>>><i>
</I>>><i> If your question is about the toolchain, have you tried simply passing
</I>>><i> -m64 to gcc?
</I>><i>
</I>><i> OK, so for the record, this doesn't work.
</I>><i>
</I>><i> However I checked out our tool chain and the RPMs accept some handy
</I>><i> arguments. Yay!
</I>><i>
</I>><i> Sadly they don't really work!
</I>><i>
</I>><i> I was able to build binutils via:
</I>><i> rpmbuild --define "cross x86_64" --define "_topdir $(pwd)" -bb
</I>><i> SPECS/binutils.spec
</I>><i>
</I>><i> But then I tried gcc via:
</I>><i> rpmbuild --define "cross_bootstrap x86_64" --define "_topdir $(pwd)"
</I>><i> -bb SPECS/gcc.spec
</I>><i>
</I>><i> (it needs to bootstrap to build glibc which can then be used to rebuild
</I>><i> gcc again fully).
</I>><i>
</I>><i> Sadly this bombed out:
</I>><i> /home/colin/Mageia/gcc/BUILD/gcc-4.5.2/obj-x86_64-mageia-linux-gnu/./gcc/xgcc
</I>><i> -B/home/colin/Mageia/gcc/BUILD/gcc-4.5.2/obj-x86_64-mageia-linux-gnu/./gcc/
</I>><i> -B/usr/x86_64-mageia-linux-gnu/bin/ -B/usr/x86_64-mageia-linux-gnu/lib/
</I>><i> -isystem /usr/x86_64-mageia-linux-gnu/include -isystem
</I>><i> /usr/x86_64-mageia-linux-gnu/sys-include
</I>><i> --sysroot=/home/colin/Mageia/gcc/BUILD/gcc-4.5.2/obj-x86_64-mageia-linux-gnu/../sysroot
</I>><i> -O2 -g -pipe -m32 -O2 -O2 -g -pipe -DIN_GCC
</I>><i> -DCROSS_DIRECTORY_STRUCTURE -DNATIVE_CROSS -W -Wall -Wwrite-strings
</I>><i> -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
</I>><i> -Wold-style-definition -isystem ./include -fPIC -g -DIN_LIBGCC2
</I>><i> -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../.././gcc -I../../../../libgcc
</I>><i> -I../../../../libgcc/. -I../../../../libgcc/../gcc
</I>><i> -I../../../../libgcc/../include -I../../../../libgcc/config/libbid
</I>><i> -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _muldi3.o -MT
</I>><i> _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c
</I>><i> ../../../../libgcc/../gcc/libgcc2.c
</I>><i> In file included from ../../../../libgcc/../gcc/tsystem.h:87:0,
</I>><i> from ../../../../libgcc/../gcc/libgcc2.c:29:
</I>><i> /home/colin/Mageia/gcc/BUILD/gcc-4.5.2/obj-x86_64-mageia-linux-gnu/./gcc/include-fixed/stdio.h:13:23:
</I>><i> fatal error: sys/types.h: No such file or directory
</I>><i> compilation terminated.
</I>><i>
</I>><i>
</I>><i>
</I>><i> Now it seems that adding -Dinhibit_libc here works a treat, but I've no
</I>><i> idea if this is appropriate. The files sys/types.h is included in the
</I>><i> source but e.g. sys/syscall.h is not (this is subsequently needed if you
</I>><i> fix the include path to point at the included lsb headers).
</I>><i>
</I>><i>
</I>><i> As I know nothing about the tool chain....
</I>><i>
</I>><i> Q1. Should we be setting -Dinhibit_libc during this bootstrap stage?
</I>><i> Q2. Would it be better to use the lsb-headers instead and somehow find
</I>><i> syscall.h?
</I>><i> Q3. Am I doing something dumb?
</I>
Added <A HREF="https://bugs.mageia.org/show_bug.cgi?id=1794">https://bugs.mageia.org/show_bug.cgi?id=1794</A> on RTPs request.
:<i>)
</I>
--
Colin Guthrie
mageia(at)colin.guthr.ie
<A HREF="http://colin.guthr.ie/">http://colin.guthr.ie/</A>
Day Job:
Tribalogic Limited [<A HREF="http://www.tribalogic.net/">http://www.tribalogic.net/</A>]
Open Source:
Mageia Contributor [<A HREF="http://www.mageia.org/">http://www.mageia.org/</A>]
PulseAudio Hacker [<A HREF="http://www.pulseaudio.org/">http://www.pulseaudio.org/</A>]
Trac Hacker [<A HREF="http://trac.edgewall.org/">http://trac.edgewall.org/</A>]
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="005584.html">[Mageia-dev] Cross compile x86_64 on i586 for icecream?
</A></li>
<LI>Next message: <A HREF="005462.html">[Mageia-dev] [RPM] cauldron core/release biew-6.1.0-1.mga2
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#5588">[ date ]</a>
<a href="thread.html#5588">[ thread ]</a>
<a href="subject.html#5588">[ subject ]</a>
<a href="author.html#5588">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>
|