Message ID | 896ca32b-3f51-6815-5c1b-1846b2cffd1c@redhat.com |
---|---|
State | New |
Headers | show |
On 6 October 2016 at 09:19, Laszlo Ersek <lersek@redhat.com> wrote: > On 10/06/16 00:39, Bruce Cran wrote: >> On 10/04/2016 07:30 PM, Yonghong Zhu wrote: >> >>> Update the tools_def.template to add NOOPT support with GCC tool chains. >>> >>> Cc: Liming Gao <liming.gao@intel.com> >>> Cc: Laszlo Ersek <lersek@redhat.com> >>> Contributed-under: TianoCore Contribution Agreement 1.0 >>> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> >> >> Reviewed-by: Bruce Cran <bruce.cran@gmail.com> >> Tested-by: Bruce Cran <bruce.cran@gmail.com> >> >> Tested with both GCC49 and GCC5 toolchain settings (using gcc 6.2.1 for >> both) and verified that both have functional debugging, though gdb skips >> around with GCC5 as expected due to LTCG. >> > > Right; as I mentioned up-thread, I wonder if we should disable -flto and -Os in NOOPT_GCC5_IA32_DLINK_FLAGS and NOOPT_GCC5_X64_DLINK_FLAGS. > > How about we add the following to Yonghong's v2? > - first, move "-flto" from GCC5_IA32_X64_DLINK_FLAGS and GCC5_X64_DLINK_FLAGS to the users of those macros (both GCC5- and CLANG38-related users exist), > - second, for the GCC5 users of these macros: split them into DEBUG/RELEASE/NOOPT, and remove -Os from NOOPT. > > The end result is that none of the earlier macro values change, except for NOOPT_GCC5_(IA32|X64)_DLINK_FLAGS; those two lose both -flto and -Os, which is our purpose. This would eliminate the skipping around that you mention. > > What do you guys think? See the patch below (again, to be applied on top of Yonghong's v2, or to be squashed into it). > I agree. If we are going through the trouble of having a separate NOOPT flavor, it should at least do what it says on the tin. If it skips around, using it has no advantage over using DEBUG _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 2c0dcd67b906..60b2c2578f8d 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4477,9 +4477,9 @@ DEFINE GCC5_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -flto -fno-built DEFINE GCC5_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -flto -fno-builtin -DUSING_LTO DEFINE GCC5_IA32_X64_DLINK_COMMON = DEF(GCC49_IA32_X64_DLINK_COMMON) DEFINE GCC5_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -DEFINE GCC5_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) -flto +DEFINE GCC5_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS)