fix Z - thanks masa!
This commit is contained in:
@@ -40,15 +40,16 @@ DEFINES := -DDISABLE_IPC -DTARGET="\"$(TARGET)\"" -DTARGET_VERSION="\"$(TARGET_V
|
||||
|
||||
ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
|
||||
|
||||
CFLAGS := -g -Wall -Os -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) -ffast-math
|
||||
CFLAGS := -g -Wall -Os \
|
||||
-ffast-math -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables -fno-unwind-tables \
|
||||
$(ARCH) $(DEFINES)
|
||||
|
||||
CFLAGS += $(INCLUDE) -D__SWITCH__
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -std=gnu++23
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++23
|
||||
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) -Wl,-wrap,__cxa_throw -Wl,-wrap,_Unwind_Resume -Wl,-wrap,__gxx_personality_v0
|
||||
|
||||
LIBS := $(foreach lib,$(LIBNAMES),-l$(lib)) -lnx
|
||||
|
||||
|
||||
@@ -82,7 +82,12 @@ namespace fileUtils {
|
||||
FILE* file = fopen(FILE_LOG_FILE_PATH, "a");
|
||||
|
||||
if (file) {
|
||||
fprintf(file, "[%lu] ", armGetSystemTick());
|
||||
struct timespec now;
|
||||
struct tm *timeInfo;
|
||||
clock_gettime(CLOCK_REALTIME, &now);
|
||||
timeInfo = localtime(&now.tv_sec);
|
||||
|
||||
fprintf(file, "[%02d:%02d:%02d] ", timeInfo->tm_hour, timeInfo->tm_min, timeInfo->tm_sec);
|
||||
vfprintf(file, format, args);
|
||||
fprintf(file, "\n");
|
||||
fclose(file);
|
||||
|
||||
@@ -56,19 +56,19 @@ extern "C"
|
||||
|
||||
// Ty to MasaGratoR for this!
|
||||
// This is done to save some space as they have no practical use in our case
|
||||
__attribute__((used)) void* __real___cxa_throw(void *thrown_exception, void *pvar, void (*dest)(void *));
|
||||
__attribute__((used)) void* __real__Unwind_Resume();
|
||||
__attribute__((used)) void* __real___gxx_personality_v0();
|
||||
void* __real___cxa_throw(void *thrown_exception, void *pvar, void (*dest)(void *));
|
||||
void* __real__Unwind_Resume();
|
||||
void* __real___gxx_personality_v0();
|
||||
|
||||
__attribute__((used)) void __wrap___cxa_throw(void *thrown_exception, void *pvar, void (*dest)(void *)) {
|
||||
void __wrap___cxa_throw(void *thrown_exception, void *pvar, void (*dest)(void *)) {
|
||||
abort();
|
||||
}
|
||||
|
||||
__attribute__((used)) void __wrap__Unwind_Resume() {
|
||||
void __wrap__Unwind_Resume() {
|
||||
return;
|
||||
}
|
||||
|
||||
__attribute__((used)) void __wrap___gxx_personality_v0() {
|
||||
void __wrap___gxx_personality_v0() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user