On 10 July 2016 at 02:21, Marcin Wojtas mw@semihalf.com wrote:
From: Haim Boot hayim@marvell.com
The relocation type R_AARCH64_PREL32 in .rela.eh_frame (exception handling
frame) does not fit the checking requirement of GenFw in EDK2.
Building EDK2 with aarch64-elf bare metal toolchain (no unwind table by
default) will succeed. However build of EDK2 with aarch64-linux-gnueabi
toolchain (default enable unwind table generation) will fail.
EABI is closely tied to 32-bit ARM/AArch32, and so there is no such
thing as a 'aarch64-linux-gnueabi' compiler.
The issue can be fixed by adding -fno-unwind-tables, in order to disable
generating unwind table info, which is used mainly for debug. This commit
enables successful compilation of EDK2 both with aarch64-elf and
aarch64-linux-gnueabi toolchains.
This has nothing to do with bare metal vs hosted. Are you using the
RedHat build of GCC by any chance?
--
Ard.
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Haim Boot
hayim@marvell.com
> Signed-off-by: Marcin Wojtas
mw@semihalf.com
> ---
> Platforms/Marvell/Armada/Armada.dsc.inc | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Platforms/Marvell/Armada/Armada.dsc.inc b/Platforms/Marvell/Armada/Armada.dsc.inc
> index 5ef2098..00e3c4d 100644
> --- a/Platforms/Marvell/Armada/Armada.dsc.inc
> +++ b/Platforms/Marvell/Armada/Armada.dsc.inc
> @@ -197,6 +197,10 @@
> # Add support for GCC stack protector
> NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
>
> + # Enable compilation with aarch64-linux-gnueabi toolchain
> +[BuildOptions]
> + *_*_*_PLATFORM_FLAGS = -fno-unwind-tables
> +
> ################################################################################
> #
> # Pcd Section - list of all EDK II PCD Entries defined by this Platform
> --
> 1.8.3.1
>