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
LOCAL_STATIC_LIBRARIES += crt0
LOCAL_CFLAGS += -DUSE_MUSL_PRINTF
LOCAL_LDFLAGS := -lm
endif

View File

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

View File

@@ -12,6 +12,10 @@
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) {
uint8_t out[8192];
xz_crc32_init();