Do not build necessary gnu-efi dependencies using the host compiler, use our toolchain instead
This commit is contained in:
parent
249d058931
commit
6c22743c7e
5
Makefile
5
Makefile
|
@ -68,11 +68,12 @@ test-clean:
|
|||
rm -rf test_image test.hdd test.iso
|
||||
|
||||
toolchain:
|
||||
./make_toolchain.sh ./toolchain -j`nproc`
|
||||
scripts/make_toolchain.sh "`realpath ./toolchain`" -j`nproc`
|
||||
|
||||
gnu-efi:
|
||||
git clone https://git.code.sf.net/p/gnu-efi/code --branch=3.0.12 --depth=1 $@
|
||||
$(MAKE) -C gnu-efi
|
||||
$(MAKE) -C gnu-efi/gnuefi CC=x86_64-elf-gcc AR=x86_64-elf-ar
|
||||
$(MAKE) -C gnu-efi/lib CC=x86_64-elf-gcc ARCH=x86_64 x86_64/efi_stub.o
|
||||
|
||||
ovmf:
|
||||
mkdir -p ovmf
|
||||
|
|
|
@ -76,3 +76,5 @@ cd build-gzip
|
|||
make
|
||||
make install
|
||||
cd ..
|
||||
|
||||
wget 'https://github.com/managarm/mlibc/raw/1f84a68500a2939f8dccd4083f8c111b2610cba6/options/elf/include/elf.h' -O "$PREFIX/lib/gcc/x86_64-elf/$GCCVERSION/include/elf.h"
|
|
@ -124,9 +124,9 @@ limine.elf: $(OBJ) font.o sys/smp_trampoline.o limine.map.o
|
|||
limine_efi.elf: $(OBJ) font.o sys/smp_trampoline.o
|
||||
$(LD) -shared -Bsymbolic \
|
||||
-T../gnu-efi/gnuefi/elf_x86_64_efi.lds \
|
||||
../gnu-efi/x86_64/gnuefi/crt0-efi-x86_64.o \
|
||||
../gnu-efi/x86_64/gnuefi/libgnuefi.a \
|
||||
../gnu-efi/x86_64/lib/x86_64/efi_stub.o \
|
||||
../gnu-efi/gnuefi/crt0-efi-x86_64.o \
|
||||
../gnu-efi/gnuefi/libgnuefi.a \
|
||||
../gnu-efi/lib/x86_64/efi_stub.o \
|
||||
$(OBJ) font.o sys/smp_trampoline.o -o $@
|
||||
|
||||
-include $(HEADER_DEPS)
|
||||
|
|
Loading…
Reference in New Issue