Limine Bare Bones: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
Backport changes from limine-barebones GitHub repo |
mNo edit summary |
||
Line 163: | Line 163: | ||
# User controllable CFLAGS. |
# User controllable CFLAGS. |
||
CFLAGS ?= -O2 - |
CFLAGS ?= -g -O2 -pipe -Wall -Wextra |
||
# User controllable preprocessor flags. We set none by default. |
# User controllable preprocessor flags. We set none by default. |
||
Line 176: | Line 176: | ||
# Internal C flags that should not be changed by the user. |
# Internal C flags that should not be changed by the user. |
||
override CFLAGS += \ |
override CFLAGS += \ |
||
⚫ | |||
-std=c11 \ |
-std=c11 \ |
||
-ffreestanding \ |
-ffreestanding \ |
||
-fno-stack-protector \ |
-fno-stack-protector \ |
||
-fno-stack-check \ |
-fno-stack-check \ |
||
⚫ | |||
-fno-pie \ |
-fno-pie \ |
||
-fno-pic \ |
-fno-pic \ |
||
Line 192: | Line 192: | ||
-mno-red-zone \ |
-mno-red-zone \ |
||
-mcmodel=kernel \ |
-mcmodel=kernel \ |
||
-MMD |
-MMD \ |
||
-I. |
|||
# Internal linker flags that should not be changed by the user. |
# Internal linker flags that should not be changed by the user. |
||
Line 198: | Line 199: | ||
-nostdlib \ |
-nostdlib \ |
||
-static \ |
-static \ |
||
-m elf_x86_64 \ |
|||
-z max-page-size=0x1000 \ |
-z max-page-size=0x1000 \ |
||
-T linker.ld |
-T linker.ld |
||
# Check if the linker supports -no-pie and enable it if it does. |
|||
ifeq ($(shell $(LD) --help 2>&1 | grep 'no-pie' >/dev/null 2>&1; echo $$?),0) |
|||
override LDFLAGS += -no-pie |
|||
endif |
|||
# Internal nasm flags that should not be changed by the user. |
# Internal nasm flags that should not be changed by the user. |
||
Line 251: | Line 258: | ||
# The entry name that will be displayed in the boot menu |
# The entry name that will be displayed in the boot menu |
||
:myOS |
:myOS |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
</source> |
</source> |
||