Skip to content

Commit

Permalink
[Bootloader] Fixup makefile, I think
Browse files Browse the repository at this point in the history
Because `--fatal-warnings` is passed to ld from *somewhere*, and newer
versions of ld warn on executable stack, that caused it to error every
time. On top of that, it wasn't looking in the right place for the
object files and libraries it was linking with, so I fixed those paths
up (I think).

If you are reading this from a bisect because you can no longer build
the bootloader, I am dearly sorry.
  • Loading branch information
LensPlaysGames committed Nov 7, 2023
1 parent 5a860bb commit 359421c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gnu-efi/bootloader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ TOPDIR = $(SRCDIR)/..
CDIR=$(TOPDIR)/..
LINUX_HEADERS = /usr/src/sys/build
CPPFLAGS += -D__KERNEL__ -I$(LINUX_HEADERS)/include
CRTOBJS = ../gnuefi/crt0-efi-$(ARCH).o
CRTOBJS = $(TOPDIR)/${ARCH}/gnuefi/crt0-efi-$(ARCH).o

LDSCRIPT = $(TOPDIR)/gnuefi/elf_$(ARCH)_efi.lds
ifneq (,$(findstring FreeBSD,$(OS)))
LDSCRIPT = $(TOPDIR)/gnuefi/elf_$(ARCH)_fbsd_efi.lds
endif

LDFLAGS += -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
LDFLAGS += -shared -Bsymbolic -L$(TOPDIR)/$(ARCH)/lib -L$(TOPDIR)/$(ARCH)/gnuefi $(CRTOBJS) --no-warn-execstack

LOADLIBES += -lefi -lgnuefi
LOADLIBES += $(LIBGCC)
Expand Down

0 comments on commit 359421c

Please sign in to comment.