From mboxrd@z Thu Jan 1 00:00:00 1970 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.web10.4032.1681459380490705103 for ; Fri, 14 Apr 2023 01:03:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=biNut24G; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681459379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R99tV9vwQZQFvx+lFKxh37ueCBfhnJqKnEt6N6WDoLk=; b=biNut24GiTGl62y6d5wxSQwbxP3ndudDaYpFB7e/iLlzdso/mFzoWnbEzvu5FM0hgNSc5N QfnKwjvR8XcoL1o+gOC5Hde+NPF/1BQqGhw2mjI0W9e9a4YBqtGqeChuohkhGaRURJo5IN JwXz8kivw4WhSTJEaURM3Sa9rgqUO3Q= 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-464-9PwqfHMjMRSz6NSDxcv4zg-1; Fri, 14 Apr 2023 04:02:53 -0400 X-MC-Unique: 9PwqfHMjMRSz6NSDxcv4zg-1 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 9FBAB1C08982; Fri, 14 Apr 2023 08:02:52 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E3F4D40B3ED9; Fri, 14 Apr 2023 08:02:51 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A02831800084; Fri, 14 Apr 2023 10:02:50 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Pawel Polawski , Dongyan Qian , Sunil V L , Baoqi Zhang , Chao Li , Rebecca Cran , Ard Biesheuvel , Zhiguang Liu , Liming Gao , Yuwei Chen , =?UTF-8?q?Marvin=20H=C3=A4user?= , Leif Lindholm , Michael D Kinney , Daniel Schaefer , Bob Feng , Oliver Steffen , Gerd Hoffmann Subject: [PATCH v4 01/10] BaseTools: add BASETOOLS define Date: Fri, 14 Apr 2023 10:02:41 +0200 Message-Id: <20230414080250.1357004-2-kraxel@redhat.com> In-Reply-To: <20230414080250.1357004-1-kraxel@redhat.com> References: <20230414080250.1357004-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Allows for BaseTools-specific tweaks in include files. Signed-off-by: Gerd Hoffmann --- BaseTools/Source/C/Makefiles/header.makefile | 3 +++ BaseTools/Source/C/Makefiles/ms.common | 4 ++-- BaseTools/Source/C/VfrCompile/GNUmakefile | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile index 1bf003523baf..6b743fa297b0 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -124,6 +124,9 @@ ifeq ($(DARWIN),Darwin) endif endif +CFLAGS += -D BASETOOLS=1 +CXXFLAGS += -D BASETOOLS=1 + # keep BUILD_OPTFLAGS last CFLAGS += $(BUILD_OPTFLAGS) CXXFLAGS += $(BUILD_OPTFLAGS) diff --git a/BaseTools/Source/C/Makefiles/ms.common b/BaseTools/Source/C/Makefiles/ms.common index 8391f10d5dd2..6fc4c6477847 100644 --- a/BaseTools/Source/C/Makefiles/ms.common +++ b/BaseTools/Source/C/Makefiles/ms.common @@ -57,5 +57,5 @@ LINKER = $(LD) INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I $(SOURCE_PATH)\Common -CFLAGS = $(CFLAGS) /nologo /Z7 /c /O2 /MT /W4 /WX /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE -CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Z7 /c /O2 /MT /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE +CFLAGS = $(CFLAGS) /nologo /Z7 /c /O2 /MT /W4 /WX /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D BASETOOLS +CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Z7 /c /O2 /MT /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D BASETOOLS diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile b/BaseTools/Source/C/VfrCompile/GNUmakefile index 7d5976649dba..f1abed11376e 100644 --- a/BaseTools/Source/C/VfrCompile/GNUmakefile +++ b/BaseTools/Source/C/VfrCompile/GNUmakefile @@ -24,6 +24,7 @@ VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS) endif # keep BUILD_OPTFLAGS last VFR_CXXFLAGS = $(BUILD_OPTFLAGS) +VFR_CXXFLAGS += -D BASETOOLS=1 # keep EXTRA_LDFLAGS last VFR_LFLAGS = $(EXTRA_LDFLAGS) -- 2.39.2