Discussion:
[ipxe-devel] [PATCH 1/1] build: Fix building with gcc 8.2
Michael Brown
2018-08-26 21:47:25 UTC
Permalink
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" \
This patch results in an incorrect assembler expression for the standard
x86 build, e.g.

.long $1216

instead of the needed

.long 1216

You can observe the effects using "make bin/errors" and examining the
resulting file. With your patch, all error numbers and line numbers are
zero.

I'm happy to ditch ARM gcc 4.8 support if it makes it cleaner to support
current versions of gcc, but the patch must still work for the x86 build.

Michael
Heinrich Schuchardt
2018-08-26 21:57:54 UTC
Permalink
_______________________________________________
ipxe-devel mailing list
ipxe-***@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel
Michael Brown
2018-08-26 22:05:04 UTC
Permalink
Thanks for reviewing.
Is there also an architecture specific bin/error target?
The "errors" target exists within any architecture: try e.g.
bin-arm64-efi/errors.
Maybe we need some architecture specific #define for the prefix.
It looks as though we might, unfortunately. We already have ASM_TCHAR
and ASM_TCHAR_OPS to handle similar variations in assembly syntax, so it
might fit alongside that.

Michael

Loading...