Changeset 46119


Ignore:
Timestamp:
2015-06-24T12:57:14+02:00 (3 years ago)
Author:
cyrus
Message:

hardening: make override variables more intuitive

Signed-off-by: Steven Barth <steven@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/hardening.mk

    r46108 r46119  
    77 
    88PKG_CHECK_FORMAT_SECURITY ?= 1 
    9 PKG_CC_STACKPROTECTOR_REGULAR ?= 1 
    10 PKG_CC_STACKPROTECTOR_STRONG ?= 1 
    11 PKG_FORTIFY_SOURCE_1 ?= 1 
    12 PKG_FORTIFY_SOURCE_2 ?= 1 
    13 PKG_RELRO_PARTIAL ?= 1 
    14 PKG_RELRO_FULL ?= 1 
     9PKG_SSP ?= 1 
     10PKG_FORTIFY_SOURCE ?= 1 
     11PKG_RELRO ?= 1 
    1512 
    1613ifdef CONFIG_PKG_CHECK_FORMAT_SECURITY 
     
    2017endif 
    2118ifdef CONFIG_PKG_CC_STACKPROTECTOR_REGULAR 
    22   ifeq ($(strip $(PKG_CC_STACKPROTECTOR_REGULAR)),1) 
     19  ifeq ($(strip $(PKG_SSP)),1) 
    2320    TARGET_CFLAGS += -fstack-protector 
    2421  endif 
    2522endif 
    2623ifdef CONFIG_PKG_CC_STACKPROTECTOR_STRONG 
    27   ifeq ($(strip $(PKG_CC_STACKPROTECTOR_STRONG)),1) 
     24  ifeq ($(strip $(PKG_SSP)),1) 
    2825    TARGET_CFLAGS += -fstack-protector-strong 
    2926  endif 
    3027endif 
    3128ifdef CONFIG_PKG_FORTIFY_SOURCE_1 
    32   ifeq ($(strip $(PKG_FORTIFY_SOURCE_1)),1) 
     29  ifeq ($(strip $(PKG_FORTIFY_SOURCE)),1) 
    3330    TARGET_CFLAGS += -D_FORTIFY_SOURCE=1 
    3431  endif 
    3532endif 
    3633ifdef CONFIG_PKG_FORTIFY_SOURCE_2 
    37   ifeq ($(strip $(PKG_FORTIFY_SOURCE_2)),1) 
     34  ifeq ($(strip $(PKG_FORTIFY_SOURCE)),1) 
    3835    TARGET_CFLAGS += -D_FORTIFY_SOURCE=2 
    3936  endif 
    4037endif 
    4138ifdef CONFIG_PKG_RELRO_PARTIAL 
    42   ifeq ($(strip $(PKG_RELRO_PARTIAL)),1) 
     39  ifeq ($(strip $(PKG_RELRO)),1) 
    4340    TARGET_CFLAGS += -Wl,-z,relro 
    4441    TARGET_LDFLAGS += -zrelro 
     
    4643endif 
    4744ifdef CONFIG_PKG_RELRO_FULL 
    48   ifeq ($(strip $(PKG_RELRO_FULL)),1) 
     45  ifeq ($(strip $(PKG_RELRO)),1) 
    4946    TARGET_CFLAGS += -Wl,-z,now -Wl,-z,relro 
    5047    TARGET_LDFLAGS += -znow -zrelro 
Note: See TracChangeset for help on using the changeset viewer.