mirror of
https://github.com/frida/tinycc
synced 2025-01-01 17:44:26 +03:00
Use libtcc.a for static link even with USE_LIBGCC
When statically linking, runtime library should be static as well. tcc could link with libgcc.a but it's in a gcc version specific directory. Another solution, followed by this patch, is to use libtcc.a when statically linking, even if USE_LIBGCC was configured.
This commit is contained in:
parent
e0e9a2a295
commit
9e79b18bca
2
configure
vendored
2
configure
vendored
@ -273,7 +273,7 @@ Advanced options (experts only):
|
||||
--strip-binaries strip symbol tables from resulting binaries
|
||||
--disable-static make libtcc.so instead of libtcc.a
|
||||
--disable-rpath disable use of -rpath with the above
|
||||
--with-libgcc use /lib/libgcc_s.so.1 instead of libtcc.a
|
||||
--with-libgcc use libgcc_s.so.1 instead of libtcc.a in dynamic link
|
||||
--enable-mingw32 build windows version on linux with mingw32
|
||||
--enable-cygwin build windows version on windows with cygwin
|
||||
--enable-cross build cross compilers
|
||||
|
7
tccelf.c
7
tccelf.c
@ -1363,7 +1363,12 @@ ST_FUNC void tcc_add_runtime(TCCState *s1)
|
||||
if (!s1->nostdlib) {
|
||||
tcc_add_library(s1, "c");
|
||||
#ifdef CONFIG_USE_LIBGCC
|
||||
tcc_add_file(s1, TCC_LIBGCC);
|
||||
if (!s1->static_link)
|
||||
tcc_add_file(s1, TCC_LIBGCC);
|
||||
#if !defined WITHOUT_LIBTCC
|
||||
else
|
||||
tcc_add_support(s1, "libtcc1.a");
|
||||
#endif
|
||||
#elif !defined WITHOUT_LIBTCC
|
||||
tcc_add_support(s1, "libtcc1.a");
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user