1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu
Sören Tempel 628c199f51 riscv_common: explicitly mark handle_trap as used
The handle_trap function is used internally by the trap_entry
implementation from the same file. However, the trap_entry
implementation calls handle_trap from inline assembly. This makes it
difficult for the compiler to infer that the handle_trap function is
used at all. This causes issues when LTO is enabled.

Without this patch compiling any RISC-V RIOT code with `LTO=1` causes
the following linker error:

	/home/soeren/src/RIOT/cpu/riscv_common/irq_arch.c:134: undefined reference to `handle_trap'
	/tmp/hello-world.elf.Nngidp.ltrans0.ltrans.o:cpu/riscv_common/irq_arch.c:134:(.text.trap_entry+0x34):
	  relocation truncated to fit: R_RISCV_GPREL_I against undefined symbol `handle_trap'

This commit fixes LTO support for RISC-V.

While at it, also mark the function as static as it is only used by the
trap_entry function from the same compilation unit.
2021-05-05 15:03:12 +02:00
..
arm7_common cpu: make newlib_nano a DEFAULT_MODULE 2021-05-04 12:12:36 +02:00
atmega32u4 cpu/atmega_common: use TIMER_CHANNEL_NUMOF 2020-06-24 00:45:35 +02:00
atmega128rfa1 cpu/atmega*: drop ldscripts_compat 2021-01-22 19:05:20 +01:00
atmega256rfr2 cpu/atmega*: drop ldscripts_compat 2021-01-22 19:05:20 +01:00
atmega328p cpu/atmega*: drop ldscripts_compat 2021-01-22 19:05:20 +01:00
atmega1281 cpu/atmega*: drop ldscripts_compat 2021-01-22 19:05:20 +01:00
atmega1284p cpu/atmega*: drop ldscripts_compat 2021-01-22 19:05:20 +01:00
atmega2560 cpu/atmega*: drop ldscripts_compat 2021-01-22 19:05:20 +01:00
atmega_common cpu/atmega_common: RTC: get rid of isr_flag 2021-05-04 23:14:35 +02:00
atxmega cpu/atxmega/periph/i2c: Add i2c driver 2021-04-25 22:06:23 -03:00
avr8_common cpu/avr8_common: move ldscripts from atmega_common 2021-03-30 10:50:09 +02:00
cc26x0_cc13x0 cpu/cc26x0_cc13x0: use SetupTrimDevice only on cc26x0 2021-02-08 17:25:42 +01:00
cc26x2_cc13x2 cpu/*: remove unused assert.h include 2020-10-22 11:13:09 +02:00
cc26xx_cc13xx cpu/cc26xx_cc13xx: add CPU documentation 2021-02-18 11:28:06 +01:00
cc2538 cpu: add periph_rtt_overflow feature 2021-04-30 11:58:00 +02:00
cortexm_common cpu: make newlib_nano a DEFAULT_MODULE 2021-05-04 12:12:36 +02:00
efm32 cpu: add periph_rtt_overflow feature 2021-04-30 11:58:00 +02:00
esp32 cpu: make newlib_nano a DEFAULT_MODULE 2021-05-04 12:12:36 +02:00
esp8266 esp8266: Support UART1 and other UART0 pins. 2021-05-02 12:27:27 +00:00
esp_common cpu/esp_common: fix possible overflow in calloc implementation 2021-05-05 08:58:34 +02:00
fe310 cpu: make newlib_nano a DEFAULT_MODULE 2021-05-04 12:12:36 +02:00
kinetis cpu: add periph_rtt_overflow feature 2021-04-30 11:58:00 +02:00
lm4f120 drivers/periph/timer: Use uint32_t for frequency 2020-10-30 22:02:12 +01:00
lpc23xx cpu/lpc23xx: implement periph/flashpage 2021-04-29 13:05:42 +02:00
lpc1768 cpu: make pm_layered a DEFAULT_MODULE 2021-01-27 13:21:20 +01:00
mips32r2_common cpu: mips32r2_common: set BITARITHM_HAS_CLZ 2021-02-02 11:14:38 +01:00
mips_pic32_common pic32_common: Add CPU specific xfa.ld variant 2021-02-16 14:55:26 +01:00
mips_pic32mx cpu/mips: remove never used load memory address 2020-10-13 18:57:39 +02:00
mips_pic32mz cpu/mips: remove never used load memory address 2020-10-13 18:57:39 +02:00
msp430_common cpu: make newlib_nano a DEFAULT_MODULE 2021-05-04 12:12:36 +02:00
msp430fxyz cpu/msp430: move default module to Makefile.default 2021-01-25 09:17:00 +01:00
native native/rtc: ensure no struct tm extra information is used 2021-04-01 18:19:15 +02:00
nrf5x_common cpu: add periph_rtt_overflow feature 2021-04-30 11:58:00 +02:00
nrf51 cpu/nrf51: define GPIO_COUNT 2021-02-14 00:29:47 +01:00
nrf52 cpu/nrf52/nrf802154: use driver specific legacy pseudomodule 2021-03-10 14:18:12 +01:00
qn908x Merge pull request #15689 from iosabi/qn908x_spi 2021-01-31 18:35:13 +01:00
riscv_common riscv_common: explicitly mark handle_trap as used 2021-05-05 15:03:12 +02:00
sam0_common Merge pull request #16421 from benpicco/cpu/sam0_common-rtc_reorder 2021-05-03 22:07:09 +02:00
sam3 Merge pull request #16258 from maribu/cpu/sam3/periph_rtt 2021-03-30 17:47:30 +02:00
sam_common cpu/sam_common: set CPU_HAS_BITBAND 2020-08-08 12:44:11 +02:00
samd5x Merge pull request #15845 from benpicco/boards/adafruit-itsybitsy-m4 2021-02-09 19:41:43 +01:00
samd21 cpu: make pm_layered a DEFAULT_MODULE 2021-01-27 13:21:20 +01:00
saml1x cpu: make pm_layered a DEFAULT_MODULE 2021-01-27 13:21:20 +01:00
saml21 SAML21 CPU: support 4MHz, 8MHz, 12MHz CORE_CORECLOCK choices 2021-05-03 18:56:51 +02:00
stellaris_common cpu: do not locally export compilation variables 2019-08-29 10:35:53 +02:00
stm32 cpu/stm32/gen_kconfig: use openpyxl package instead of xlrd 2021-05-01 11:31:56 +02:00
doc.txt cpu/lpc23xx: rename Doxygen group 2020-07-16 17:01:10 +02:00
Kconfig treewide: change Kconfig prefix for module symbols 2020-08-31 09:57:28 +02:00