aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-05-11 23:08:08 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-05-11 23:08:08 +0300
commit5cb26317c8b39890abd247335885fe6f4c07146e (patch)
treee40a08106c7b54c2d59cfda857cc892348fb30b4 /Makefile
parent27ffa747f36aee9c1d5bbc61395a078238366070 (diff)
downloadkmi-5cb26317c8b39890abd247335885fe6f4c07146e.tar.gz
kmi-5cb26317c8b39890abd247335885fe6f4c07146e.zip
only init is pic and fix a warning
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 89f8033..3d70d6b 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ DEBUGFLAGS != [ $(RELEASE) ] \
&& echo "-flto -O2 -DNDEBUG" \
|| echo "-O0 -DDEBUG"
-CFLAGS = -ffreestanding -nostdlib -fno-pie -std=c17 -Wall -Wextra -Wvla -D$(ARCH) -g -fpic
+CFLAGS = -ffreestanding -nostdlib -fno-pie -std=c17 -Wall -Wextra -Wvla -D$(ARCH) -g
DEPFLAGS = -MT $@ -MMD -MP -MF $@.d
LINTFLAGS = -fsyntax-only
PREPROCESS = -E
@@ -71,7 +71,7 @@ KERNEL_LINK := arch/$(ARCH)/conf/kernel-link
INIT_LINK := arch/$(ARCH)/conf/init-link
KERN_FLAGS != [ $(UBSAN) ] && echo -fsanitize=undefined || echo
-INIT_FLAGS :=
+INIT_FLAGS := -fpic
KERNEL_OBJECTS != ./scripts/gen-deps --kernel --compile "$(KERNEL_SOURCES)"
INIT_OBJECTS != ./scripts/gen-deps --init --compile "$(INIT_SOURCES)"