aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNick Shipp <nick@shipp.ninja>2017-04-12 02:56:22 -0400
committerNick Shipp <nick@shipp.ninja>2017-04-12 02:56:22 -0400
commit7cf367f120d6c6a2e7d918f177d823691d061ca7 (patch)
treef82c621e691b649439c6f399b187fe32683b6136 /Makefile
parenteee115c27274b20dfa9af8706a548fcf070b8473 (diff)
Switch to dietlibc
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
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