For example I did this:
${CROSS_COMPILE}gcc -static myinit.c -o myinit
Also I did this without static:
${CROSS_COMPILE}gcc myinit.c -o myinit
There is no effect in my case, in both cases binary gives same result.
So what is the role of static here?
Here is the program I am compiling:
#include <stdio.h>
int
main ()
{
printf ("
");
printf ("Hello world from %s!
", __FILE__);
while (1) { }
return 0;
}
Also
${CROSS_COMPILE}
is arm-xilinx-linux-gnueabi-
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…