[ipxe-devel] [PATCH 1/1] build: Fix building with gcc 8.2

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Aug 26 10:45:27 UTC 2018


Commit 1a7746603bca ("Fix use of inline assembly on GCC 4.8 ARM64 builds")
introduced the usage of an operand modifier that is only valid for x86:
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#x86Operandmodifiers
So we could not expect this work for arm64 in following releases of GCC.
And now with GCC 8.2 it is broken:

In file included from core/open.c:28:
core/open.c: In function ‘xfer_open_uri’:
include/errno.h:261:2: error: invalid 'asm': invalid address mode
  __asm__ ( ".section \".einfo\", \"\", " PROGBITS_OPS "\n\t" \
  ^~~~~~~
include/errno.h:534:16: note: in expansion of macro ‘__einfo_error’

GCC 4.8 is obsolete. It has not seen any update since 2014.
So let's remove the undocumented operand modifer.

Fixes: 1a7746603bca ("Fix use of inline assembly on GCC 4.8 ARM64 builds")
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 src/include/errno.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/include/errno.h b/src/include/errno.h
index e80bf9ca..0294a990 100644
--- a/src/include/errno.h
+++ b/src/include/errno.h
@@ -262,10 +262,10 @@ static inline void eplatform_discard ( int dummy __unused, ... ) {}
 		  ".align 8\n\t"					\
 		  "\n1:\n\t"						\
 		  ".long ( 4f - 1b )\n\t"				\
-		  ".long %a0\n\t"					\
+		  ".long %0\n\t"					\
 		  ".long ( 2f - 1b )\n\t"				\
 		  ".long ( 3f - 1b )\n\t"				\
-		  ".long %a1\n\t"					\
+		  ".long %1\n\t"					\
 		  "\n2:\t.asciz \"" __einfo_desc ( einfo ) "\"\n\t"	\
 		  "\n3:\t.asciz \"" __FILE__ "\"\n\t"			\
 		  ".align 8\n\t"					\
-- 
2.18.0




More information about the ipxe-devel mailing list