1 |
On Wed, 2007-10-31 at 20:43 +0100, Pal Szasz wrote: |
2 |
> Just a little addition: there is another flag which might be involved: |
3 |
> |
4 |
> -mfloat-abi=softfp |
5 |
> |
6 |
|
7 |
How do I pass those flags to the compiler by using crossedev? |
8 |
|
9 |
Here's the shell script I am currently using. |
10 |
I changed it to go with Jason's recommended toolset versions but I am |
11 |
still getting the same linking errors about floating-point |
12 |
incompatibilities... |
13 |
|
14 |
.-.-.-.-.-.-.- |
15 |
|
16 |
#!/bin/bash |
17 |
|
18 |
CBUILD="i686-pc-linux-gnu" |
19 |
|
20 |
CHOST=$CBUILD |
21 |
|
22 |
CTARGET="arm-softfloat-linux-uclibc" |
23 |
|
24 |
#export ROOT="/usr/arm-softfloat-linux-uclibc" |
25 |
|
26 |
PORTAGE_CONFIGROOT="/usr/arm-softfloat-linux-uclibc" |
27 |
|
28 |
UCLIBC_CPU="ARM920T" USE="-*" crossdev -v --binutils 2.17 --gcc 3.4.6-r2 |
29 |
--kernel 2.6.19-r2 --libc 0.9.28.3 --ex-gdb --target |
30 |
arm-softfloat-linux-uclibc |
31 |
|
32 |
.-.-.-.-.-.-.- |
33 |
|
34 |
Thanks for any help |
35 |
|
36 |
|
37 |
> Pal Szasz wrote: |
38 |
> > Hi! |
39 |
> > |
40 |
> > Hmm... I think somebody else has to help you... |
41 |
> > All I know that floating point ninstructions on ARM are a bit tricky. |
42 |
> > The core doesn't support that, but there is an optional co-processor. |
43 |
> > And even if the co-processor is not there, there are two ways to |
44 |
> > emulate it in software. Unfortunately the way floating point |
45 |
> > operations are handled must be specified at compile time, and must |
46 |
> > match in every application/lib... and that's the problem here. I recon |
47 |
> > there is a flag, -mfpu=vfp which controll the floating point |
48 |
> > instructions. It seems uclibc and gcc was built with different |
49 |
> > flags... so probably you have to rebuild one of them.... |
50 |
> > Or maybe you are using the wrong uclibc lib? |
51 |
> > |
52 |
> > /Pal Szasz |
53 |
> > |
54 |
> > Jean-Claude Gervais wrote: |
55 |
> >> Thank you, Pal! |
56 |
> >> |
57 |
> >> That did indeed help; by putting an empty file at |
58 |
> >> |
59 |
> >> /usr/arm-softfloat-linux-uclibc/usr/include/asm/page.h |
60 |
> >> |
61 |
> >> I was able to compile, however, now the link fails. |
62 |
> >> |
63 |
> >> I think it might be something to do with my USE flags? |
64 |
> >> |
65 |
> >> Anyone know? |
66 |
> >> |
67 |
> >> [...] |
68 |
> >> rm -f libc.a shared_libc.a |
69 |
> >> objs=`cat obj.*` ; \ |
70 |
> >> arm-softfloat-linux-uclibc-ar cr libc.a $objs && \ |
71 |
> >> arm-softfloat-linux-uclibc-ar dN 2 libc.a $objs && \ |
72 |
> >> arm-softfloat-linux-uclibc-ar dN 2 libc.a $objs |
73 |
> >> arm-softfloat-linux-uclibc-ar cr libc.a obj.signal |
74 |
> >> arm-softfloat-linux-uclibc-ar cr libc.a obj.string.generic |
75 |
> >> arm-softfloat-linux-uclibc-ar cr libc.a obj.string.arm |
76 |
> >> arm-softfloat-linux-uclibc-ar cr libc.a obj.string |
77 |
> >> arm-softfloat-linux-uclibc-ar cr libc.a obj.sysdeps.common |
78 |
> >> arm-softfloat-linux-uclibc-ar cr libc.a obj.sysdeps.arm |
79 |
> >> cp libc.a shared_libc.a |
80 |
> >> arm-softfloat-linux-uclibc-ranlib libc.a |
81 |
> >> arm-softfloat-linux-uclibc-ld -EL -shared --warn-common --warn-once -z |
82 |
> >> combreloc -z defs -s -z relro -soname=libc.so.0 -o libuClibc-0.9.28.so |
83 |
> >> \ |
84 |
> >> --whole-archive shared_libc.a \ |
85 |
> >> ../libc/misc/internals/interp.o --no-whole-archive \ |
86 |
> >> -init |
87 |
> >> __uClibc_init ../lib/ld-uClibc.so.0 |
88 |
> >> /usr/lib/gcc/arm-softfloat-linux-uclibc/4.1.2/libgcc.a |
89 |
> >> ../lib/ld-uClibc.so.0: warning: multiple common of `__libc_stack_end' |
90 |
> >> shared_libc.a(__uClibc_main.o): warning: previous common is here |
91 |
> >> arm-softfloat-linux-uclibc-ld: |
92 |
> >> ERROR: |
93 |
> >> /usr/lib/gcc/arm-softfloat-linux-uclibc/4.1.2/libgcc.a(_udivsi3.o) |
94 |
> >> uses VFP instructions, whereas libuClibc-0.9.28.so does not |
95 |
> >> arm-softfloat-linux-uclibc-ld: failed to merge target specific data of |
96 |
> >> file /usr/lib/gcc/arm-softfloat-linux-uclibc/4.1.2/libgcc.a(_udivsi3.o) |
97 |
> >> arm-softfloat-linux-uclibc-ld: |
98 |
[...] |
99 |
> >> |
100 |
> >> |
101 |
> >> On Wed, 2007-10-31 at 19:28 +0100, Pal Szasz wrote: |
102 |
> >> |
103 |
> >>> Hi! |
104 |
> >>> |
105 |
> >>> I simply created an empty page.h file :-) |
106 |
> >>> |
107 |
> >>> Jean-Claude Gervais wrote: |
108 |
> >>> |
109 |
> >>>> Hello, |
110 |
> >>>> |
111 |
> >>>> I'm getting a compilation error trying to build uClibc on |
112 |
> >>>> an x86 |
113 |
> >>>> host for an ARM host using crossdev 0.9.18-r4: |
114 |
> >>>> |
115 |
> >>>> UCLIBC_CPU="ARM920T" USE="-*" crossdev -v -S --ex-gdb --target |
116 |
> >>>> arm-softfloat-linux-uclibc |
117 |
> >>>> |
118 |
> >>>> [...] |
119 |
> >>>> |
120 |
> >>>> arm-softfloat-linux-uclibc-strip -x -R .note -R .comment brk.o |
121 |
> >>>> ioperm.c:47:22: error: asm/page.h: No such file or directory |
122 |
> >>>> |
123 |
> >>>> |
124 |
> >>>> * Host Portage ARCH: x86 |
125 |
> >>>> * Target Portage ARCH: arm |
126 |
> >>>> * Target System: arm-softfloat-linux-uclibc |
127 |
> >>>> * Stage: 4 (C/C++ compiler) |
128 |
> >>>> |
129 |
> >>>> * binutils: binutils-[stable] |
130 |
> >>>> * gcc: gcc-[stable] |
131 |
> >>>> * headers: linux-headers-[stable] |
132 |
> >>>> * libc: uclibc-[stable] |
133 |
> >>>> * Extra: gdb: DO IT |
134 |
> >>>> |
135 |
> >>>> * PORTDIR_OVERLAY: /usr/local/portage |
136 |
> >>>> * PORT_LOGDIR: /var/log/portage |
137 |
> >>>> * |
138 |
> >>>> PKGDIR: |
139 |
> >>>> /usr/portage/packages/cross/arm-softfloat-linux-uclibc |
140 |
> >>>> * PORTAGE_TMPDIR: /var/tmp/cross/arm-softfloat-linux-uclibc |
141 |
> >>>> _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - |
142 |
> >>>> ~ - |
143 |
> >>>> _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - |
144 |
> >>>> _ - ~ - Portage 2.1.3.16 (default-linux/x86/2007.0, gcc-4.1.2, |
145 |
> >>>> glibc-2.6.1-r0, |
146 |
> >>>> 2.6.22-gentoo-r5 i686) |
147 |
> >>>> ================================================================= |
148 |
> >>>> System uname: 2.6.22-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz |
149 |
> >>>> Timestamp of tree: Tue, 30 Oct 2007 17:00:10 +0000 |
150 |
> >>>> distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port |
151 |
> >>>> 3632) |
152 |
> >>>> [enabled] |
153 |
> >>>> app-shells/bash: 3.2_p17 |
154 |
> >>>> dev-lang/python: 2.4.4-r6 |
155 |
> >>>> dev-python/pycrypto: 2.0.1-r6 |
156 |
> >>>> sys-apps/baselayout: 1.12.9-r2 |
157 |
> >>>> sys-apps/sandbox: 1.2.18.1-r2 |
158 |
> >>>> sys-devel/autoconf: 2.13, 2.61-r1 |
159 |
> >>>> sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 |
160 |
> >>>> sys-devel/binutils: 2.18-r1 |
161 |
> >>>> sys-devel/gcc-config: 1.3.16 |
162 |
> >>>> sys-devel/libtool: 1.5.24 |
163 |
> >>>> virtual/os-headers: 2.6.22-r2 |
164 |
> >>>> |
165 |
> >>>> Is there a fix for this? |
166 |
> >>>> Thank you |
167 |
> >>>> |
168 |
> >>>> |
169 |
> >> |
170 |
> >> |
171 |
> > |
172 |
> > |
173 |
> |
174 |
|
175 |
-- |
176 |
gentoo-embedded@g.o mailing list |