aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--common/uapi/dispatch.c4
2 files changed, 3 insertions, 5 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)"
diff --git a/common/uapi/dispatch.c b/common/uapi/dispatch.c
index 8db7982..8ffbf54 100644
--- a/common/uapi/dispatch.c
+++ b/common/uapi/dispatch.c
@@ -36,9 +36,7 @@ SYSCALL_DEFINE0(noop)(struct tcb *t)
*/
SYSCALL_DEFINE1(putch)(struct tcb *t, sys_arg_t a)
{
- const char c[2] = {a, 0};
- MAYBE_UNUSED(c);
- dbg((const char *)&c);
+ dbg("%c", (char)a);
set_args(t, SYS_RET1(OK));
}