Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] Fix use of inline assembly on GCC 8 ARM64 builds
Commit 1a77466 ("[build] Fix use of inline assembly on GCC 4.8 ARM64 builds") switched from using "%c0" to "%a0" in order to avoid an "invalid operand prefix" error on the ARM64 version of GCC 4.8. It appears that the ARM64 version of GCC 8 now produces an "invalid address mode" error for the "%a0" form, but is happy with the original "%c0" form. Switch back to using the "%c0" form, on the assumption that the requirement for "%a0" was a temporary aberration. Originally-fixed-by: John L. Jolly <jjolly@suse.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
- Loading branch information
3fb3ffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using gcc-aarch64-linux-gnu cross tool.
When my code include this commit, it arise asm error....
When I revert this commit, it works well.
/usr1/git/bootloader/ipxe/src # rpm -qi gcc-aarch64-linux-gnu
Name : gcc-aarch64-linux-gnu
Version : 4.8.5
Release : 16.el7.1
Architecture: x86_64
Install Date: Tue 10 Jul 2018 08:00:23 PM CST
Group : Development/Tools
Size : 24674485
License : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
Signature : RSA/SHA256, Thu 29 Jun 2017 03:16:05 AM CST, Key ID 6a2faea2352c64e5
Source RPM : cross-gcc-4.8.5-16.el7.1.src.rpm
Build Date : Wed 28 Jun 2017 10:28:50 PM CST
Build Host : buildhw-09.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager : Fedora Project
Vendor : Fedora Project
URL : http://gcc.gnu.org
Summary : Cross-build binary utilities for aarch64-linux-gnu
Description :
Cross-build GNU C compiler.
Only building kernels is currently supported. Support for cross-building
user space programs is not currently provided as that would massively multiply
the number of packages.
/usr1/git/bootloader/ipxe/src #
/usr1/git/bootloader/ipxe/src #
/usr1/git/bootloader/ipxe/src # make CROSS=aarch64-linux-gnu- bin-arm64-efi/snponly.efi
[BUILD] bin-arm64-efi/xfer.o
In file included from core/xfer.c:29:0:
core/xfer.c: In function ‘xfer_deliver’:
include/errno.h:261:2: error: invalid 'asm': invalid operand prefix '%c'
asm ( ".section ".einfo", "", " PROGBITS_OPS "\n\t"
^
include/errno.h:619:15: note: in expansion of macro ‘__einfo_error’
#define EPIPE __einfo_error ( EINFO_EPIPE )
^
core/xfer.c:210:9: note: in expansion of macro ‘EPIPE’
rc = -EPIPE;
^
include/errno.h:261:2: error: invalid 'asm': invalid operand prefix '%c'
asm ( ".section ".einfo", "", " PROGBITS_OPS "\n\t"
^
include/errno.h:619:15: note: in expansion of macro ‘__einfo_error’
#define EPIPE __einfo_error ( EINFO_EPIPE )
^
core/xfer.c:210:9: note: in expansion of macro ‘EPIPE’
rc = -EPIPE;
^
core/xfer.c: At top level:
cc1: error: unrecognized command line option "-Wno-address-of-packed-member" [-Werror]
cc1: all warnings being treated as errors
make: *** [bin-arm64-efi/xfer.o] Error 1
/usr1/git/bootloader/ipxe/src #