Originally Posted by twobob
Need two lifetimes to catch up with your headspace.
*goes and gets second lifetime*
This information is golddust. thanks mate
Ah, but I wasn't quite done.
Continued from: https://www.mobileread.com/forums/sho...1&postcount=73
Now that you have a working, emulated native, arm build environment ...
And you have just built a copy of tcc v-0.9.26 dynamically linked against uClibc ...
How do you get a static linked tcc out of this when the ./configure and make sequence does not observe the standard --static --static-libgcc sequence?
Thought no one would ask.
Look at the gcc link commands output during the build, in this case there is only one of them of any significance, the final linking:
gcc -o tcc tcc.o libtcc.a -lm -ldl
Which makes this one a piece of cake, invent your own as:
(armv6l:1) /home/tinycc # gcc --static --static-libgcc -o tcc-static tcc.o libtcc.a -lm -ldl
(armv6l:1) /home/tinycc # ldd tcc-static
not a dynamic executable
(armv6l:1) /home/tinycc # strip --strip-unneeded tcc-static
Which disables the functioning of libdl but if you can live without the -run option ...
(The -run option causes this tcc-static to hang, it would take a bit of further tweaking to make -run work while libdl was statically linked).
(armv6l:1) /home # ./tcc-static -o hello hello.c
(armv6l:1) /home # ./hello
Now I am done, a static build of tcc v-0.9.26 (un-released) taken from the head of the tcc project repository @ Debian. With the Debian patches installed (which shouldn't have changed ARM behavior).
What some users probably need is a build of this with SYSROOT=/mnt/us included in the configure; maybe even add /mnt/us/lib and /mnt/us/include into the tcc-static search paths. But those are documented options in the ./configure --help file and now anyone can do it with these two posts.