Re: [PATCH 0/3] BaseTools GCC: pass CC flags to linker
Ard:toggle quoted messageShow quoted text
Without this change, GCC5 LTO can pass build. With it, what difference will be in the generated image? Original way may generate the wrong image, or new way will generate the smaller image?
From: Ard Biesheuvel [mailto:firstname.lastname@example.org]
Sent: Tuesday, August 2, 2016 10:39 PM
To: Zhu, Yonghong <email@example.com>; Gao, Liming <firstname.lastname@example.org>; Justen, Jordan L <email@example.com>; firstname.lastname@example.org; email@example.com
Cc: firstname.lastname@example.org; Ard Biesheuvel <email@example.com>
Subject: [PATCH 0/3] BaseTools GCC: pass CC flags to linker
GCC5 runs in LTO mode, which means it may generate code during the link
stage, and this code generation should be subject to the same settings
as ordinary code generation.
Since we now invoke GCC as the linker, we can start passing the CC_FLAGS
to the linker as well, with only minor surgery. This does not bother
non-LTO links at all, and forces the LTO links to use the correct settings.
Ard Biesheuvel (3):
BaseTools GCC: move -c compiler flag to build rules
BaseTools GCC5: disable warnings-as-errors for now
BaseTools GCC: add the compiler flags to the linker command line
BaseTools/Conf/build_rule.template | 18 ++++++++++--------
BaseTools/Conf/tools_def.template | 18 +++++++++---------
2 files changed, 19 insertions(+), 17 deletions(-)