From 3e7d8d03fe8a1f78971b32efc9aea3b6601d3331 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Wed, 27 Mar 2024 10:44:24 +0300 Subject: [PATCH 1/3] BaseTools: Enable FAT binary support on Darwin --- BaseTools/Source/C/Makefiles/header.makefile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile index df72193b98..ed266ce06f 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -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.13 + CPPFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.13 + LDFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.13 endif CFLAGS += -DUEFI_IMAGE_FORMAT_SUPPORT_SOURCES=0x02 From 3415ccbb4bf98b7baf3dea77fe02e2c1f1a5afa6 Mon Sep 17 00:00:00 2001 From: Vitaly Cheptsov <4348897+vit9696@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:53:40 +0300 Subject: [PATCH 2/3] Follow-up fix for VfrCompiler --- BaseTools/Source/C/Makefiles/header.makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile index ed266ce06f..978ca5ebda 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -129,9 +129,9 @@ endif # Provide FAT binaries on Darwin # ifeq ($(DARWIN),Darwin) - CFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.13 + CFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.13 CPPFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.13 - LDFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.13 + EXTRA_LDFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.13 endif CFLAGS += -DUEFI_IMAGE_FORMAT_SUPPORT_SOURCES=0x02 From 65f88d455424cef27b341fb385a8f9ce1d2fbace Mon Sep 17 00:00:00 2001 From: Vitaly Cheptsov <4348897+vit9696@users.noreply.github.com> Date: Sun, 31 Mar 2024 13:02:22 +0300 Subject: [PATCH 3/3] Fix wording, align assignments, and lower minimal version to 10.9 --- BaseTools/Source/C/Makefiles/header.makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile index 978ca5ebda..e9ab81e966 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -126,12 +126,12 @@ ifeq ($(HOST_ARCH), X64) endif # -# Provide FAT binaries on Darwin +# Provide fat binaries on Darwin # ifeq ($(DARWIN),Darwin) - CFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.13 - CPPFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.13 - EXTRA_LDFLAGS += -arch x86_64 -arch arm64 -mmacosx-version-min=10.13 + 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