Skip to content

Commit d85a4fc

Browse files
committed
remove unneeded -fno-inline-functions and -ggdb3; fix cxd56 noreturn warning
1 parent 40abcd1 commit d85a4fc

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

ports/cxd56/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ CFLAGS += \
7474
-fdata-sections \
7575
-Wall \
7676

77-
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
77+
OPTIMIZATION_FLAGS ?= -O2
7878

7979
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
8080
CFLAGS += $(OPTIMIZATION_FLAGS)

ports/cxd56/common-hal/microcontroller/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
6161
void common_hal_mcu_reset(void) {
6262
filesystem_flush();
6363
boardctl(BOARDIOC_RESET, 0);
64+
// boardctl is noreturn in this case.
65+
__builtin_unreachable();
6466
}
6567

6668
static const mp_rom_map_elem_t mcu_pin_globals_table[] = {

ports/litex/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ifeq ($(DEBUG), 1)
3232
OPTIMIZATION_FLAGS ?= -Og
3333
else
3434
CFLAGS += -DNDEBUG -ggdb3
35-
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
35+
OPTIMIZATION_FLAGS ?= -O2
3636
endif
3737

3838
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk

ports/nordic/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ ifeq ($(DEBUG), 1)
3636
CFLAGS += -ggdb3
3737
OPTIMIZATION_FLAGS = -Og
3838
else
39-
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
40-
CFLAGS += -DNDEBUG -ggdb3
39+
OPTIMIZATION_FLAGS ?= -O2
40+
CFLAGS += -DNDEBUG
4141
endif
4242

4343
ifeq ($(NRF_DEBUG_PRINT), 1)

ports/silabs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ifeq ($(DEBUG), 1)
7171
CFLAGS += -fno-inline -fno-ipa-sra -Og
7272
else
7373
CFLAGS += -DNDEBUG
74-
OPTIMIZATION_FLAGS ?= -Os -fno-inline-functions
74+
OPTIMIZATION_FLAGS ?= -Os
7575
CFLAGS += -g
7676
endif
7777

ports/stm/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ ifeq ($(DEBUG), 1)
3838
CFLAGS += -fno-inline -fno-ipa-sra
3939
else
4040
CFLAGS += -DNDEBUG
41-
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
42-
CFLAGS += -ggdb3
41+
OPTIMIZATION_FLAGS ?= -O2
4342
endif
4443

4544
# to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk

0 commit comments

Comments
 (0)