Merge branch 'bugfix/windows_build' into 'master'

Disable link time optimisation for bootloader

See merge request !1044
This commit is contained in:
Ivan Grokhotkov 2017-08-07 17:19:16 +08:00
commit 938085e749
3 changed files with 3 additions and 17 deletions

View File

@ -43,16 +43,7 @@ config BOOTLOADER_SPI_WP_PIN
The default value (GPIO 7) is correct for WP pin on ESP32-D2WD integrated flash. The default value (GPIO 7) is correct for WP pin on ESP32-D2WD integrated flash.
config BOOTLOADER_LTO endmenu # Bootloader
bool "Build bootloader with Link Time Optimisation"
default n
help
Setting this option enables gcc Link Time Optimisation for the bootloader build & link pass.
This gives a smaller bootloader binary (can be useful if secure boot & flash encryption & logging are all enabled), and can
give faster boot times, but it makes the bootloader harder to debug.
endmenu # Bootloader config
menu "Security features" menu "Security features"
@ -226,7 +217,7 @@ config FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_CACHE
config SECURE_BOOT_TEST_MODE config SECURE_BOOT_TEST_MODE
bool "Secure boot test mode: don't permanently set any efuses" bool "Secure boot test mode: don't permanently set any efuses"
depends on SECURE_BOOT_INSECURE depends on SECURE_BOOT_INSECURE
default n default N
help help
If this option is set, all permanent secure boot changes (via Efuse) are disabled. If this option is set, all permanent secure boot changes (via Efuse) are disabled.

View File

@ -2,8 +2,3 @@
# paths can be added at this level (we need binary librtc to be # paths can be added at this level (we need binary librtc to be
# available to link bootloader). # available to link bootloader).
COMPONENT_SUBMODULES += $(IDF_PATH)/components/esp32/lib COMPONENT_SUBMODULES += $(IDF_PATH)/components/esp32/lib
ifdef CONFIG_BOOTLOADER_LTO
CFLAGS += -flto
EXTRA_LDFLAGS += -Wl,-flto
endif

View File

@ -290,7 +290,7 @@ export HOSTCC HOSTLD HOSTAR HOSTOBJCOPY SIZE
CC := $(call dequote,$(CONFIG_TOOLPREFIX))gcc CC := $(call dequote,$(CONFIG_TOOLPREFIX))gcc
CXX := $(call dequote,$(CONFIG_TOOLPREFIX))c++ CXX := $(call dequote,$(CONFIG_TOOLPREFIX))c++
LD := $(call dequote,$(CONFIG_TOOLPREFIX))ld LD := $(call dequote,$(CONFIG_TOOLPREFIX))ld
AR := $(call dequote,$(CONFIG_TOOLPREFIX))gcc-ar AR := $(call dequote,$(CONFIG_TOOLPREFIX))ar
OBJCOPY := $(call dequote,$(CONFIG_TOOLPREFIX))objcopy OBJCOPY := $(call dequote,$(CONFIG_TOOLPREFIX))objcopy
SIZE := $(call dequote,$(CONFIG_TOOLPREFIX))size SIZE := $(call dequote,$(CONFIG_TOOLPREFIX))size
export CC CXX LD AR OBJCOPY SIZE export CC CXX LD AR OBJCOPY SIZE