Skip to content

Commit 3398364

Browse files
committed
litecross: force gcc to use init/fini arrays
I overlooked that GCC was not doing this by default for musl, since binutils ld automatically converts the .ctors/.dtors GCC emits to init/fini arrays at link time. unfortunately lld does not do the same, so without --enable-initfini-array, GCC produces object files that lld will mislink unless it was configured with support for legacy GCC ctors.
1 parent 5b40568 commit 3398364

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

litecross/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ FULL_GCC_CONFIG = --enable-languages=c,c++ \
7878
--disable-libmudflap --disable-libsanitizer \
7979
--disable-gnu-indirect-function \
8080
--disable-libmpx \
81+
--enable-initfini-array \
8182
--enable-libstdcxx-time=rt
8283

8384
FULL_MUSL_CONFIG = $(MUSL_CONFIG) \

0 commit comments

Comments
 (0)