Skip to content

Commit

Permalink
boards/esp32: Enable canaries stack protection to ESP32 chips
Browse files Browse the repository at this point in the history
  • Loading branch information
acassis authored and xiaoxiang781216 committed Dec 21, 2021
1 parent dfcb3ce commit aa41b97
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions boards/xtensa/esp32/esp32-devkitc/scripts/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
endif

ifeq ($(CONFIG_STACK_CANARIES),y)
ARCHOPTIMIZATION += -fstack-protector-all
endif

ifneq ($(CONFIG_DEBUG_NOOPT),y)
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
Expand Down
4 changes: 4 additions & 0 deletions boards/xtensa/esp32/esp32-ethernet-kit/scripts/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
endif

ifeq ($(CONFIG_STACK_CANARIES),y)
ARCHOPTIMIZATION += -fstack-protector-all
endif

ifneq ($(CONFIG_DEBUG_NOOPT),y)
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
Expand Down
4 changes: 4 additions & 0 deletions boards/xtensa/esp32/esp32-wrover-kit/scripts/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
endif

ifeq ($(CONFIG_STACK_CANARIES),y)
ARCHOPTIMIZATION += -fstack-protector-all
endif

ifneq ($(CONFIG_DEBUG_NOOPT),y)
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
Expand Down
4 changes: 4 additions & 0 deletions boards/xtensa/esp32/ttgo_lora_esp32/scripts/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
endif

ifeq ($(CONFIG_STACK_CANARIES),y)
ARCHOPTIMIZATION += -fstack-protector-all
endif

ifneq ($(CONFIG_DEBUG_NOOPT),y)
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
Expand Down

0 comments on commit aa41b97

Please sign in to comment.