From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9ACFE1A1E12 for ; Mon, 1 Aug 2016 01:01:54 -0700 (PDT) Received: by mail-wm0-x236.google.com with SMTP id f65so359155350wmi.0 for ; Mon, 01 Aug 2016 01:01:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=a/5J4C2c8kfuFpGhf6TaBtnaNyxzt/uoUs5Kz0VGKZ8=; b=fo80MnH/wXQD1DigvMlYdVqywWDLaRmklTofjcmFRrDepR+t3Q327Mai1eQQPd4d1c vMIqKZLDH1RinxwHiO1X7vsP40zD/mOy9owaTSGBQIlOh+hcB8PE4jCnB3PP7UtSGHCo I/dj0lzNGD0KFtPz8w0wYv/m88z+8uMA+M5wU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=a/5J4C2c8kfuFpGhf6TaBtnaNyxzt/uoUs5Kz0VGKZ8=; b=DGF6ssXhED09WnFt7UV5olRzNbXtx2g+trGti9lZunMXE5nOo3CdQRmz9fIEtCHtXO Ltz0qvPfRt/dfDBqlp4l96i0NzyBgtfS0V5pvjvRFF7KM/U7J95zK8qi+cfM3dULPGr7 obbMly61kP9DET+c/roHLEUODgX8HKrWCC4zyg+DIK0w0cqLbWB+p5DgRTuZG/0Cca0V QzCKXndPrL9+r6zVXQamsHvnJWlTZmR7gnwnjA26mMvcLRbPKTJ851IGjdsN9vepX5Ia yST85fIaZYtVajXig4KjVVUZMINCtmBf0DE7jym2L+PQ0mgFMhAOxOk3nJa5ZPE+0CPs qNWg== X-Gm-Message-State: AEkoouvU9xKGdl4KB9+CaNajmTUaFDewiM4tl6cUiXsaPonwHZWt77plIAIsnWWM5MaAHmv6 X-Received: by 10.28.43.129 with SMTP id r123mr50873635wmr.1.1470038513151; Mon, 01 Aug 2016 01:01:53 -0700 (PDT) Received: from localhost.localdomain (3.red-81-34-118.dynamicip.rima-tde.net. [81.34.118.3]) by smtp.gmail.com with ESMTPSA id m62sm15671943wmm.24.2016.08.01.01.01.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Aug 2016 01:01:52 -0700 (PDT) From: Ard Biesheuvel To: steven.shi@intel.com, yonghong.zhu@intel.com, liming.gao@intel.com, jordan.l.justen@intel.com, edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, lersek@redhat.com, Ard Biesheuvel Date: Mon, 1 Aug 2016 10:01:32 +0200 Message-Id: <1470038497-2536-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470038497-2536-1-git-send-email-ard.biesheuvel@linaro.org> References: <1470038497-2536-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH v5 3/8] BaseTools UNIXGCC ELFGCC CYGGCC: clone GCC build rule family into GCCLD X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 08:01:55 -0000 Before we can make non-backward compatible changes to the GCC build rules regarding the use of the 'gcc' binary as the linker, clone the existing GCC build rules into a 'GCCLD' build rule family, and move the legacy toolchains UNIXGCC, CYGGCC, CYGGCCxASL and ELFGCC over to it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Jordan Justen --- BaseTools/Conf/build_rule.template | 28 ++++++++++---------- BaseTools/Conf/tools_def.template | 4 +++ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template index 91bcc1828cb5..3fea4f456118 100644 --- a/BaseTools/Conf/build_rule.template +++ b/BaseTools/Conf/build_rule.template @@ -130,7 +130,7 @@ "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src} - + # For RVCTCYGWIN CC_FLAGS must be first to work around pathing issues "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src} @@ -156,7 +156,7 @@ "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src} - + # For RVCTCYGWIN CC_FLAGS must be first to work around pathing issues "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src} "$(SYMRENAME)" $(SYMRENAME_FLAGS) ${dst} @@ -171,7 +171,7 @@ $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj - + "$(CC)" $(CC_FLAGS) $(CC_XIPFLAGS) -o ${dst} $(INC) ${src} [C-Header-File] @@ -187,7 +187,7 @@ ?.asm, ?.Asm, ?.ASM - + ?.S, ?.s @@ -201,7 +201,7 @@ Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iii - + "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues @@ -265,7 +265,7 @@ "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST) - + "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST) @@ -291,7 +291,7 @@ "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) - + "$(DLINK)" -o ${dst} $(DLINK_FLAGS) --start-group $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) --end-group $(DLINK2_FLAGS) "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst} @@ -319,7 +319,7 @@ "$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) - + "$(DLINK)" $(DLINK_FLAGS) --start-group $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) --end-group $(DLINK2_FLAGS) @@ -346,7 +346,7 @@ $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR) -$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR) - + $(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(OBJCOPY) --strip-unneeded -R .eh_frame ${src} @@ -402,7 +402,7 @@ Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii - + Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC_LIST) ${src} "$(ASLPP)" $(ASLPP_FLAGS) $(INC) -I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii @@ -423,7 +423,7 @@ "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS) - + "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src} "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS) @@ -443,7 +443,7 @@ "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS) - + "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src} "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS) @@ -472,7 +472,7 @@ "$(ASM16)" /nologo /c /omf $(INC) /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${d_path}(+)${s_base}.iii "$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,, - + "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i "$(ASM)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii @@ -596,7 +596,7 @@ "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiipackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS) "$(RC)" /Fo${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc - + "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS) "$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst} diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index b36a19314215..8a04e38e1288 100644 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4460,6 +4460,7 @@ DEFINE GCC49_AARCH64_ASLDLINK_FLAGS = DEF(GCC48_AARCH64_ASLDLINK_FLAGS) # UNIXGCC - UNIX GCC # ASL - Intel Linux ACPI Source Language Compiler (iasl) *_UNIXGCC_*_*_FAMILY = GCC +*_UNIXGCC_*_*_BUILDRULEFAMILY = GCCLD *_UNIXGCC_*_MAKE_PATH = make *_UNIXGCC_*_ASL_PATH = DEF(UNIX_IASL_BIN) @@ -5268,6 +5269,7 @@ RELEASE_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) # CYGGCC - CygWin GCC # ASL - Intel ACPI Source Language Compiler (iasl.exe) *_CYGGCC_*_*_FAMILY = GCC +*_CYGGCC_*_*_BUILDRULEFAMILY = GCCLD *_CYGGCC_*_*_DLL = DEF(CYGWIN_BIN) *_CYGGCC_*_MAKE_PATH = DEF(MS_VS_BIN)\nmake.exe @@ -5375,6 +5377,7 @@ RELEASE_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) # CYGGCCxASL - CygWin GCC # ASL - Microsoft ACPI Source Language Compiler (asl.exe) *_CYGGCCxASL_*_*_FAMILY = GCC +*_CYGGCCxASL_*_*_BUILDRULEFAMILY = GCCLD *_CYGGCCxASL_*_*_DLL = DEF(CYGWIN_BIN) *_CYGGCCxASL_*_MAKE_PATH = DEF(MS_VS_BIN)\nmake.exe @@ -5478,6 +5481,7 @@ RELEASE_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) #################################################################################### # ELFGCC - Linux ELF GCC *_ELFGCC_*_*_FAMILY = GCC +*_ELFGCC_*_*_BUILDRULEFAMILY = GCCLD *_ELFGCC_*_MAKE_PATH = make *_ELFGCC_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h -- 2.7.4