[build] Fix building on FreeBSD
FreeBSD requires the object format to be specified as elf_i386_fbsd, rather than elf_i386. Based on a patch from Eygene Ryabinkin <rea-fbsd@codelabs.ru>
This commit is contained in:
parent
5600955bdd
commit
d9c38d14d6
@ -52,6 +52,14 @@ VERYCLEANUP += .echocheck
|
|||||||
echo :
|
echo :
|
||||||
@$(ECHO) "Using \"$(ECHO_E)\" for \"echo -e\""
|
@$(ECHO) "Using \"$(ECHO_E)\" for \"echo -e\""
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Determine host OS
|
||||||
|
#
|
||||||
|
HOST_OS := $(shell uname -s)
|
||||||
|
hostos :
|
||||||
|
@$(ECHO) $(HOST_OS)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Check for tools that can cause failed builds
|
# Check for tools that can cause failed builds
|
||||||
|
@ -39,7 +39,11 @@ CFLAGS += -freg-struct-return
|
|||||||
#
|
#
|
||||||
CFLAGS += -m32
|
CFLAGS += -m32
|
||||||
ASFLAGS += --32
|
ASFLAGS += --32
|
||||||
|
ifeq ($(HOST_OS),FreeBSD)
|
||||||
|
LDFLAGS += -m elf_i386_fbsd
|
||||||
|
else
|
||||||
LDFLAGS += -m elf_i386
|
LDFLAGS += -m elf_i386
|
||||||
|
endif
|
||||||
|
|
||||||
# EFI requires -fshort-wchar, and nothing else currently uses wchar_t
|
# EFI requires -fshort-wchar, and nothing else currently uses wchar_t
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user