[PATCH] Fix cross-compilation

20 views
Skip to first unread message

Jan Kiszka

unread,
Aug 23, 2021, 3:39:48 PM8/23/21
to efibootguard-dev, Christian Storm
From: Jan Kiszka <jan.k...@siemens.com>

Check for additional toolchain services needed and AC_SUBST their
variables. This fixes cross-building for arm64.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
configure.ac | 2 ++
1 file changed, 2 insertions(+)

diff --git a/configure.ac b/configure.ac
index 761f2cd..7916dfb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,8 @@ AC_CANONICAL_HOST
AC_SYS_LARGEFILE

AC_PROG_CC
+AC_CHECK_TOOL(LD, ld)
+AC_CHECK_TOOL(OBJCOPY, objcopy)

dnl Dont try to use things like -std=c99 for efi compilation
GNUEFI_CC=$CC
--
2.31.1

Jan Kiszka

unread,
Aug 23, 2021, 3:47:25 PM8/23/21
to efibootguard-dev, Christian Storm
From: Jan Kiszka <jan.k...@siemens.com>

Check for additional toolchain services needed and AC_SUBST their
variables. This fixes cross-building for arm64.

Obsoletes the OBJCOPY initialization in Makefile.am.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Makefile.am | 2 --
configure.ac | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 83da343..ee142d1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,8 +18,6 @@
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_MAKEFLAGS = --no-print-directory

-OBJCOPY ?= objcopy
-
efibootguarddir = $(libdir)/efibootguard

AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir) -include config.h
Reply all
Reply to author
Forward
0 new messages