From 7cf367f120d6c6a2e7d918f177d823691d061ca7 Mon Sep 17 00:00:00 2001 From: Nick Shipp Date: Wed, 12 Apr 2017 02:56:22 -0400 Subject: Switch to dietlibc --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fbe3a30..f4e0a45 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,16 @@ include config.mk -CC = musl-gcc +CC = diet -Os gcc OBJ = sinit.o BIN = sinit -CFLAGS = -Os +CFLAGS = -Os -flto -s -fno-asynchronous-unwind-tables -fno-unwind-tables +LDFLAGS = -flto -Os -static -Wl,--gc-sections -Wl,--strip-all -Wl,-z,norelro -fno-asynchronous-unwind-tables -Wl,--build-id=none all: $(BIN) poweroff reboot $(BIN): $(OBJ) $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS) + strip -R .comment -R .jcr -R .eh_data -R .note -R .eh_frame $@ $(OBJ): config.h -- cgit v1.2.3-54-g00ecf