From 38853b111f9b61be6f67e1cbd8eeee567cdba4ac Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 5 Jan 2019 20:59:00 +0100 Subject: [PATCH] FIX: adding directives to reduce size on systems like Gentoo Hardned (see https://github.com/iceman1001/proxmark3/issues/268) --- armsrc/Makefile | 5 +++-- bootrom/Makefile | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/armsrc/Makefile b/armsrc/Makefile index b69e724e0..76f3a0173 100644 --- a/armsrc/Makefile +++ b/armsrc/Makefile @@ -122,8 +122,9 @@ APP_CFLAGS += $(ZLIB_CFLAGS) # zlib includes: APP_CFLAGS += -I../zlib -# stdint.h provided locally until GCC 4.5 becomes C99 compliant -APP_CFLAGS += -I. +# stdint.h provided locally until GCC 4.5 becomes C99 compliant, +# stack-protect , no-pie reduces size on Gentoo Hardened 8.2 gcc +APP_CFLAGS += -I. -fno-stack-protector -fno-pie # Compile these in thumb mode (small size) THUMBSRC = start.c \ diff --git a/bootrom/Makefile b/bootrom/Makefile index a579c46d3..c7e879bda 100644 --- a/bootrom/Makefile +++ b/bootrom/Makefile @@ -25,6 +25,10 @@ VERSIONSRC = version.c # stdint.h provided locally until GCC 4.5 becomes C99 compliant APP_CFLAGS = -I. -fno-strict-aliasing -ffunction-sections -fdata-sections +# stack-protect , no-pie reduces size on Gentoo Hardened 8.2 gcc +APP_CFLAGS += -fno-stack-protector -fno-pie + + # Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC include ../common/Makefile.common