aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMichael Heimpold <mhei@heimpold.de>2015-08-30 14:33:46 +0200
committerMichael Heimpold <mhei@heimpold.de>2015-08-30 14:33:46 +0200
commit0db8bac00cc787a494b84a92322aeb07cc852051 (patch)
tree564af8588660c213d8ee8635a0b408c61151e6e2 /utils
parent0ec3a557677af9eb617e1451f5963148904e9e83 (diff)
mmc-utils: don't set -D_FORTIFY_SOURCE in Makefile, take 2
Also already mentioned in ba4338d6f7753c77b03357aa74cc63771e94074a, the security feature FORTIFY_SOURCE could be set globally. The current approach tries to undefine and redefine it, however, the order on the command line prevents this from being successfully, e.g.: arm-openwrt-linux-muslgnueabi-gcc ... -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ... -D_FORTIFY_SOURCE=1 ... `---------------v-------------------' `--------v--------' AM_CFLAGS OpenWrt params So to have the original source (static) _FORTIFY_SOURCE=2 define, the only option is to remove it from AM_CFLAGS completely, and to pass it after the OpenWrt settings explicitely in the Makefile. This should fix the buildbots finally. Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Diffstat (limited to 'utils')
-rw-r--r--utils/mmc-utils/Makefile4
-rw-r--r--utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch8
2 files changed, 5 insertions, 7 deletions
diff --git a/utils/mmc-utils/Makefile b/utils/mmc-utils/Makefile
index a089b2f4c..00a0531ec 100644
--- a/utils/mmc-utils/Makefile
+++ b/utils/mmc-utils/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=mmc-utils
PKG_VERSION=2015-05-01-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git
@@ -44,7 +44,7 @@ endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
- $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS)" \
+ $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" \
mmc
endef
diff --git a/utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch b/utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch
index 4a35b959b..1a2081335 100644
--- a/utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch
+++ b/utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch
@@ -1,11 +1,9 @@
-Index: mmc-utils-f4eb241519f8d500ce6068a70d2389be39ac5189/Makefile
-===================================================================
---- mmc-utils-f4eb241519f8d500ce6068a70d2389be39ac5189.orig/Makefile
-+++ mmc-utils-f4eb241519f8d500ce6068a70d2389be39ac5189/Makefile
+--- a/Makefile
++++ b/Makefile
@@ -1,5 +1,5 @@
CC ?= gcc
-AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-+AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
++AM_CFLAGS = -D_FILE_OFFSET_BITS=64
CFLAGS ?= -g -O2
objects = \
mmc.o \