audk/BaseTools/Source/C
Laszlo Ersek aa4e0df1f0 BaseTools/VfrCompile: honor EXTRA_LDFLAGS
In commit 81502cee20 ("BaseTools/Source/C: take EXTRA_LDFLAGS from the
caller", 2018-08-16), I missed that "VfrCompile/GNUmakefile" does not use
BUILD_LFLAGS in the APPLICATION linking rule, unlike "app.makefile" does.
Instead, "VfrCompile/GNUmakefile" uses the (undefined) LFLAGS macro.
Therefore commit 81502cee20 did not cover the linking step of
VfrCompile.

Thankfully, the structure of the linking rules is the same, between
"app.makefile" and "VfrCompile/GNUmakefile". Rename the undefined LFLAGS
macro in "VfrCompile/GNUmakefile" to VFR_LFLAGS (for consistency with
VFR_CXXFLAGS), and set it to EXTRA_LDFLAGS.

As a result, we have:

             | compilation                    | linking
  -----------+--------------------------------+----------------------
  VfrCompile | VFR_CXXFLAGS =                 | VFR_LFLAGS =
             | BUILD_OPTFLAGS =               | EXTRA_LDFLAGS
             | '-O2' + EXTRA_OPTFLAGS         |
  -----------+--------------------------------+----------------------
  other apps | BUILD_CFLAGS/BUILD_CXXFLAGS =  | BUILD_LFLAGS =
             | [...] + BUILD_OPTFLAGS =       | [...] + EXTRA_LDFLAGS
             | [...] + '-O2' + EXTRA_OPTFLAGS |

This table shows
- that the VfrCompile compilation and linking flags are always a subset of
  the corresponding flags used by the other apps,
- and that the EXTRA flags are always at the end.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1540244
Fixes: 81502cee20
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-08-22 09:32:46 -07:00
..
BootSectImage BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
BrotliCompress BaseTools GNUmakefile: Remove HOST_ARCH in every tool Makefile 2018-02-06 13:44:42 +08:00
Common BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
DevicePath BaseTools: Add Dns and BluetoothLE DevicePath 2018-08-16 13:41:55 +08:00
EfiLdrImage BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
EfiRom BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GenBootSector BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GenCrc32 BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GenFfs BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GenFv BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GenFw BaseTools: ElfConvert Tool update VerboseMsg to same with the comment 2018-07-23 10:53:05 +08:00
GenPage BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GenSec BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GenVtf BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GnuGenBootSector BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
Include BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
LzmaCompress BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
Makefiles BaseTools/Source/C: take EXTRA_LDFLAGS from the caller 2018-08-16 20:18:57 +02:00
PyEfiCompressor BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
PyUtility BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
Split BaseTools GNUmakefile: Remove HOST_ARCH in every tool Makefile 2018-02-06 13:44:42 +08:00
TianoCompress BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
VfrCompile BaseTools/VfrCompile: honor EXTRA_LDFLAGS 2018-08-22 09:32:46 -07:00
VolInfo BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GNUmakefile BaseTools: Add DevicePath support for PCD values 2017-12-31 13:10:49 +08:00
Makefile BaseTools: Add DevicePath support for PCD values 2017-12-31 13:10:49 +08:00