]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/ArmVirtQemuKernel.dsc
ArmVirtPkg/PrePiUniCoreRelocatable CLANG38: work around build issues
[mirror_edk2.git] / ArmVirtPkg / ArmVirtQemuKernel.dsc
index 434d6861a56ff24c19d4c94ca9cdb2c4321fea68..c4324a9e264b8438566a3a3ef94120e2ea9bf489 100644 (file)
 [LibraryClasses.common.UEFI_DRIVER]\r
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf\r
 \r
-[BuildOptions.ARM.EDKII.SEC, BuildOptions.ARM.EDKII.BASE]\r
+[BuildOptions.common.EDKII.SEC, BuildOptions.common.EDKII.BASE]\r
   # Avoid MOVT/MOVW instruction pairs in code that may end up in the PIE\r
   # executable we build for the relocatable PrePi. They are not runtime\r
   # relocatable in ELF.\r
-  *_CLANG35_*_CC_FLAGS = -mno-movt\r
+  *_CLANG35_ARM_CC_FLAGS = -mno-movt\r
+\r
+  #\r
+  # CLANG38 with LTO support enabled uses the GNU GOLD linker, which insists\r
+  # on emitting GOT based symbol references when running in shared mode, unless\r
+  # we override visibility to 'hidden' in all modules that make up the PrePi\r
+  # build.\r
+  #\r
+  GCC:*_CLANG38_*_CC_FLAGS = -include $(WORKSPACE)/ArmVirtPkg/Include/Platform/Hidden.h\r
 \r
 ################################################################################\r
 #\r
   gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE\r
 !endif\r
 \r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }\r
+\r
+  #\r
+  # The maximum physical I/O addressability of the processor, set with\r
+  # BuildCpuHob().\r
+  #\r
+  gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16\r
+\r
 [PcdsPatchableInModule.common]\r
   #\r
   # This will be overridden in the code\r
   gArmTokenSpaceGuid.PcdFdBaseAddress|0x0\r
   gArmTokenSpaceGuid.PcdFvBaseAddress|0x0\r
 \r
-[PcdsFixedAtBuild.AARCH64]\r
-\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }\r
-\r
-  #\r
-  # The maximum physical I/O addressability of the processor, set with\r
-  # BuildCpuHob().\r
-  #\r
-  gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16\r
-\r
-  # KVM limits it IPA space to 40 bits (1 TB), so there is no need to\r
-  # support anything bigger, even if the host hardware does\r
-  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|40\r
-\r
 [PcdsDynamicDefault.common]\r
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3\r
 \r