Update crt0

This commit is contained in:
topjohnwu 2024-03-25 16:11:02 -07:00
parent 000a2e4d59
commit 21ed095601
4 changed files with 7 additions and 4 deletions

View File

@ -111,7 +111,6 @@ LOCAL_LDFLAGS := -static -T src/lto_fix.lds
ifdef B_CRT0 ifdef B_CRT0
LOCAL_STATIC_LIBRARIES += crt0 LOCAL_STATIC_LIBRARIES += crt0
LOCAL_CFLAGS += -DUSE_MUSL_PRINTF
LOCAL_LDFLAGS := -lm LOCAL_LDFLAGS := -lm
endif endif

View File

@ -6,9 +6,9 @@
using namespace std; using namespace std;
#ifdef USE_MUSL_PRINTF #ifdef USE_CRT0
// Switch to use the musl vfprintf
__asm__(".global vfprintf \n vfprintf = musl_vfprintf"); __asm__(".global vfprintf \n vfprintf = musl_vfprintf");
__asm__(".global vsscanf \n vsscanf = tfp_vsscanf");
#endif #endif
static void print_formats() { static void print_formats() {

@ -1 +1 @@
Subproject commit 6ec46be760069d4645204b09b96e8dd414c3ac2e Subproject commit 2afb00eb00575864009cbc62bd7a27842633c6b6

View File

@ -12,6 +12,10 @@
using namespace std; using namespace std;
#ifdef USE_CRT0
__asm__(".global vfprintf \n vfprintf = tfp_vfprintf");
#endif
bool unxz(out_stream &strm, rust::Slice<const uint8_t> bytes) { bool unxz(out_stream &strm, rust::Slice<const uint8_t> bytes) {
uint8_t out[8192]; uint8_t out[8192];
xz_crc32_init(); xz_crc32_init();