From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in4.apple.com (mail-out4.apple.com [17.151.62.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1363021A16EFC for ; Fri, 19 May 2017 09:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1495212405; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tNO7+/aQVBUHVKvYC7OBkZPffK7U/PDkqX1iGhA8l70=; b=Qzg4TXD/QWt2u0+FlzWmYZPNEa72g+wOpmCibwW3EOGgcrpznaTmfGrAYJ3ZhFx8 BLTlbfSuyg709leEXTvQpZ2Zq+doTUTcyhxq8++vQYCpgTR1fFwenu8k2QeZPS3/ cE5d5kI++vu9uYvS5ZBntB6PrmvU3nXK+A60Z+cX8Eeg09/CxktvJHHW3K5tSb/e qm+rvpaUqGn26GvsReVtMOZUdyCPpIB5v7yXxpGWwpOwfM3lXjE0vdSIrpGUgoX7 Vv0EiHhEyUTosjDME+vR0Q2ATOzImo4rR1dCJAa9qaX+S1CN1ZKh151bGWfPgbJb N44jHZaBX9euQeTwC+7DVg==; Received: from relay7.apple.com (relay7.apple.com [17.128.113.101]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail-in4.apple.com (Apple Secure Mail Relay) with SMTP id E2.1E.01052.5712F195; Fri, 19 May 2017 09:46:45 -0700 (PDT) X-AuditID: 11973e12-7285e9a00000041c-cb-591f21751072 Received: from nwk-mmpp-sz09.apple.com (nwk-mmpp-sz09.apple.com [17.128.115.80]) by relay7.apple.com (Apple SCV relay) with SMTP id 4A.C2.18088.5712F195; Fri, 19 May 2017 09:46:45 -0700 (PDT) MIME-version: 1.0 Received: from [17.153.81.105] by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.1.2.20170210 64bit (built Feb 10 2017)) with ESMTPSA id <0OQ7001GHL9W4860@nwk-mmpp-sz09.apple.com>; Fri, 19 May 2017 09:46:45 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish Message-id: <208C5E91-D18A-4442-AA6B-AFDC1455D9E5@apple.com> Date: Fri, 19 May 2017 09:46:45 -0700 In-reply-to: Cc: Mike Kinney , "edk2-devel@lists.01.org" , Liming Gao To: Ard Biesheuvel References: <1495176736-28376-1-git-send-email-michael.d.kinney@intel.com> <1495176736-28376-2-git-send-email-michael.d.kinney@intel.com> X-Mailer: Apple Mail (2.3273) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsUi2FCYqluqKB9psP2NisX/D7sZLfYcOsps seLeBnaLjo5/TA4sHov3vGTyuHNtD5tH9+x/LAHMUVw2Kak5mWWpRfp2CVwZTw93MRfcnctY seTra9YGxhs9jF2MHBwSAiYST+YpdTFycQgJrGGS6Nm+nAkm/v1HBET8IKPE9ptTWLsYOTl4 BQQlfky+xwJiMwuESUyc94cRougro0TD2s3sIAlhAXGJd2c2MYPYbALKEivmf2CHaLaRaDz8 hAVkgbBApMSkh5EgYRYBVYn5f++DzecUCJZYsvIl2ExmgQ5GiRXnl4LViwjoSbR0mUHsusQo caP9ONh8CQFZiVuzLzGDJCQEnrNJ3Pu4lXECo9AsJMfOQnIshK0l8f1RK1CcA8iWlzh4XhYi rCnx7N4ndghbW+LJuwusCxjZVjEK5SZm5uhm5pnoJRYU5KTqJefnbmIExcp0O6EdjKdWWR1i FOBgVOLhTfglFynEmlhWXJl7iFGag0VJnJdVWD5SSCA9sSQ1OzW1ILUovqg0J7X4ECMTB6dU AyNHReLV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1/2] BaseTools: Add -D NO_MSABI_VARGS to X64 XCODE5 CC_FLAGS X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 16:46:46 -0000 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT > On May 19, 2017, at 5:49 AM, Ard Biesheuvel wrote: > > On 19 May 2017 at 07:52, Michael Kinney > wrote: >> https://bugzilla.tianocore.org/show_bug.cgi?id=561 >> >> Update BaseTools/Conf/tools_def.template to add the define >> >> -D NO_MSABI_VAARGS >> >> To CC_FLAGS for X64 XCODE5 builds. >> >> The llvm/clang compiler used in XCODE5 builds supports the >> _ms_ versions of the vararg builtins, but the compiler >> generates build errors. >> >> The recommendation from the XCODE5 experts is to never use >> the _ms_ version of the vararg builtins. The define >> NO_MSABI_VARARGS is already supported in MdePkg/Include/Base.h >> and forces the use the standard vararg builtins. >> > > Are such builds compliant with the UEFI spec? > Ard I think you are confusing implementation and architecture. The UEFI Spec quotes an ABI, and __builtin_ms_* is a non standard compiler extension. Clang was designed to be a cross compiler and for X64 (x86_64) we set the arch to clang via -target x86_64-pc-win32-macho. Basically this tells clang it is an x86_64 (X64) arch, with a Windows ABI (EFI ABI), and produce a Mach-O Executable (for debugging). So the default var args builtin does the right thing for the EFI ABI, and __builtin_ms_* is not supported. The x86_64-pc-win32-macho triple is only used for EFI and when I talked to the clang folks they were like why do you need __builtin_ms_* when it is the same as __builtin_*, please fix your include files. Thanks, Andrew Fish >> Cc: Andrew Fish >> Cc: Liming Gao >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Michael D Kinney >> --- >> BaseTools/Conf/tools_def.template | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template >> index 427ef1b..ed9e834 100755 >> --- a/BaseTools/Conf/tools_def.template >> +++ b/BaseTools/Conf/tools_def.template >> @@ -7494,9 +7494,9 @@ RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64 >> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h >> >> >> - DEBUG_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS) >> - NOOPT_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -O0 -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS) >> -RELEASE_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS) >> + DEBUG_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS) >> + NOOPT_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -O0 -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS) >> +RELEASE_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS) >> >> *_XCODE5_*_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -c -include AutoGen.h >> *_XCODE5_*_ASLDLINK_FLAGS = -e _ReferenceAcpiTable -preload -segalign 0x20 -pie -seg1addr 0x240 -read_only_relocs suppress -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map >> -- >> 2.6.3.windows.1 >> >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel