summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2017-06-01 16:39:37 -0700
committerJordan Justen <jordan.l.justen@intel.com>2017-07-07 15:38:13 -0700
commite9651c12721d882f384ef10b7467af4ba56387c3 (patch)
tree7fbf64e8f86557fb241652326da413a3151f886f /EmulatorPkg
parent401d1343cb0279908a748fd0ff27609ccc300b43 (diff)
downloadedk2-e9651c12721d882f384ef10b7467af4ba56387c3.tar.gz
edk2-e9651c12721d882f384ef10b7467af4ba56387c3.tar.bz2
edk2-e9651c12721d882f384ef10b7467af4ba56387c3.zip
EmulatorPkg/Unix/Host: Add GCC5 CC/DLINK commands (for GCC >= 5)
These flags are based on the flags from the GCC5 toolchain in tools_def.template. Since the GCC5 toolchain uses link-time optimizations (LTO), we must compile and link the 'Host' files with LTO enabled so we can link to other modules. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'EmulatorPkg')
-rw-r--r--EmulatorPkg/Unix/Host/Host.inf2
1 files changed, 2 insertions, 0 deletions
diff --git a/EmulatorPkg/Unix/Host/Host.inf b/EmulatorPkg/Unix/Host/Host.inf
index d83857a1fd..33990fc20e 100644
--- a/EmulatorPkg/Unix/Host/Host.inf
+++ b/EmulatorPkg/Unix/Host/Host.inf
@@ -122,6 +122,7 @@
GCC:*_*_IA32_ASM_FLAGS == -m32 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
GCC:*_*_X64_DLINK_FLAGS == -o $(BIN_DIR)/Host -m64 -L/usr/X11R6/lib
+ GCC:*_GCC5_X64_DLINK_FLAGS == -flto -o $(BIN_DIR)/Host -m64 -L/usr/X11R6/lib
GCC:*_*_X64_CC_FLAGS == -m64 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -idirafter/usr/include -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
GCC:*_GCC44_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
GCC:*_GCC45_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
@@ -129,6 +130,7 @@
GCC:*_GCC47_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
GCC:*_GCC48_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
GCC:*_GCC49_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
+ GCC:*_GCC5_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" -flto -DUSING_LTO -Os
GCC:*_*_X64_PP_FLAGS == -m64 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
GCC:*_*_X64_ASM_FLAGS == -m64 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h