[ipxe-devel] Building bin-arm64-efi/snp.efi is broken
Heinrich Schuchardt
xypron.glpk at gmx.de
Sun Aug 26 09:33:48 UTC 2018
On 08/04/2018 02:57 PM, Heinrich Schuchardt wrote:
> The following patch breaks building for arm64 with GCC 8.1.0 (as
> supplied by package gcc-aarch64-linux-gnu in Debian Buster):
>
> commit 1a7746603bca1022b63c406c9459525312a2b2b6
> Author: Michael Brown <mcb30 at ipxe.org>
> Date: Fri Jul 28 13:50:35 2017 +0100
>
> [build] Fix use of inline assembly on GCC 4.8 ARM64 builds
>
>
> In file included from core/blocktrans.c:34:
> core/blocktrans.c: In function ‘blktrans_xferbuf_realloc’:
> include/errno.h:261:2: error: invalid 'asm': invalid address mode
> __asm__ ( ".section \".einfo\", \"\", " PROGBITS_OPS "\n\t" \
> ^~~~~~~
> include/errno.h:589:17: note: in expansion of macro ‘__einfo_error’
> #define ENOTSUP __einfo_error ( EINFO_ENOTSUP )
> ^~~~~~~~~~~~~
> core/blocktrans.c:57:11: note: in expansion of macro ‘ENOTSUP’
> return -ENOTSUP;
> ^~~~~~~
> include/errno.h:261:2: error: invalid 'asm': invalid address mode
> __asm__ ( ".section \".einfo\", \"\", " PROGBITS_OPS "\n\t" \
> ^~~~~~~
> include/errno.h:589:17: note: in expansion of macro ‘__einfo_erro
>
> Please, correct the coding.
>
> Best regards
>
> Heinrich Schuchardt
>
Hello Michael,
it is the following lines that are causing the problem:
+++ b/src/include/errno.h
@@ -261,11 +262,11 @@ static inline void eplatform_discard ( int dummy
__unused, ... ) {}
__asm__ ( ".section \".einfo\", \"\", " PROGBITS_OPS "\n\t" \
".align 8\n\t" \
"\n1:\n\t" \
".long ( 4f - 1b )\n\t" \
==> ".long %a0\n\t" \
".long ( 2f - 1b )\n\t" \
".long ( 3f - 1b )\n\t" \
==> ".long %a1\n\t" \
"\n2:\t.asciz \"" __einfo_desc ( einfo ) "\"\n\t" \
"\n3:\t.asciz \"" __FILE__ "\"\n\t" \
".align 8\n\t" \
Please, replace them with valid gcc 8 assembler code.
Best regards
Heinrich Schuchardt
More information about the ipxe-devel
mailing list