From nobody Fri May 17 05:50:16 2024 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+88403+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+88403+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=frRqzJKFLNyukdigqjQpk6S2zm52GYypOX4bVZp3lMg+GO2SvcbZbvO/NdRqoMXLWQojAlXqLNSqHwyQCP6kS8JHHNzpaTA2CZDg4XwmM9mX4Njvtz+b4QJ5jBWqziCpwQRWoXErdjgfY+zFt0v0U3tytO+CI8eyf/hTW7BELHg= 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=/9Zvj3OiHtmkTRmIgxHwaaR99mxqztmS0xhdOhBxwWE=; b=SzA3EWL+cTOs23+sa8S6SuO+Z1LxgpkGGNSS65VmOyeHhi8QFyyZ+bsehHFVFAret9hTQNh0lKK7kgkulhBcCMwgyqq88vxYD/s3fuU/L4UOBtUTCLgBmSpiYazH/He0AW+RAcXvHVE72EEu7qGwnErJVTJgYGzNKkHshNzH0bI= 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+88403+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 1649064769958533.5935563728794; Mon, 4 Apr 2022 02:32:49 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id k1byYY1788612xIq1fBzvbxY; Mon, 04 Apr 2022 02:32:49 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web08.33139.1649064767173739748 for ; Mon, 04 Apr 2022 02:32:48 -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-623-ZENJCjBrNce5WXRvBOpW2w-1; Mon, 04 Apr 2022 05:32:43 -0400 X-MC-Unique: ZENJCjBrNce5WXRvBOpW2w-1 X-Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2F8A31C04B7E; Mon, 4 Apr 2022 09:32:37 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.194.10]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D9A1C575E5; Mon, 4 Apr 2022 09:32:31 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EF20B180060A; 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 1/3] BaseTools: import compiler check macros from linux kernel Date: Mon, 4 Apr 2022 11:32:27 +0200 Message-Id: <20220404093229.1971782-2-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.85 on 10.11.54.8 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: PVJePsZbGlMDVQFl8BavbM6Yx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1649064769; bh=jyg4TiEfJx/Cw8hGcE6ZsuiGFBnORApdmKpxcyYYcYY=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=BvpdeH164Wm0X6lzKOALYF+Qv1ZY2HOCSFK4PBP50U2PMwqplnddfLVRXBHGjLSo7j8 MidVeZbpaemlnxJPxnle9MW5oV5bo5ul60VOStO1gXljHmYwyT/GNcXxyZo/J99HBQjue bBFJsQwcqcVVgMT6p64wKr7adNj+TSYB3Zw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1649064771675100007 Content-Type: text/plain; charset="utf-8"; x-default="true" Makefile functions to check for compiler flags supported. Signed-off-by: Gerd Hoffmann --- .../Source/C/Makefiles/compiler.makefile | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 BaseTools/Source/C/Makefiles/compiler.makefile diff --git a/BaseTools/Source/C/Makefiles/compiler.makefile b/BaseTools/Sou= rce/C/Makefiles/compiler.makefile new file mode 100644 index 000000000000..b575391c08d6 --- /dev/null +++ b/BaseTools/Source/C/Makefiles/compiler.makefile @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: GPL-2.0-only + +# copy from linux kernel soure tree (scripts/Makefile.compiler) + +# cc-cross-prefix +# Usage: CROSS_COMPILE :=3D $(call cc-cross-prefix, m68k-linux-gnu- m68k-l= inux-) +# Return first where a gcc is found in PATH. +# If no gcc found in PATH with listed prefixes return nothing +# +# Note: '2>/dev/null' is here to force Make to invoke a shell. Otherwise, = it +# would try to directly execute the shell builtin 'command'. This workarou= nd +# should be kept for a long time since this issue was fixed only after the +# GNU Make 4.2.1 release. +cc-cross-prefix =3D $(firstword $(foreach c, $(1), \ + $(if $(shell command -v -- $(c)gcc 2>/dev/null), $(c)))) + +# output directory for tests below +TMPOUT =3D $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_$$$$ + +# try-run +# Usage: option =3D $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise) +# Exit code chooses option. "$$TMP" serves as a temporary file and is +# automatically cleaned up. +try-run =3D $(shell set -e; \ + TMP=3D$(TMPOUT)/tmp; \ + mkdir -p $(TMPOUT); \ + trap "rm -rf $(TMPOUT)" EXIT; \ + if ($(1)) >/dev/null 2>&1; \ + then echo "$(2)"; \ + else echo "$(3)"; \ + fi) + +# as-option +# Usage: cflags-y +=3D $(call as-option,-Wa$(comma)-isa=3Dfoo,) + +as-option =3D $(call try-run,\ + $(CC) $(KBUILD_CFLAGS) $(1) -c -x assembler /dev/null -o "$$TMP",$(1),$(2= )) + +# as-instr +# Usage: cflags-y +=3D $(call as-instr,instr,option1,option2) + +as-instr =3D $(call try-run,\ + printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" = -,$(2),$(3)) + +# __cc-option +# Usage: MY_CFLAGS +=3D $(call __cc-option,$(CC),$(MY_CFLAGS),-march=3Dwin= chip-c6,-march=3Di586) +__cc-option =3D $(call try-run,\ + $(1) -Werror $(2) $(3) -c -x c /dev/null -o "$$TMP",$(3),$(4)) + +# cc-option +# Usage: cflags-y +=3D $(call cc-option,-march=3Dwinchip-c6,-march=3Di586) + +cc-option =3D $(call __cc-option, $(CC),\ + $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS),$(1),$(2)) + +# 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) + +# 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))) + +# cc-ifversion +# Usage: EXTRA_CFLAGS +=3D $(call cc-ifversion, -lt, 0402, -O1) +cc-ifversion =3D $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $(2)000 ] && echo $= (3) || echo $(4)) + +# 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-ifversion +# Usage: $(call ld-ifversion, -ge, 22252, y) +ld-ifversion =3D $(shell [ $(CONFIG_LD_VERSION)0 $(1) $(2)0 ] && echo $(3)= || echo $(4)) --=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 (#88403): https://edk2.groups.io/g/devel/message/88403 Mute This Topic: https://groups.io/mt/90237793/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- From nobody Fri May 17 05:50:16 2024 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- From nobody Fri May 17 05:50:16 2024 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+88406+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+88406+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1649064772; cv=none; d=zohomail.com; s=zohoarc; b=mFtG1lmUtZDqjNlYpogf/hDYEeh8+xYfabV//mxR7Mt8KMPbtw/1BR7agu5nyjUPGaKBGE2zTogynQnRo1ImRHOQR39QVKPs5qEwNtABY6lZzHWqQ+qogd9Jd2GuYEUfDQ6VH7xfVw8pAdeNvc1lZpYnj1MrdSojyN0/noVg7yE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649064772; 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=nF8/UsS0iN37B47USNSk9UWNMg+TTSbB97F7Txm5YUM=; b=Fo0wY3J7sijpE4FyEHzZoYSonLn/5cNh2Axwz1jirAgPF6gvVKzQbyYBpXbxLLaMFkvAbMTOhWs/OarKib2aBpGNAV7oCLWMA5P93LZHpCmHsfuGdwMF07VVx5GnOO7P538ZALnhT23jzoUr4QqP97Eg9d42cqhw5LftxmftLMI= 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+88406+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 1649064772307333.0746973013179; Mon, 4 Apr 2022 02:32:52 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id v3PiYY1788612xtYIzqxF7j6; Mon, 04 Apr 2022 02:32:52 -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.web08.33141.1649064771067451679 for ; Mon, 04 Apr 2022 02:32:51 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-576-eWOBpYaBP6WT23ar7lXoyA-1; Mon, 04 Apr 2022 05:32:49 -0400 X-MC-Unique: eWOBpYaBP6WT23ar7lXoyA-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CCA25811E75; Mon, 4 Apr 2022 09:32:48 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.194.10]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6FCAD4EA6E; Mon, 4 Apr 2022 09:32:45 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 04B921800631; Mon, 4 Apr 2022 11:32:30 +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 3/3] BaseTools: fix gcc workaround Date: Mon, 4 Apr 2022 11:32:29 +0200 Message-Id: <20220404093229.1971782-4-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.79 on 10.11.54.5 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: 73C5IkeWqJhfn5jDDoSNu8Qex1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1649064772; bh=3V1I166nmaODTowYRyJ//bKA5O1orPr7gCDHn5ALQDA=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=t0GxNwBTzUoRvlqmGyjUQj+rzvRkVIjDo/R+M8jPMz9f3T7rorqe+oEhcDVKvu4B7gT HoB1l03otWFhhr8nCKPT1uIXYsjalFAEJ5GUf9PgF+IHNHkw/Snffb0DWmRgc8MhmXk8G LfiiMfPDOSWgYRqcAcc2hvvKWFktmwPPfzc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1649064773709100016 Content-Type: text/plain; charset="utf-8"; x-default="true" Check whenever the compiler used knows the warning we want disable. Fixes: 22130dcd98b4 ("Basetools: turn off gcc12 warning") Reported-by: Rebecca Cran Signed-off-by: Gerd Hoffmann --- BaseTools/Source/C/DevicePath/GNUmakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C= /DevicePath/GNUmakefile index b05d2bddfa68..1cc966c4831f 100644 --- a/BaseTools/Source/C/DevicePath/GNUmakefile +++ b/BaseTools/Source/C/DevicePath/GNUmakefile @@ -12,9 +12,10 @@ APPNAME =3D DevicePath OBJECTS =3D DevicePath.o UefiDevicePathLib.o DevicePathFromText.o DeviceP= athUtilities.o =20 include $(MAKEROOT)/Makefiles/app.makefile +include $(MAKEROOT)/Makefiles/compiler.makefile =20 # gcc 12 trips over device path handling -BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow +BUILD_CFLAGS +=3D $(call cc-disable-warning,stringop-overflow) =20 LIBS =3D -lCommon ifeq ($(CYGWIN), CYGWIN) --=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 (#88406): https://edk2.groups.io/g/devel/message/88406 Mute This Topic: https://groups.io/mt/90237797/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-