Reduce binary sizes for the kernel and userspace apps
This commit is contained in:
@ -4,7 +4,8 @@ include $(ROOT)/mk/grabsrc.mk
|
||||
|
||||
PUTCHAR_ ?= fb
|
||||
|
||||
CFLAGS := -ffreestanding -Wall -Wextra -g -fcommon -nostdinc
|
||||
CFLAGS := -ffreestanding -Wall -Wextra -fcommon -nostdinc \
|
||||
-fdata-sections -ffunction-sections
|
||||
|
||||
CFLAGS += -I. \
|
||||
-I$(ROOT)/limine \
|
||||
@ -24,7 +25,8 @@ CFLAGS += -I. \
|
||||
|
||||
include arch/$(ARCH)/$(ARCH).mk
|
||||
|
||||
LDFLAGS += -nostdlib -static -T arch/$(ARCH)/link.ld $(shell $(CC) -print-libgcc-file-name)
|
||||
LDFLAGS += -nostdlib -static -T arch/$(ARCH)/link.ld $(shell $(CC) -print-libgcc-file-name) \
|
||||
--gc-sections --strip-all
|
||||
|
||||
SRCFILES :=
|
||||
|
||||
|
||||
Reference in New Issue
Block a user