/************************************************************************/ /* compiler building blocks: definitions for all musl-libc PE targets */ /************************************************************************/ #ifndef __ASSEMBLER__ #include "cbb-common.h" #ifdef __cplusplus extern "C" { #endif /* features */ #undef TARGET_C99_FUNCTIONS #define TARGET_C99_FUNCTIONS (1) #undef TARGET_HAS_SINCOS #define TARGET_HAS_SINCOS (0) #undef TARGET_POSIX_IO #define TARGET_POSIX_IO (1) /* preferences */ #undef EMUTLS_PROVIDED_BY_PLATFORM #define EMUTLS_PROVIDED_BY_PLATFORM (1) #undef NO_IMPLICIT_EXTERN_C #define NO_IMPLICIT_EXTERN_C (1) #undef GTHREAD_USE_WEAK #define GTHREAD_USE_WEAK (0) #undef STANDARD_INCLUDE_DIR #define STANDARD_INCLUDE_DIR "/include" #undef LOCAL_INCLUDE_DIR #define LOCAL_INCLUDE_DIR "/local/include" #undef STANDARD_STARTFILE_PREFIX_1 #define STANDARD_STARTFILE_PREFIX_1 "/local/lib" #undef STANDARD_STARTFILE_PREFIX_2 #define STANDARD_STARTFILE_PREFIX_2 "/lib" /* specs */ #undef ASM_SPEC_ARCH #define ASM_SPEC_ARCH "%{m32:--32} " \ "%{m64:--64} " #undef ASM_SPEC_AVX #define ASM_SPEC_AVX "%{!mno-sse2avx:%{mavx:-msse2avx}} " \ "%{msse2avx:%{!mavx:-msse2avx}} " #undef ASM_SPEC #define ASM_SPEC ASM_SPEC_ARCH ASM_SPEC_AVX #undef CPP_SPEC_POSIX #define CPP_SPEC_POSIX "%{posix|mposix:-D_POSIX_SOURCE} " #undef CPP_SPEC_NTAPI #define CPP_SPEC_NTAPI "%{mntapi:-ffreestanding} " #undef CPP_SPEC #define CPP_SPEC CPP_SPEC_POSIX \ CPP_SPEC_NTAPI #undef LIB_SPEC #define LIB_SPEC "%{shared:-lc} " \ "%{pthread:-lpthread} " \ "--no-as-needed -lc " \ "--as-needed -lpsxscl " \ "%{static:" \ " --as-needed -lntapi" \ " --as-needed -ldalist" \ " --as-needed -lpemagine}" \ "%{!shared:%{!static:%{!midata:" \ " --as-needed -lldso}}}" #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{!mforeign:%R/lib/crti.o} " \ "%{!shared:%{mposix:%R/lib/crtposix.o}} " \ "%{!shared:%{mdinga:%R/lib/crtdinga.o}} " \ "%{!shared:%{mldso:" \ "%R/lib/%{static:S}crtldso.o}} " \ "%{!shared:%{mvrfs:" \ "%R/lib/%{static:S}crtvrfs.o}} " \ "%{!shared:%{!static:%{midata:" \ "%R/lib/crtidata.o}}} " \ "%{!shared:%R/lib/%{static:S}crt1.o} " \ "%{!shared:%{!mldso:%{!mvrfs:%{!midata:" \ "%R/lib/%{static:S}crtldso.o}}}} " \ "%{shared:%R/lib/crte.o} " \ "crtbegin.o%s " #undef ENDFILE_SPEC #define ENDFILE_SPEC "crtend.o%s " \ "%R/lib/crtn.o " LIB_SPEC #undef LINK_GCC_C_SEQUENCE_SPEC #define LINK_GCC_C_SEQUENCE_SPEC "%{static:--start-group} " \ "%L %G " \ "%{static:--end-group}%{!static:%G} " \ "--no-as-needed -lc " #undef LINK_DSO_SYM_SPEC #define LINK_DSO_SYM_SPEC "--exclude-symbols=" \ "__dso_handle," \ "_init,_fini," \ "_so_entry_point," \ "__so_entry_point," \ "__chkstk_ms," \ "___chkstk_ms," \ "dso_main_routine " #undef LINK_SPEC #define LINK_SPEC "%{rdynamic:--export-all-symbols} " \ "%{mntapi:-nostdlib} " \ "%{static:-static} " \ "%{shared:-shared} " \ "%{shared:%{moutput-def:" \ "--output-def %{o*:%.so.def%*}}} " \ "%{shared:%{mout-implib:" \ "--out-implib %{o*:%.lib.a%*}}} " \ "%{shared:%{mout-dsolib:" \ "--out-dsolib %{o*:%.lib.a%*}}} " \ "%{!shared:--entry _start} " \ "%{!shared:--image-base 0x1920000} " \ "%{shared:--entry __so_entry_point} " \ "%{shared:--enable-auto-image-base} " \ "--subsystem %{mconsole:console;:windows} " \ "%{!shared:--tsaware} " \ LINK_DSO_SYM_SPEC #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS #ifdef __cplusplus } #endif #endif /* __ASSEMBLER__ */