build: Updates for new limine-efi

This commit is contained in:
mintsuki 2022-09-02 11:01:13 +02:00
parent 5e06a79fdc
commit 07c446f293
2 changed files with 11 additions and 16 deletions

View File

@ -32,6 +32,8 @@ E9_OUTPUT ?= false
override S2CFLAGS := -Os
override BASE_CFLAGS := $(CROSS_CFLAGS)
override CROSS_CFLAGS += \
-g \
-std=gnu11 \
@ -60,7 +62,6 @@ ifeq ($(TARGET),bios)
-fno-pic \
-m32 \
-march=i686 \
-mtune=generic \
-mabi=sysv \
-mno-80387 \
-DBIOS
@ -71,7 +72,6 @@ ifeq ($(TARGET),uefi-x86-64)
-fpie \
-m64 \
-march=x86-64 \
-mtune=generic \
-mabi=sysv \
-mno-80387 \
-mno-mmx \
@ -89,11 +89,9 @@ ifeq ($(TARGET),uefi-ia32)
-fpie \
-m32 \
-march=i686 \
-mtune=generic \
-mabi=sysv \
-mno-80387 \
-DUEFI \
-DGNU_EFI_USE_MS_ABI \
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc' \
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc/ia32'
endif
@ -101,10 +99,8 @@ endif
ifeq ($(TARGET),uefi-aarch64)
override CROSS_CFLAGS += \
-fpie \
-mtune=generic \
-mgeneral-regs-only \
-DUEFI \
-DGNU_EFI_USE_MS_ABI \
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc' \
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc/aarch64'
endif
@ -296,9 +292,9 @@ $(call MKESCAPE,$(BUILDDIR))/BOOTX64.EFI: $(call MKESCAPE,$(BUILDDIR))/limine.el
$(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-x86_64.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_x86_64.o: $(call MKESCAPE,$(BUILDDIR))/limine-efi
unset CPPFLAGS; \
$(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \
CC="$(CROSS_CC) -m64 -march=x86-64 -mtune=generic" \
CFLAGS='-nostdinc' \
INCDIR='-I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
CC="$(CROSS_CC)" \
CFLAGS="$(BASE_CFLAGS)" \
CPPFLAGS='-nostdinc -I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
ARCH=x86_64
$(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi_x86_64.ld.in
@ -337,9 +333,9 @@ $(call MKESCAPE,$(BUILDDIR))/BOOTAA64.EFI: $(call MKESCAPE,$(BUILDDIR))/limine.e
$(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-aarch64.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_aarch64.o: $(call MKESCAPE,$(BUILDDIR))/limine-efi
unset CPPFLAGS; \
$(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \
CC="$(CROSS_CC) -mtune=generic" \
CFLAGS='-nostdinc' \
INCDIR='-I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
CC="$(CROSS_CC)" \
CFLAGS="$(BASE_CFLAGS)" \
CPPFLAGS='-nostdinc -I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
ARCH=aarch64
$(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi_aarch64.ld.in
@ -377,9 +373,9 @@ $(call MKESCAPE,$(BUILDDIR))/BOOTIA32.EFI: $(call MKESCAPE,$(BUILDDIR))/limine.e
$(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/crt0-efi-ia32.o $(call MKESCAPE,$(BUILDDIR))/limine-efi/gnuefi/reloc_ia32.o: $(call MKESCAPE,$(BUILDDIR))/limine-efi
unset CPPFLAGS; \
$(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \
CC="$(CROSS_CC) -m32 -march=i686 -mtune=generic" \
CFLAGS='-nostdinc' \
INCDIR='-I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
CC="$(CROSS_CC)" \
CFLAGS="$(BASE_CFLAGS)" \
CPPFLAGS='-nostdinc -I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
ARCH=ia32
$(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi_ia32.ld.in

View File

@ -26,7 +26,6 @@ override CROSS_CFLAGS += \
-fno-pic \
-m32 \
-march=i686 \
-mtune=generic \
-mabi=sysv \
-mno-80387 \
-Wshadow \