Browse Source

Merge pull request #11030 from jefferyto/golang-pie-tristate

golang: Update for ASLR PIE tristate option change
lilik-openwrt-22.03
Rosen Penev 5 years ago
committed by GitHub
parent
commit
f030d48c54
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions
  1. +13
    -1
      lang/golang/golang-package.mk
  2. +3
    -1
      lang/golang/golang/Makefile

+ 13
- 1
lang/golang/golang-package.mk View File

@ -120,10 +120,22 @@ GO_PKG_BUILD_BIN_DIR:=$(GO_PKG_BUILD_DIR)/bin$(if $(GO_HOST_TARGET_DIFFERENT),/$
GO_PKG_BUILD_DEPENDS_SRC:=$(STAGING_DIR)$(GO_PKG_PATH)/src
ifeq ($(CONFIG_PKG_ASLR_PIE),y)
ifdef CONFIG_PKG_ASLR_PIE_ALL
ifeq ($(strip $(PKG_ASLR_PIE)),1)
ifeq ($(GO_TARGET_PIE_SUPPORTED),1)
GO_PKG_ENABLE_PIE:=1
else
$(warning PIE buildmode is not supported for $(GO_OS)/$(GO_ARCH))
endif
endif
endif
ifdef CONFIG_PKG_ASLR_PIE_REGULAR
ifeq ($(strip $(PKG_ASLR_PIE_REGULAR)),1)
ifeq ($(GO_TARGET_PIE_SUPPORTED),1)
GO_PKG_ENABLE_PIE:=1
else
$(warning PIE buildmode is not supported for $(GO_OS)/$(GO_ARCH))
endif
endif
endif


+ 3
- 1
lang/golang/golang/Makefile View File

@ -92,10 +92,12 @@ BOOTSTRAP_UNPACK:=$(HOST_TAR) -C $(BOOTSTRAP_BUILD_DIR) --strip-components=1 -xz
RSTRIP:=:
STRIP:=:
ifeq ($(CONFIG_PKG_ASLR_PIE),y)
ifdef CONFIG_PKG_ASLR_PIE_ALL
ifeq ($(GO_TARGET_PIE_SUPPORTED),1)
PKG_GO_ENABLE_PIE:=1
PKG_GO_INSTALL_SUFFIX:=$(GO_TARGET_PIE_INSTALL_SUFFIX)
else
$(warning PIE buildmode is not supported for $(GO_OS)/$(GO_ARCH))
endif
endif


Loading…
Cancel
Save