From 9f35d83d71e3b8ec6fda0017ace44939f75ab2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20Ha=CC=88user?= <8659494+mhaeuser@users.noreply.github.com> Date: Mon, 6 Mar 2023 17:22:55 +0100 Subject: [PATCH] BaseTools/tools_def: Introduce MTOC_PREFIX environment variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most compiler toolchains and tools have support for PREFIX environment variables to specify their location, but Apple mtoc does not. While it used to be in a stable install location, it has recently been deprecated and ocmtoc is maintained as a fork. Homebrew has accepted ocmtoc into its repository, including its ARM version. As Homebrew on ARM does not install its packages into /usr/local, XCODE5 currently does not work on Apple silicon with ocmtoc installed via Homebrew. Introduce the MTOC_PREFIX environment variable to customize the installation location of Apple mtoc or ocmtoc. Signed-off-by: Marvin Häuser --- BaseTools/Conf/tools_def.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index be8ddb5a8b..517897e2cd 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -2979,7 +2979,7 @@ NOOPT_CLANGDWARF_X64_DLINK2_FLAGS = DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O0 -fu *_XCODE5_*_ASLPP_PATH = clang *_XCODE5_*_ASLDLINK_PATH = ld *_XCODE5_*_DSYMUTIL_PATH = /usr/bin/dsymutil -*_XCODE5_*_MTOC_PATH = /usr/local/bin/mtoc +*_XCODE5_*_MTOC_PATH = ENV(MTOC_PREFIX)mtoc *_XCODE5_*_DEPS_FLAGS = DEF(GCC_DEPS_FLAGS) #