mirror of
https://github.com/VIKINGYFY/immortalwrt.git
synced 2025-12-16 17:15:26 +00:00
toolchain: gcc: add fanalyzer config option
Add gcc config option for fanalyzer. As a result of this option, a static analysis of the program flow is conducted, allowing interprocedural paths to be identified and warnings to be issued if problems are identified. Link: https://github.com/openwrt/openwrt/pull/12576 Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
parent
57e8eb6208
commit
557c174a3c
@ -250,6 +250,15 @@ menu "Global build settings"
|
|||||||
|
|
||||||
comment "Hardening build options"
|
comment "Hardening build options"
|
||||||
|
|
||||||
|
config PKG_FANALYZER
|
||||||
|
bool
|
||||||
|
prompt "Enable gcc fanalyzer"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Add -fanalyzer to the CFLAGS. As a result of this option, a static analysis
|
||||||
|
of the program flow is conducted, allowing interprocedural paths to be
|
||||||
|
identified and warnings to be issued if problems are identified.
|
||||||
|
|
||||||
config PKG_CHECK_FORMAT_SECURITY
|
config PKG_CHECK_FORMAT_SECURITY
|
||||||
bool
|
bool
|
||||||
prompt "Enable gcc format-security"
|
prompt "Enable gcc format-security"
|
||||||
|
|||||||
@ -9,6 +9,7 @@ PKG_SSP ?= 1
|
|||||||
PKG_FORTIFY_SOURCE ?= 1
|
PKG_FORTIFY_SOURCE ?= 1
|
||||||
PKG_RELRO ?= 1
|
PKG_RELRO ?= 1
|
||||||
PKG_DT_RELR ?= 1
|
PKG_DT_RELR ?= 1
|
||||||
|
PKG_FANALYZER ?= 0
|
||||||
|
|
||||||
ifdef CONFIG_PKG_CHECK_FORMAT_SECURITY
|
ifdef CONFIG_PKG_CHECK_FORMAT_SECURITY
|
||||||
ifeq ($(strip $(PKG_CHECK_FORMAT_SECURITY)),1)
|
ifeq ($(strip $(PKG_CHECK_FORMAT_SECURITY)),1)
|
||||||
@ -77,3 +78,8 @@ ifdef CONFIG_PKG_DT_RELR
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef CONFIG_PKG_FANALYZER
|
||||||
|
ifeq ($(strip $(PKG_FANALYZER)),1)
|
||||||
|
TARGET_CFLAGS += -fanalyzer
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user