From nobody Mon Feb 9 16:13:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+88404+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+88404+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1649064770; cv=none; d=zohomail.com; s=zohoarc; b=XEBLovCAVRDoPkf57EgZrhukt7xdtbUSy0PdOSgHlA8RfmLRNjLyXab2+0/QD6aMJvjzvpYzSl7isSLKvFqRb3p3u28OqoJKcxBymFVYxkPHPKCBHxE2NjRvxpC3hJeoGgZGsnjNx8kCe2ywrRz0baAUAC1sgEqO2OHSwFKAB5A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649064770; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=u2TI/AjuU/r8jTY9E2z0y3J7l3cgWjd/VPmq+zZeJAU=; b=Qky5qz8ZGDx9O1i2chmU5HxIgzgXH4m8KnqkjS9LXavP5Gu8bKn3ZNq8Un+itvYYCAXSb+m1V0YAAhG8MrKz0Wjy3wfN5ry/o5YSZ0xVU//sFi6lCZnvJu3jVgubUtj8DQ+04+UpX2kWC5MD5VU+WFcp6LrLorAC8OwJbTTlxCk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+88404+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1649064770730270.25559304466617; Mon, 4 Apr 2022 02:32:50 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id bQu2YY1788612xyGlFG98PIp; Mon, 04 Apr 2022 02:32:50 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.32898.1649064768986813100 for ; Mon, 04 Apr 2022 02:32:49 -0700 X-Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-582-fXUR13sYPVaoOBurlQOVTQ-1; Mon, 04 Apr 2022 05:32:44 -0400 X-MC-Unique: fXUR13sYPVaoOBurlQOVTQ-1 X-Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AFE5B1C04B6C; Mon, 4 Apr 2022 09:32:43 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.194.10]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5EDBD404D91E; Mon, 4 Apr 2022 09:32:40 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 00A59180062D; Mon, 4 Apr 2022 11:32:29 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Yuwei Chen , Liming Gao , Pawel Polawski , Bob Feng , Oliver Steffen , Rebecca Cran , Gerd Hoffmann Subject: [edk2-devel] [PATCH v3 2/3] BaseTools: adapt comniler checks mmacros for edk2 Date: Mon, 4 Apr 2022 11:32:28 +0200 Message-Id: <20220404093229.1971782-3-kraxel@redhat.com> In-Reply-To: <20220404093229.1971782-1-kraxel@redhat.com> References: <20220404093229.1971782-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com X-Gm-Message-State: 4WP48YxxxNS8noVjKMmbgmODx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1649064770; bh=L4NfLtMpbDVEalDE6dMpKVRWrd3c4zze3fvhri38oQg=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=Y6+3cguu2rSOf61EjpO3SPD+hx+Lo6S6yjAl4GHOHNw7KtiW6n123E96tKWKOHxo7NR i6cWkY298zigwiC6GViAAXJhFKRhJl1sz/w2/BHMzRcYPhpDQ0nGdtb/dADJUx/OObKTv KWTpwenscKA0EPBmW6MyL6i84TrZ6iIWFSA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1649064771687100008 Content-Type: text/plain; charset="utf-8"; x-default="true" edk2 BaseTools use BUILD_CC not CC. Update the check macros accordingly so they actually work with BaseTools. Signed-off-by: Gerd Hoffmann --- BaseTools/Source/C/Makefiles/compiler.makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/compiler.makefile b/BaseTools/Sou= rce/C/Makefiles/compiler.makefile index b575391c08d6..3337857ca9c5 100644 --- a/BaseTools/Source/C/Makefiles/compiler.makefile +++ b/BaseTools/Source/C/Makefiles/compiler.makefile @@ -18,7 +18,7 @@ cc-cross-prefix =3D $(firstword $(foreach c, $(1), \ TMPOUT =3D $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_$$$$ =20 # try-run -# Usage: option =3D $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise) +# Usage: option =3D $(call try-run, $(BUILD_CC)...-o "$$TMP",option-ok,oth= erwise) # Exit code chooses option. "$$TMP" serves as a temporary file and is # automatically cleaned up. try-run =3D $(shell set -e; \ @@ -34,34 +34,34 @@ try-run =3D $(shell set -e; \ # Usage: cflags-y +=3D $(call as-option,-Wa$(comma)-isa=3Dfoo,) =20 as-option =3D $(call try-run,\ - $(CC) $(KBUILD_CFLAGS) $(1) -c -x assembler /dev/null -o "$$TMP",$(1),$(2= )) + $(BUILD_CC) $(KBUILD_CFLAGS) $(1) -c -x assembler /dev/null -o "$$TMP",$(= 1),$(2)) =20 # as-instr # Usage: cflags-y +=3D $(call as-instr,instr,option1,option2) =20 as-instr =3D $(call try-run,\ - printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" = -,$(2),$(3)) + printf "%b\n" "$(1)" | $(BUILD_CC) $(KBUILD_AFLAGS) -c -x assembler -o "$= $TMP" -,$(2),$(3)) =20 # __cc-option -# Usage: MY_CFLAGS +=3D $(call __cc-option,$(CC),$(MY_CFLAGS),-march=3Dwin= chip-c6,-march=3Di586) +# Usage: MY_CFLAGS +=3D $(call __cc-option,$(BUILD_CC),$(MY_CFLAGS),-march= =3Dwinchip-c6,-march=3Di586) __cc-option =3D $(call try-run,\ $(1) -Werror $(2) $(3) -c -x c /dev/null -o "$$TMP",$(3),$(4)) =20 # cc-option # Usage: cflags-y +=3D $(call cc-option,-march=3Dwinchip-c6,-march=3Di586) =20 -cc-option =3D $(call __cc-option, $(CC),\ +cc-option =3D $(call __cc-option, $(BUILD_CC),\ $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS),$(1),$(2)) =20 # cc-option-yn # Usage: flag :=3D $(call cc-option-yn,-march=3Dwinchip-c6) cc-option-yn =3D $(call try-run,\ - $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null = -o "$$TMP",y,n) + $(BUILD_CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev= /null -o "$$TMP",y,n) =20 # cc-disable-warning # Usage: cflags-y +=3D $(call cc-disable-warning,unused-but-set-variable) cc-disable-warning =3D $(call try-run,\ - $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c= /dev/null -o "$$TMP",-Wno-$(strip $(1))) + $(BUILD_CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -= c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) =20 # cc-ifversion # Usage: EXTRA_CFLAGS +=3D $(call cc-ifversion, -lt, 0402, -O1) @@ -69,7 +69,7 @@ cc-ifversion =3D $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $(= 2)000 ] && echo $(3) || e =20 # ld-option # Usage: KBUILD_LDFLAGS +=3D $(call ld-option, -X, -Y) -ld-option =3D $(call try-run, $(LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$(2),$(= 3)) +ld-option =3D $(call try-run, $(BUILD_LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$= (2),$(3)) =20 # ld-ifversion # Usage: $(call ld-ifversion, -ge, 22252, y) --=20 2.35.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#88404): https://edk2.groups.io/g/devel/message/88404 Mute This Topic: https://groups.io/mt/90237794/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-