mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-17 08:00:32 +00:00
Add support for C++ thread safe statics
This commit is contained in:
parent
60f2ea36ca
commit
f491276b62
7 changed files with 120 additions and 6 deletions
|
@ -82,7 +82,7 @@ CC="$COSMO/o/third_party/gcc/bin/x86_64-linux-musl-gcc"
|
|||
ORIGINAL="$0 $*"
|
||||
PLATFORM="-D__COSMOPOLITAN__"
|
||||
PREDEF="-include libc/integral/normalize.inc"
|
||||
CCFLAGS="-fdata-sections -ffunction-sections -fno-pie -mno-tls-direct-seg-refs -mno-red-zone -fportcosmo"
|
||||
CCFLAGS="-fno-pie -mno-tls-direct-seg-refs -mno-red-zone -fportcosmo"
|
||||
CPPFLAGS="-nostdinc -iquote $COSMO -isystem $COSMOS/include -isystem $COSMO/libc/isystem"
|
||||
LDFLAGS="-static -no-pie -nostdlib -fuse-ld=bfd -Wl,-melf_x86_64"
|
||||
APEFLAGS="-L$COSMOS/lib -Wl,--gc-sections -Wl,-T,$COSMO/o/$MODE/ape/public/ape.lds $COSMO/o/$MODE/ape/ape-no-modify-self.o $COSMO/o/$MODE/libc/crt/crt.o"
|
||||
|
@ -90,7 +90,7 @@ LDLIBS="$COSMO/o/$MODE/cosmopolitan.a"
|
|||
|
||||
if [ x"$0" != x"${0%++}" ]; then
|
||||
CC="$COSMO/o/third_party/gcc/bin/x86_64-linux-musl-g++"
|
||||
CCFLAGS="$CCFLAGS -fno-rtti -fno-exceptions -fuse-cxa-atexit -fno-threadsafe-statics"
|
||||
CCFLAGS="$CCFLAGS -fno-rtti -fno-exceptions -fuse-cxa-atexit"
|
||||
LDLIBS="$COSMO/o/$MODE/third_party/libcxx/libcxx.a $LDLIBS"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue