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 S2CFLAGS := -Os
override BASE_CFLAGS := $(CROSS_CFLAGS)
override CROSS_CFLAGS += \ override CROSS_CFLAGS += \
-g \ -g \
-std=gnu11 \ -std=gnu11 \
@ -60,7 +62,6 @@ ifeq ($(TARGET),bios)
-fno-pic \ -fno-pic \
-m32 \ -m32 \
-march=i686 \ -march=i686 \
-mtune=generic \
-mabi=sysv \ -mabi=sysv \
-mno-80387 \ -mno-80387 \
-DBIOS -DBIOS
@ -71,7 +72,6 @@ ifeq ($(TARGET),uefi-x86-64)
-fpie \ -fpie \
-m64 \ -m64 \
-march=x86-64 \ -march=x86-64 \
-mtune=generic \
-mabi=sysv \ -mabi=sysv \
-mno-80387 \ -mno-80387 \
-mno-mmx \ -mno-mmx \
@ -89,11 +89,9 @@ ifeq ($(TARGET),uefi-ia32)
-fpie \ -fpie \
-m32 \ -m32 \
-march=i686 \ -march=i686 \
-mtune=generic \
-mabi=sysv \ -mabi=sysv \
-mno-80387 \ -mno-80387 \
-DUEFI \ -DUEFI \
-DGNU_EFI_USE_MS_ABI \
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc' \ -I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc' \
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc/ia32' -I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc/ia32'
endif endif
@ -101,10 +99,8 @@ endif
ifeq ($(TARGET),uefi-aarch64) ifeq ($(TARGET),uefi-aarch64)
override CROSS_CFLAGS += \ override CROSS_CFLAGS += \
-fpie \ -fpie \
-mtune=generic \
-mgeneral-regs-only \ -mgeneral-regs-only \
-DUEFI \ -DUEFI \
-DGNU_EFI_USE_MS_ABI \
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc' \ -I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc' \
-I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc/aarch64' -I'$(call SHESCAPE,$(BUILDDIR))/limine-efi/inc/aarch64'
endif 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 $(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; \ unset CPPFLAGS; \
$(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \ $(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \
CC="$(CROSS_CC) -m64 -march=x86-64 -mtune=generic" \ CC="$(CROSS_CC)" \
CFLAGS='-nostdinc' \ CFLAGS="$(BASE_CFLAGS)" \
INCDIR='-I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \ CPPFLAGS='-nostdinc -I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
ARCH=x86_64 ARCH=x86_64
$(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi_x86_64.ld.in $(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 $(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; \ unset CPPFLAGS; \
$(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \ $(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \
CC="$(CROSS_CC) -mtune=generic" \ CC="$(CROSS_CC)" \
CFLAGS='-nostdinc' \ CFLAGS="$(BASE_CFLAGS)" \
INCDIR='-I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \ CPPFLAGS='-nostdinc -I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
ARCH=aarch64 ARCH=aarch64
$(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi_aarch64.ld.in $(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 $(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; \ unset CPPFLAGS; \
$(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \ $(MAKE) -C '$(call SHESCAPE,$(BUILDDIR))/limine-efi/gnuefi' \
CC="$(CROSS_CC) -m32 -march=i686 -mtune=generic" \ CC="$(CROSS_CC)" \
CFLAGS='-nostdinc' \ CFLAGS="$(BASE_CFLAGS)" \
INCDIR='-I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \ CPPFLAGS='-nostdinc -I$(call SHESCAPE,$(SRCDIR))/../freestanding-headers' \
ARCH=ia32 ARCH=ia32
$(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi_ia32.ld.in $(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi_ia32.ld.in

View File

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