VirtualBox

Changeset 99473 in vbox for trunk/src/VBox/Devices/EFI


Ignore:
Timestamp:
Apr 20, 2023 6:19:45 AM (20 months ago)
Author:
vboxsync
Message:

Devices/EFI/Firmware: Add the necessary compiler definitions for the AArch64 and AArch32 firmware images, bugref:10400

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware/vbox-tools_def.txt

    r84676 r99473  
    4545DEFINE GCC48_IA32_PREFIX       = @VBOX_PATH_PREFIX_GCC32@
    4646DEFINE GCC48_X64_PREFIX        = @VBOX_PATH_PREFIX_GCC64@
     47DEFINE GCC48_AARCH64_PREFIX    = @VBOX_PATH_PREFIX_GCC_AARCH64@
     48DEFINE GCC48_ARM_PREFIX        = @VBOX_PATH_PREFIX_GCC_ARM@
    4749
    4850DEFINE UNIX_IASL_BIN           = @VBOX_IASLCMD@
     
    413415
    414416DEFINE GCC_ALL_CC_FLAGS            = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall  -Wno-array-bounds -include AutoGen.h -fno-common
     417DEFINE GCC_ARM_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -fno-pic -fno-pie
    415418DEFINE GCC_IA32_CC_FLAGS           = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe @VBOX_MINGW32_Wno@
    416419DEFINE GCC_X64_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe @VBOX_MINGW32_Wno@
     420DEFINE GCC_ARM_CC_XIPFLAGS         = -mno-unaligned-access
     421DEFINE GCC_AARCH64_CC_FLAGS        = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char  -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie -ffixed-x18
     422DEFINE GCC_AARCH64_CC_XIPFLAGS     = -mstrict-align -mgeneral-regs-only
    417423DEFINE GCC_DLINK_FLAGS_COMMON      = -nostdlib --pie
    418424DEFINE GCC_DLINK2_FLAGS_COMMON     = -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
    419425DEFINE GCC_IA32_X64_DLINK_COMMON   = DEF(GCC_DLINK_FLAGS_COMMON) --gc-sections
     426DEFINE GCC_ARM_AARCH64_DLINK_COMMON= -Wl,--emit-relocs -nostdlib -Wl,--gc-sections -u $(IMAGE_ENTRY_POINT) -Wl,-e,$(IMAGE_ENTRY_POINT),-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
     427DEFINE GCC_ARM_DLINK_FLAGS         = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -z common-page-size=0x20 -Wl,--pic-veneer
     428DEFINE GCC_AARCH64_DLINK_FLAGS     = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -z common-page-size=0x20
     429DEFINE GCC_ARM_AARCH64_ASLDLINK_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0 DEF(GCC_DLINK2_FLAGS_COMMON) -z common-page-size=0x20
    420430DEFINE GCC_IA32_X64_ASLDLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT)
     431DEFINE GCC_ARM_ASLDLINK_FLAGS      = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
     432DEFINE GCC_AARCH64_ASLDLINK_FLAGS  = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
    421433DEFINE GCC_IA32_X64_DLINK_FLAGS    = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
    422434DEFINE GCC_ASM_FLAGS               = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
     
    429441DEFINE GCC_IA32_RC_FLAGS           = -I binary -O elf32-i386          -B i386    --rename-section .data=.hii
    430442DEFINE GCC_X64_RC_FLAGS            = -I binary -O elf64-x86-64        -B i386    --rename-section .data=.hii
     443DEFINE GCC_ARM_RC_FLAGS            = -I binary -O elf32-littlearm     -B arm         --rename-section .data=.hii
     444DEFINE GCC_AARCH64_RC_FLAGS        = -I binary -O elf64-littleaarch64 -B aarch64     --rename-section .data=.hii
    431445
    432446DEFINE GCC48_ALL_CC_FLAGS            = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall  -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
     
    440454DEFINE GCC48_X64_DLINK2_FLAGS        = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF(GCC_DLINK2_FLAGS_COMMON)
    441455DEFINE GCC48_ASM_FLAGS               = DEF(GCC_ASM_FLAGS)
     456DEFINE GCC48_ARM_ASM_FLAGS           = $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
     457DEFINE GCC48_AARCH64_ASM_FLAGS       = $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
     458DEFINE GCC48_ARM_CC_FLAGS            = $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector -mword-relocations
     459DEFINE GCC48_ARM_CC_XIPFLAGS         = DEF(GCC_ARM_CC_XIPFLAGS)
     460DEFINE GCC48_AARCH64_CC_FLAGS        = $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS)
     461DEFINE GCC48_AARCH64_CC_XIPFLAGS     = DEF(GCC_AARCH64_CC_XIPFLAGS)
     462DEFINE GCC48_ARM_DLINK_FLAGS         = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--oformat=elf32-littlearm
     463DEFINE GCC48_ARM_DLINK2_FLAGS        = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x220
     464DEFINE GCC48_AARCH64_DLINK_FLAGS     = DEF(GCC_AARCH64_DLINK_FLAGS)
     465DEFINE GCC48_AARCH64_DLINK2_FLAGS    = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x228
     466DEFINE GCC48_ARM_ASLDLINK_FLAGS      = DEF(GCC_ARM_ASLDLINK_FLAGS) -Wl,--oformat=elf32-littlearm
     467DEFINE GCC48_AARCH64_ASLDLINK_FLAGS  = DEF(GCC_AARCH64_ASLDLINK_FLAGS)
    442468DEFINE GCC48_ASLCC_FLAGS             = DEF(GCC_ASLCC_FLAGS)
    443469
     
    518544  NOOPT_GCC48_X64_CC_FLAGS       = DEF(GCC48_X64_CC_FLAGS) -O0
    519545
     546##################
     547# GCC48 ARM definitions
     548##################
     549*_GCC48_ARM_CC_PATH              = DEF(GCC48_ARM_PREFIX)gcc
     550*_GCC48_ARM_SLINK_PATH           = DEF(GCC48_ARM_PREFIX)ar
     551*_GCC48_ARM_DLINK_PATH           = DEF(GCC48_ARM_PREFIX)gcc
     552*_GCC48_ARM_ASLDLINK_PATH        = DEF(GCC48_ARM_PREFIX)gcc
     553*_GCC48_ARM_ASM_PATH             = DEF(GCC48_ARM_PREFIX)gcc
     554*_GCC48_ARM_PP_PATH              = DEF(GCC48_ARM_PREFIX)gcc
     555*_GCC48_ARM_VFRPP_PATH           = DEF(GCC48_ARM_PREFIX)gcc
     556*_GCC48_ARM_ASLCC_PATH           = DEF(GCC48_ARM_PREFIX)gcc
     557*_GCC48_ARM_ASLPP_PATH           = DEF(GCC48_ARM_PREFIX)gcc
     558*_GCC48_ARM_RC_PATH              = DEF(GCC48_ARM_PREFIX)objcopy
     559
     560*_GCC48_ARM_ASLCC_FLAGS          = DEF(GCC48_ASLCC_FLAGS)
     561*_GCC48_ARM_ASLDLINK_FLAGS       = DEF(GCC48_ARM_ASLDLINK_FLAGS)
     562*_GCC48_ARM_ASM_FLAGS            = DEF(GCC48_ARM_ASM_FLAGS)
     563*_GCC48_ARM_DLINK_FLAGS          = DEF(GCC48_ARM_DLINK_FLAGS)
     564*_GCC48_ARM_DLINK2_FLAGS         = DEF(GCC48_ARM_DLINK2_FLAGS)
     565*_GCC48_ARM_DTCPP_FLAGS          = DEF(GCC_DTCPP_FLAGS)
     566*_GCC48_ARM_PLATFORM_FLAGS       = -march=armv7-a
     567*_GCC48_ARM_PP_FLAGS             = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
     568*_GCC48_ARM_RC_FLAGS             = DEF(GCC_ARM_RC_FLAGS)
     569*_GCC48_ARM_VFRPP_FLAGS          = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
     570*_GCC48_ARM_CC_XIPFLAGS          = DEF(GCC48_ARM_CC_XIPFLAGS)
     571
     572  DEBUG_GCC48_ARM_CC_FLAGS       = DEF(GCC48_ARM_CC_FLAGS) -O0
     573RELEASE_GCC48_ARM_CC_FLAGS       = DEF(GCC48_ARM_CC_FLAGS) -Wno-unused-but-set-variable
     574  NOOPT_GCC48_ARM_CC_FLAGS       = DEF(GCC48_ARM_CC_FLAGS) -O0
     575
     576##################
     577# GCC48 AARCH64 definitions
     578##################
     579*_GCC48_AARCH64_CC_PATH          = DEF(GCC48_AARCH64_PREFIX)gcc
     580*_GCC48_AARCH64_SLINK_PATH       = DEF(GCC48_AARCH64_PREFIX)ar
     581*_GCC48_AARCH64_DLINK_PATH       = DEF(GCC48_AARCH64_PREFIX)gcc
     582*_GCC48_AARCH64_ASLDLINK_PATH    = DEF(GCC48_AARCH64_PREFIX)gcc
     583*_GCC48_AARCH64_ASM_PATH         = DEF(GCC48_AARCH64_PREFIX)gcc
     584*_GCC48_AARCH64_PP_PATH          = DEF(GCC48_AARCH64_PREFIX)gcc
     585*_GCC48_AARCH64_VFRPP_PATH       = DEF(GCC48_AARCH64_PREFIX)gcc
     586*_GCC48_AARCH64_ASLCC_PATH       = DEF(GCC48_AARCH64_PREFIX)gcc
     587*_GCC48_AARCH64_ASLPP_PATH       = DEF(GCC48_AARCH64_PREFIX)gcc
     588*_GCC48_AARCH64_RC_PATH          = DEF(GCC48_AARCH64_PREFIX)objcopy
     589
     590*_GCC48_AARCH64_ASLCC_FLAGS      = DEF(GCC48_ASLCC_FLAGS)
     591*_GCC48_AARCH64_ASLDLINK_FLAGS   = DEF(GCC48_AARCH64_ASLDLINK_FLAGS)
     592*_GCC48_AARCH64_ASM_FLAGS        = DEF(GCC48_AARCH64_ASM_FLAGS)
     593*_GCC48_AARCH64_DLINK_FLAGS      = DEF(GCC48_AARCH64_DLINK_FLAGS)
     594*_GCC48_AARCH64_DLINK2_FLAGS     = DEF(GCC48_AARCH64_DLINK2_FLAGS)
     595*_GCC48_AARCH64_DTCPP_FLAGS      = DEF(GCC_DTCPP_FLAGS)
     596*_GCC48_AARCH64_PLATFORM_FLAGS   =
     597*_GCC48_AARCH64_PP_FLAGS         = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
     598*_GCC48_AARCH64_RC_FLAGS         = DEF(GCC_AARCH64_RC_FLAGS)
     599*_GCC48_AARCH64_VFRPP_FLAGS      = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
     600*_GCC48_AARCH64_CC_XIPFLAGS      = DEF(GCC48_AARCH64_CC_XIPFLAGS)
     601
     602  DEBUG_GCC48_AARCH64_CC_FLAGS   = DEF(GCC48_AARCH64_CC_FLAGS) -O0
     603RELEASE_GCC48_AARCH64_CC_FLAGS   = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable
     604  NOOPT_GCC48_AARCH64_CC_FLAGS   = DEF(GCC48_AARCH64_CC_FLAGS) -O0
     605
    520606#################
    521607# ASM 16 linker definitions
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette