From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 1D065211A2D85 for ; Wed, 2 Jan 2019 18:48:59 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A6AD312F8E6; Thu, 3 Jan 2019 02:48:58 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-123-131.rdu2.redhat.com [10.10.123.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id 601C75D738; Thu, 3 Jan 2019 02:48:57 +0000 (UTC) From: Laszlo Ersek To: edk2-devel-01 Cc: Bob Feng , Liming Gao , Yonghong Zhu Date: Thu, 3 Jan 2019 03:48:08 +0100 Message-Id: <20190103024816.9236-19-lersek@redhat.com> In-Reply-To: <20190103024816.9236-1-lersek@redhat.com> References: <20190103024816.9236-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 03 Jan 2019 02:48:58 +0000 (UTC) Subject: [PATCH 18/26] BaseTools/tools_def.template: propagate loss of GCC44 references X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2019 02:48:59 -0000 Content-Transfer-Encoding: 8bit The last patch decremented references on a number of DEFs. They can be classified into three groups: (a) those that remain used by multiple toolchains, or by multiple definitions of a given toolchain (refcount >= 2): - GCC_ASLCC_FLAGS - GCC_ASLPP_FLAGS - GCC_HOST_PREFIX - GCC_IA32_RC_FLAGS - GCC_PP_FLAGS - GCC_VFRPP_FLAGS - GCC_X64_RC_FLAGS - IASL_FLAGS - IASL_OUTFLAGS - UNIX_IASL_BIN - GCC44_IA32_X64_DLINK_FLAGS (!) (b) those that are only used by GCC48 (refcount == 1): - GCC44_ASM_FLAGS - GCC44_IA32_CC_FLAGS - GCC44_IA32_DLINK2_FLAGS - GCC44_IA32_X64_ASLDLINK_FLAGS - GCC44_X64_CC_FLAGS - GCC44_X64_DLINK2_FLAGS - GCC44_X64_DLINK_FLAGS (c) those that are no longer used (refcount == 0): - GCC44_IA32_PREFIX - GCC44_X64_PREFIX For the members of class (b), expand their definitions at the referring sites, and remove their definitions. For the members of class (c), remove their definitions. (It's easier to review this patch with "git show --word-diff".) Cc: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1377 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- BaseTools/Conf/tools_def.template | 24 ++++++-------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 3596eac9e0e4..91f1b1d04e02 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -187,9 +187,6 @@ DEFINE CYGWIN_BIN = c:/cygwin/bin DEFINE CYGWIN_BINIA32 = c:/cygwin/opt/tiano/i386-tiano-pe/i386-tiano-pe/bin/ DEFINE CYGWIN_BINX64 = c:/cygwin/opt/tiano/x86_64-pc-mingw64/x86_64-pc-mingw64/bin/ -DEFINE GCC44_IA32_PREFIX = ENV(GCC44_BIN) -DEFINE GCC44_X64_PREFIX = ENV(GCC44_BIN) - DEFINE GCC48_IA32_PREFIX = ENV(GCC48_BIN) DEFINE GCC48_X64_PREFIX = ENV(GCC48_BIN) @@ -4143,24 +4140,17 @@ DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 -DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable DEFINE GCC44_IA32_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive -DEFINE GCC44_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON) -DEFINE GCC44_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS) -Wl,-melf_x86_64,--oformat=elf64-x86-64,-pie -DEFINE GCC44_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF(GCC_DLINK2_FLAGS_COMMON) -DEFINE GCC44_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC44_IA32_CC_FLAGS) -Wno-address -DEFINE GCC48_X64_CC_FLAGS = DEF(GCC44_X64_CC_FLAGS) -Wno-address -DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_ASLDLINK_FLAGS) +DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address +DEFINE GCC48_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address +DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS) -DEFINE GCC48_IA32_DLINK2_FLAGS = DEF(GCC44_IA32_DLINK2_FLAGS) -DEFINE GCC48_X64_DLINK_FLAGS = DEF(GCC44_X64_DLINK_FLAGS) -DEFINE GCC48_X64_DLINK2_FLAGS = DEF(GCC44_X64_DLINK2_FLAGS) -DEFINE GCC48_ASM_FLAGS = DEF(GCC44_ASM_FLAGS) +DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON) +DEFINE GCC48_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS) -Wl,-melf_x86_64,--oformat=elf64-x86-64,-pie +DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF(GCC_DLINK2_FLAGS_COMMON) +DEFINE GCC48_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEFINE GCC48_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector -mword-relocations -- 2.19.1.3.g30247aa5d201