summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-04-14 08:32:38 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-04-23 09:30:01 +0200
commitcc3fe524c2daa8c136e6484540130da7252a8f1b (patch)
tree6e3adc10a39c65707b5a80132b2a6455ce2587bc /Makefile
parentb6f26d614e65ddcd1b32989b7ef5ae002d5e6650 (diff)
build: Remove DISTRO build flag, don't optimize by default
Currently, when building with DISTRO=0 we optimize for the build host's architecture by default. This is not compatible with cross-compiling. Remove the DISTRO flag and only build with -O2 and no -march/-mtune flags by default. Support for specifying optimization flags via configure script will be added in a follow-up patch. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 3 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index a16ff7f..082737c 100644
--- a/Makefile
+++ b/Makefile
@@ -66,19 +66,12 @@ endif
# make CFLAGS="<flags>"
CFLAGS_DEF = -std=gnu99
CFLAGS_DEF += -pipe
+CFLAGS_DEF += -O2
ifeq ($(DEBUG), 1)
- CFLAGS_DEF += -O2
CFLAGS_DEF += -g
-else
- ifeq ($(DISTRO), 1)
- CFLAGS_DEF += -O2
- else
- CFLAGS_DEF += -march=native
- CFLAGS_DEF += -mtune=native
- CFLAGS_DEF += -O3
- endif
endif
+
ifeq ($(HARDENING), 1)
CFLAGS_DEF += -fPIE -pie
CFLAGS_DEF += -Wl,-z,relro,-z,now
@@ -128,7 +121,7 @@ VERSION_LONG = "$(VERSION_SHORT)$(CONFIG_RC) ($(NAME))"
export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION
export CROSS_COMPILE
-export DEBUG DISTRO HARDENING
+export DEBUG HARDENING
bold = $(shell tput bold)
normal = $(shell tput sgr0)