From 4b4bfec8a312132acc84b5166998d0cfa7c01931 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 18 May 2021 18:37:19 +0200 Subject: Improved entire building chain (especially debugging) --- apps/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/Makefile') diff --git a/apps/Makefile b/apps/Makefile index 98bec47..2884040 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -1,11 +1,12 @@ # MIT License, Copyright (c) 2020 Marvin Borner -CFLAGS = $(CFLAGS_DEFAULT) -I$(LIBS)/ -I$(LIBS)/libc/inc/ -pie -fPIE -fPIC -DUSER +CFLAGS = $(CFLAGS_DEFAULT) -I$(LIBS)/ -I$(LIBS)/libc/inc/ -DUSER LDFLAGS = --section-start=.text=0x42000000 -L$(BUILD) DIRS = $(wildcard */.) -ifneq ($(DEBUG), 1) +ifeq ($(CONFIG_USER_PIE), true) LDFLAGS += -pie -no-dynamic-linker + CFLAGS += -pie -fPIE -fPIC endif export -- cgit v1.2.3