It may be possible to eliminate the use of libgcc_s.a
with flags that prevent gcc
from using internal built-in functions (such as it's built-in memcpy), but you are probably best served by locating and using it.
Looks like this option should prevent the use of built-ins -fno-builtin
. See here for more details: http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
Linking with the Shared libgcc_s.so
If the libgcc_s.a
is missing, or it's desirable to use a shared libgcc_s with an otherwise static executable, this should do the job:
CFLAGS="-static -Wl,-Bdynamic,-lgcc_s,-Bstatic"