Native GCC X64 build is supported. But looks you are using Gentoo2.2 and its built-in gcc is a variant of native GCC. It generates some Relocation sections which couldn't be identified GenFw tool in BaseTools.
The related code is in BaseTools\Source\C\GenFw\Elf64Convert.c. If you are interesting in this, you can propose a fix:) -----Original Message----- From: Oleksii Shevchuk [mailto:[email protected]] Sent: Monday, July 08, 2013 13:54 To: [email protected] Subject: [edk2-buildtools] X64 build I'm trying to build HelloWorld app with GCC 4.4.7/Binutils 2.23/2.22 with next issue: # LC_ALL=C build --arch "X64" --platform MdeModulePkg/MdeModulePkg.dsc --tagname "GCC44" --module MdeModulePkg/Application/HelloWorld/HelloWorld.inf --buildtarget RELEASE 2>&1 >log.txt Build environment: Linux-3.10.0SIGN-x86_64-Intel-R-_Core-TM-_i7-3520M_CPU_@_2.90GHz-with-gentoo-2.2 Build start time: 08:40:58, Jul.08 2013 WORKSPACE = /tmp/portage/sys-firmware/edk2-9999/work ECP_SOURCE = /tmp/portage/sys-firmware/edk2-9999/work/EdkCompatibilityPkg EDK_SOURCE = /tmp/portage/sys-firmware/edk2-9999/work/EdkCompatibilityPkg EFI_SOURCE = /tmp/portage/sys-firmware/edk2-9999/work/EdkCompatibilityPkg EDK_TOOLS_PATH = /tmp/portage/sys-firmware/edk2-9999/work/BaseTools make: *** [/tmp/portage/sys-firmware/edk2-9999/work/Build/MdeModule/RELEASE_GCC44/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.efi] Error 2 build.py... : error 7000: Failed to execute command make all [/tmp/portage/sys-firmware/edk2-9999/work/Build/MdeModule/RELEASE_GCC44/X64/MdeModulePkg/Application/HelloWorld/HelloWorld] - Failed - Build end time: 08:41:01, Jul.08 2013 Build total time: 00:00:03 # cat log.txt | grep -B 1 -i error | tail -n 4 /tmp/portage/sys-firmware/edk2-9999/work/Build/MdeModule/RELEASE_GCC44/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll unsupported ELF EM_X86_64 relocation 0x18. GenFw: ERROR 3000: Invalid /tmp/portage/sys-firmware/edk2-9999/work/Build/MdeModule/RELEASE_GCC44/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll unsupported ELF EM_X86_64 relocation 0x18. GenFw: ERROR 3000: Invalid Also I tried to build with -t ELFGCC: # LC_ALL=C build --arch "X64" --platform MdeModulePkg/MdeModulePkg.dsc --tagname "ELFGCC" --module MdeModulePkg/Application/HelloWorld/HelloWorld.inf --buildtarget RELEASE ... "/usr/bin/x86_64-pc-linux-gnu-ar" -cr /tmp/portage/sys-firmware/edk2-9999/work/Build/MdeModule/RELEASE_ELFGCC/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/OUTPUT/HelloWorld.lib @/tmp/portage/sys-firmware/edk2-9999/work/Build/MdeModule/RELEASE_ELFGCC/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/OUTPUT/object_files.lst "/usr/bin/x86_64-pc-linux-gnu-ld" -o /tmp/portage/sys-firmware/edk2-9999/work/Build/MdeModule/RELEASE_ELFGCC/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll -nostdlib --shared --entry _ModuleEntryPoint -u _ModuleEntryPoint -Map /tmp/portage/sys-firmware/edk2-9999/work/Build/MdeModule/RELEASE_ELFGCC/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.map -\( @/tmp/portage/sys-firmware/edk2-9999/work/Build/MdeModule/RELEASE_ELFGCC/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/OUTPUT/static_library_files.lst -\) /usr/bin/x86_64-pc-linux-gnu-ld: /tmp/portage/sys-firmware/edk2-9999/work/Build/MdeModule/RELEASE_ELFGCC/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/OUTPUT/HelloWorld.lib(AutoGen.obj): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /tmp/portage/sys-firmware/edk2-9999/work/Build/MdeModule/RELEASE_ELFGCC/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/OUTPUT/HelloWorld.lib: could not read symbols: Bad value make: *** [/tmp/portage/sys-firmware/edk2-9999/work/Build/MdeModule/RELEASE_ELFGCC/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll] Error 1 Is X64 build supported? ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ edk2-buildtools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ edk2-buildtools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel
