BaseTools: Provide fat Mach-O binaries on Darwin

Merge pull request #63 from acidanthera/vit9696-fattools-20240327
This commit is contained in:
vit9696 2024-03-27 10:44:24 +03:00 committed by Mikhail Krichanov
parent fde2711dcc
commit e2fe2aa26d
1 changed files with 4 additions and 8 deletions

View File

@ -125,17 +125,13 @@ ifeq ($(HOST_ARCH), X64)
CPPFLAGS += "-DEFIAPI=__attribute__((ms_abi))"
endif
ifeq ($(HOST_ARCH), IA32)
#
# Snow Leopard is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults
# to x86_64. So make sure tools match uname -m. You can manual have a 64-bit kernal on Snow Leopard
# so only do this is uname -m returns i386.
# Provide fat binaries on Darwin
#
ifeq ($(DARWIN),Darwin)
CFLAGS += -arch i386
CPPFLAGS += -arch i386
LDFLAGS += -arch i386
endif
CFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.9
CPPFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.9
EXTRA_LDFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.9
endif
CFLAGS += -DUEFI_IMAGE_FORMAT_SUPPORT_SOURCES=0x02