Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ARM64 compilation on CentOS 7 / RHEL7 with GCC 4.8
2017-07-25, 23:48
Post: #1
ARM64 compilation on CentOS 7 / RHEL7 with GCC 4.8
The arm64 makefile sets the -mabi=lp64 CFLAG. It appears this ABI argument was added to GCC in 4.9 for AArch64. CentOS 7 / RHEL7 ship with GCC 4.8.

Compiling via
Code:
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 bin-arm64-efi/snp.efi
without this flag in 4.8.5 results in the error:

Code:
...
  [BUILD] bin-arm64-efi/acpi_settings.o
In file included from core/acpi_settings.c:34:0:
core/acpi_settings.c: In function ‘acpi_settings_fetch’:
include/errno.h:261:2: error: invalid 'asm': invalid operand prefix '%c'
  __asm__ ( ".section \".einfo\", \"\", " PROGBITS_OPS "\n\t" \
  ^
include/errno.h:514:16: note: in expansion of macro ‘__einfo_error’
#define ENOENT __einfo_error ( EINFO_ENOENT )
                ^
core/acpi_settings.c:93:11: note: in expansion of macro ‘ENOENT’
   return -ENOENT;
           ^
include/errno.h:261:2: error: invalid 'asm': invalid operand prefix '%c'
  __asm__ ( ".section \".einfo\", \"\", " PROGBITS_OPS "\n\t" \
  ^
include/errno.h:514:16: note: in expansion of macro ‘__einfo_error’
#define ENOENT __einfo_error ( EINFO_ENOENT )
                ^
core/acpi_settings.c:93:11: note: in expansion of macro ‘ENOENT’
   return -ENOENT;
           ^
include/errno.h:261:2: error: invalid 'asm': invalid operand prefix '%c'
  __asm__ ( ".section \".einfo\", \"\", " PROGBITS_OPS "\n\t" \
  ^
include/errno.h:514:16: note: in expansion of macro ‘__einfo_error’
#define ENOENT __einfo_error ( EINFO_ENOENT )
                ^
core/acpi_settings.c:101:11: note: in expansion of macro ‘ENOENT’
   return -ENOENT;
           ^
include/errno.h:261:2: error: invalid 'asm': invalid operand prefix '%c'
  __asm__ ( ".section \".einfo\", \"\", " PROGBITS_OPS "\n\t" \
  ^
include/errno.h:514:16: note: in expansion of macro ‘__einfo_error’
#define ENOENT __einfo_error ( EINFO_ENOENT )
                ^
core/acpi_settings.c:101:11: note: in expansion of macro ‘ENOENT’
   return -ENOENT;
           ^
make: *** [bin-arm64-efi/acpi_settings.o] Error 1

Compiling natively
Code:
make ARCH=arm64 bin-arm-efi/snp.efi -j 8
on a aarch64 machine results in a similar error with the flag removed:

Code:
[BUILD] bin-arm-efi/pc_kbd.o
In file included from core/edd.c:26:0:
core/edd.c: In function ‘edd_describe’:
include/errno.h:261:2: error: invalid 'asm': invalid operand prefix '%c'
  __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/edd.c:56:9: note: in expansion of macro ‘ENOTSUP’
   rc = -ENOTSUP;
         ^
include/errno.h:261:2: error: invalid 'asm': invalid operand prefix '%c'
  __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/edd.c:56:9: note: in expansion of macro ‘ENOTSUP’
   rc = -ENOTSUP;
         ^
make: *** [bin-arm-efi/edd.o] Error 1
Find all posts by this user
Quote this message in a reply
2017-07-26, 09:59
Post: #2
RE: ARM64 compilation on CentOS 7 / RHEL7 with GCC 4.8
You might get more feedback on the ipxe-devel mailing list which has a more technical audience then here.
Find all posts by this user
Quote this message in a reply
2017-07-26, 16:43
Post: #3
RE: ARM64 compilation on CentOS 7 / RHEL7 with GCC 4.8
Thanks I'll post this on ipxe-devel as well.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)