1 |
On 10/27/17 3:27 PM, Jeremi Piotrowski wrote: |
2 |
> Hi, |
3 |
> |
4 |
> I've been trying to build a musl based cross-compilation toolchain for |
5 |
> building static packages. With: |
6 |
> |
7 |
> CFLAGS="-O2 -pipe" crossdev -s4 -t armv7a-hardfloat-linux-musleabi |
8 |
> |
9 |
> I get a *working* toolchain, with which i can build dynamically linked |
10 |
> executables, but static linking of libc fails. For example, the simple |
11 |
> C program |
12 |
> |
13 |
> #include <stdio.h> |
14 |
> int main() |
15 |
> { |
16 |
> puts("hello"); |
17 |
> } |
18 |
> |
19 |
> gives: |
20 |
> |
21 |
> $ armv7a-hardfloat-linux-musleabi-gcc main.c -static |
22 |
> /usr/libexec/gcc/armv7a-hardfloat-linux-musleabi/ld: skipping |
23 |
> incompatible /usr/armv7a-hardfloat-linux-musleabi/usr/lib/libc.a when |
24 |
> searching for -lc |
25 |
> /usr/libexec/gcc/armv7a-hardfloat-linux-musleabi/ld: skipping |
26 |
> incompatible /usr/armv7a-hardfloat-linux-musleabi/usr/lib/libc.a when |
27 |
> searching for -lc |
28 |
> /usr/libexec/gcc/armv7a-hardfloat-linux-musleabi/ld: cannot find -lc |
29 |
> |
30 |
> I'm trying to track down what could be causing this, but so far |
31 |
> haven't found anything (tried disabling PIE but same result). The |
32 |
> crossdev toolchain uses musl 1.1.17, gcc 6.4.0 and binutils 2.29.1-r1. |
33 |
> |
34 |
> Any help would be appreciated. Thanks. |
35 |
> Jeremi |
36 |
|
37 |
I know its not what you are trying to do, but do you know if the |
38 |
stage3's in experitmental/arm/musl have the same problem? |
39 |
|
40 |
-- |
41 |
Anthony G. Basile, Ph.D. |
42 |
Gentoo Linux Developer [Hardened] |
43 |
E-Mail : basile@××××××××××.net |
44 |
GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA |
45 |
GnuPG ID : F52D4BBA |