EmulatorPkg: Clear DLINK_XIPFLAGS Clear DLINK_XIPFLAGS to disable use of alignment flags for all tool chains. Setting alignment flags other than the OS application defaults are not required for EmulatorPkg builds. Add and/or clarify comments to explain the overrides to the default firmware build configurations required for EmulatorPkg.dsc builds. Align Mingw CLANGDWARF to GCC by moving the application libraries into DLINK2_FLAGS. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc index 3091758..d6e71b3 100644 --- a/EmulatorPkg/EmulatorPkg.dsc +++ b/EmulatorPkg/EmulatorPkg.dsc
@@ -637,6 +637,10 @@ MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096 /FILEALIGN:4096 MSFT:*_*_IA32_DLINK_FLAGS = /BASE:0x010000000 MSFT:*_*_X64_DLINK_FLAGS = /BASE:0x180000000 + # + # Clear DLINK_XIPFLAGS to disable alignment overrides + # + MSFT:*_*_*_DLINK_XIPFLAGS == # # Windows/CLANGPDB using Visual Studio includes and libraries @@ -648,6 +652,10 @@ CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096 /FILEALIGN:4096 CLANGPDB:*_*_IA32_DLINK_FLAGS = /BASE:0x010000000 CLANGPDB:*_*_X64_DLINK_FLAGS = /BASE:0x180000000 + # + # Clear DLINK_XIPFLAGS to disable alignment overrides + # + CLANGPDB:*_*_*_DLINK_XIPFLAGS == !if $(WIN_MINGW32_BUILD) # @@ -687,10 +695,13 @@ GCC:DEBUG_CLANGDWARF_*_DLINK_FLAGS = -g -Wl,--pdb,$(DEBUG_DIR)/$(BASE_NAME).pdb -Wno-unused-command-line-argument GCC:NOOPT_CLANGDWARF_*_DLINK_FLAGS = -g -Wl,--pdb,$(DEBUG_DIR)/$(BASE_NAME).pdb -Wno-unused-command-line-argument # - # Set DLINK2_FLAGS to empyty string to disable use of linker script + # Clear DLINK2_FLAGS to disable use of linker script # - GCC:*_CLANGDWARF_X64_DLINK2_FLAGS == - GCC:*_CLANGDWARF_IA32_DLINK2_FLAGS == + GCC:*_CLANGDWARF_*_DLINK2_FLAGS == + # + # Clear DLINK_XIPFLAGS to disable alignment overrides + # + GCC:*_CLANGDWARF_*_DLINK_XIPFLAGS == !endif GCC:RELEASE_*_*_CC_FLAGS = -g0 @@ -748,7 +759,9 @@ GCC:RELEASE_*_*_DLINK_FLAGS = -flto GCC:*_*_IA32_DLINK_FLAGS = -m32 GCC:*_*_X64_DLINK_FLAGS = -m64 - + # + # Reset DLINK2_FLAGS to disable use of linker script and add libraries + # GCC:*_*_*_DLINK2_FLAGS == -lpthread -ldl -lXext -lX11 !if $(WIN_MINGW32_BUILD) @@ -768,16 +781,15 @@ # to generate PDB symbol information. -Wno-unused-command-line-argument # is added to ignore the error generated by -gcodeview in DLINK action. # - GCC:*_CLANGDWARF_*_DLINK_FLAGS == -o $(BIN_DIR)/$(BASE_NAME).exe -Wl,--entry,main -lwinmm -lgdi32 + GCC:*_CLANGDWARF_*_DLINK_FLAGS == -o $(BIN_DIR)/$(BASE_NAME).exe -Wl,--entry,main GCC:*_CLANGDWARF_IA32_DLINK_FLAGS = -target i686-w64-mingw32 GCC:*_CLANGDWARF_X64_DLINK_FLAGS = -target x86_64-w64-mingw32 GCC:DEBUG_CLANGDWARF_*_DLINK_FLAGS = -g -Wl,--pdb,$(BIN_DIR)/$(BASE_NAME).pdb -Wno-unused-command-line-argument GCC:NOOPT_CLANGDWARF_*_DLINK_FLAGS = -g -Wl,--pdb,$(BIN_DIR)/$(BASE_NAME).pdb -Wno-unused-command-line-argument # - # DLINK2_FLAGS must be set to empty string to disable use of linker script + # Reset DLINK2_FLAGS to disable use of linker script and add libraries # - GCC:*_CLANGDWARF_IA32_DLINK2_FLAGS == - GCC:*_CLANGDWARF_X64_DLINK2_FLAGS == + GCC:*_CLANGDWARF_*_DLINK2_FLAGS == -lwinmm -lgdi32 !endif #