Skip to content

Commit

Permalink
Add -O2 and -fstack-protector-all to CFLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Nov 4, 2021
1 parent 3d492fc commit cb186bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ WERRORS += -Werror=switch
CFLAGS := -DKERNEL_NAME=\"$(OS_NAME)\"
CFLAGS += -DGIT_HASH=\"$(GIT_HASH)\"
CFLAGS += -DLOGS_WITH_COLORS
CFLAGS += -std=c11 -ffreestanding -nostdinc -nostdlib -fno-builtin
CFLAGS += -O2 -std=c11 -ffreestanding -nostdinc -nostdlib -fno-builtin
# We need to have -fno-omit-frame-pointer or the kernel stack backtrace won't
# get the stack.
CFLAGS += --target=x86_64 -fno-omit-frame-pointer -fstack-protector
CFLAGS += --target=x86_64 -fno-omit-frame-pointer -fstack-protector-all
CFLAGS += -mno-red-zone -mno-mmx -mno-sse -mno-sse2 -mno-avx -mno-avx2
CFLAGS += $(WERRORS)

Expand Down

0 comments on commit cb186bf

Please sign in to comment.