diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-11-24 08:36:07 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-11-24 08:43:23 -0500 |
commit | 0624e265abb032c8eb5d309292c095cb7648cef0 (patch) | |
tree | d4415f2536190fde6b2caa4d1fac59d87212c4ee | |
parent | bdf1690cb2e30d12ba2fbce18eb9198f06297eb8 (diff) | |
download | rockbox-0624e265ab.tar.gz rockbox-0624e265ab.zip |
build: Various LTO fixes
* Give arm panicf_f() USED_ATTR
* Ensure start_thread() has USED_ATTR
Change-Id: I6a833be7fbe25410c21e0df233fcae91e451bf00
-rw-r--r-- | firmware/asm/m68k/thread.c | 2 | ||||
-rw-r--r-- | firmware/asm/mips/thread-mips32.c | 2 | ||||
-rw-r--r-- | firmware/firmware.make | 2 | ||||
-rw-r--r-- | firmware/panic.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/firmware/asm/m68k/thread.c b/firmware/asm/m68k/thread.c index de07b29729..8681ce179c 100644 --- a/firmware/asm/m68k/thread.c +++ b/firmware/asm/m68k/thread.c @@ -25,7 +25,7 @@ * Start the thread running and terminate it if it returns *--------------------------------------------------------------------------- */ -void start_thread(void); /* Provide C access to ASM label */ +void start_thread(void) USED_ATTR; /* Provide C access to ASM label */ static void USED_ATTR __start_thread(void) { /* a0=macsr, a1=context */ diff --git a/firmware/asm/mips/thread-mips32.c b/firmware/asm/mips/thread-mips32.c index 3da8de560b..f930a41c68 100644 --- a/firmware/asm/mips/thread-mips32.c +++ b/firmware/asm/mips/thread-mips32.c @@ -26,7 +26,7 @@ *--------------------------------------------------------------------------- */ -void start_thread(void); /* Provide C access to ASM label */ +void start_thread(void) USED_ATTR; /* Provide C access to ASM label */ static void USED_ATTR _start_thread(void) { /* t1 = context */ diff --git a/firmware/firmware.make b/firmware/firmware.make index e70de7c881..b840c90ba8 100644 --- a/firmware/firmware.make +++ b/firmware/firmware.make @@ -49,7 +49,7 @@ $(BUILDDIR)/sysfont.o: $(SYSFONTX) $(BUILDDIR)/sysfont.h ifdef USE_LTO $(BUILDDIR)/firmware/asm/%.o: CFLAGS += -fno-lto -$(BUILDDIR)/firmware/kernel/%.o: CFLAGS += -fno-lto +$(BUILDDIR)/firmware/kernel/thread.o: CFLAGS += -fno-lto endif # GNU make (at least) has a bug/feature that exported variable are not available diff --git a/firmware/panic.c b/firmware/panic.c index bbe241a26d..57ab549f59 100644 --- a/firmware/panic.c +++ b/firmware/panic.c @@ -47,7 +47,7 @@ static char panic_buf[128]; #define LINECHARS (LCD_WIDTH/SYSFONT_WIDTH) - 2 #if defined(CPU_ARM) && defined(HAVE_RB_BACKTRACE) -void panicf_f( const char *fmt, ...); +void panicf_f( const char *fmt, ...) USED_ATTR; /* we wrap panicf() here with naked function to catch SP value */ void __attribute__((naked)) panicf( const char *fmt, ...) @@ -60,7 +60,7 @@ void __attribute__((naked)) panicf( const char *fmt, ...) } /* - * "Dude. This is pretty fucked-up, right here." + * "Dude. This is pretty fucked-up, right here." */ void panicf_f( const char *fmt, ...) { |