From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mx.groups.io with SMTP id smtpd.web11.1167.1678810619409604722 for ; Tue, 14 Mar 2023 09:16:59 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm3 header.b=TJ9xMZjR; spf=pass (domain: bsdio.com, ip: 66.111.4.28, mailfrom: rebecca@bsdio.com) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 8736C5C0662; Tue, 14 Mar 2023 12:16:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 14 Mar 2023 12:16:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:reply-to:sender:subject:subject:to:to; s= fm3; t=1678810618; x=1678897018; bh=2atKg2zOlUVzOTWSi4KLoW2CMqYv gw5J7TIdhK7UO6c=; b=TJ9xMZjRB9Etddmtaw9miBRDAEYaloa/WBB4GJhAB7k1 tHEr6+6E6XgLTYqd9o4M/CjwshnTtdIY7qbbZCSTPufuUtXpJ9NcApf6OB5zBbe+ 4V49So9m9SNnSMghoQ1/joUkehrOo9aByjKQj9UYtFuJu43uaXodBB1+J0oJlBeT Cft/6TKzRq9+p3TewOcTMbC9Ha4aC34gEFIaVk6qwiVdPLK62juZhR16lcMmzLsL ukLOR8eObP8ZAXzYOAeFt9rNcV5pzIeQbK9oOLN/NsJUEAS+/+t7MY77U5OvQ4dL hCRgtXEsC/81Hbj5OJQl1MXARg3qeHUIZ9xtrbS1YQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1678810618; x=1678897018; bh=2atKg2zOlUVzOTWSi4KLoW2CMqYvgw5J7TI dhK7UO6c=; b=CG8ZU3iM4I93K9zhJChIurCo9zaIvlM1PARcK9F0YGsELX9oYXB dwQHQkfWVv40a3egYEA4pfbgKZDhYOWV9uJjz7HAx1q9/hvbmQo7hAR2NoJzSgF0 tYDsaq39OVkgH4zNUA438s7hFZuZxYi/49E6moyX2EAjgzjtUScnsSPj5omrRq+M yH6c64VNLbZfU5x3s12LE68a00sNO4J1sCiu5lyaDVOX3UNDC3kevH/NCdJ4grUQ 7hSkzpe8PVRH/H0g2TrXeVth7kZCL1cGXylwRKz0QNeyBWn234h/pJAJcm9UeFFM qx4sHQz9gGnAsZfyZmB/MLBkUJG+VioemPQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddviedgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffhvfhrfhgjtgfgsehtkeertddtfeejnecuhfhrohhmpeftvggs vggttggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhordgtohhmqeenucggtffrrg htthgvrhhnpeegvdffkeeuleeugfettdeujeekleeugfekvedutdelgfekgeegveehfeet feelueenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhtihgrnhhotghorhgvrdhorh hgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprhgv sggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Mar 2023 12:16:56 -0400 (EDT) Message-ID: Date: Tue, 14 Mar 2023 10:16:54 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [edk2-devel] [PATCH 0/3] BaseTools: allow users to override CC and CXX on the make command line From: "Rebecca Cran" To: devel@edk2.groups.io, Andrew Fish , Leif Lindholm , Michael D Kinney , Bob Feng , Liming Gao , Yuwei Chen Reply-To: devel@edk2.groups.io, rebecca@bsdio.com References: <20230217035101.880854-1-rebecca@quicinc.com> <174ACADCDC6439C2.24021@groups.io> In-Reply-To: <174ACADCDC6439C2.24021@groups.io> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit This is a patch series that I'd really like to get committed. It'll allow us to drop the dependency on gcc for building edk2 on FreeBSD. The Github branch is https://github.com/bcran/edk2/tree/mdepkg-c11 and there's a PR at https://github.com/tianocore/edk2/pull/4142. -- Rebecca Cran On 3/9/23 8:47 AM, Rebecca Cran wrote: > Could I get some reviews on this please? > > > Thanks. > > Rebecca Cran > > > On 2/16/23 8:50 PM, Rebecca Cran wrote: >> Currently, the BaseTools Makefiles use BUILD_CC and BUILD_CXX, which >> doesn't allow users to override the compiler to use in the expected way >> by running e.g. "make CC=clang-17 CXX=clang++-17". clang/llvm support >> was added in https://bugzilla.tianocore.org/show_bug.cgi?id=2842 in a >> way that required users to run "make CXX=llvm" and have clang and >> clang++ >> executables under $(CLANG_BIN). As far as I know this isn't a standard >> way of telling a build system to use clang, and so is likely difficult >> to discover by users. >> >> This patch series fixes that, and as a side effect allows the clang >> analyzer to run via "scan-build make". >> >> Since clang 17 defaults to C++17 or newer where the 'register' keyword >> is deprecated and the warning turned into an error, override the >> version used when building C++ code via "-std=c++14". >> >> Rebecca Cran (3): >>    BaseTools: Allow users to specify compiler to use with make CC= CXX= >>    BaseTools: Improve detection of users wanting to build using clang >>    BaseTools: Build against C++14 when building with clang >> >>   BaseTools/Source/C/DevicePath/GNUmakefile          |  7 ++- >>   BaseTools/Source/C/LzmaCompress/GNUmakefile        |  2 +- >>   BaseTools/Source/C/Makefiles/app.makefile          |  2 +- >>   BaseTools/Source/C/Makefiles/footer.makefile       |  6 +- >>   BaseTools/Source/C/Makefiles/header.makefile       | 59 >> ++++++++++---------- >>   BaseTools/Source/C/VfrCompile/GNUmakefile          | 19 ++++--- >>   BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile | 20 +++---- >>   BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile   | 31 +++++----- >>   BaseTools/Source/Python/Workspace/DscBuildData.py  |  2 +- >>   9 files changed, 76 insertions(+), 72 deletions(-) >>