diff mbox series

[boot-wrapper,v4,1/4] Introduce --with-bw-arch for boot-wrapper compile arch

Message ID 20241017095520.939464-2-luca.fancellu@arm.com (mailing list archive)
State New, archived
Headers show
Series Add Armv8-R AArch64 support | expand

Commit Message

Luca Fancellu Oct. 17, 2024, 9:55 a.m. UTC
Introduce a new autoconf parameter --with-bw-arch that takes
'aarch64-a' and 'aarch32-a' as compile architecture, the former
is selected by default when the parameter is not passed.

This new parameter superseed --enable-aarch32-bw, its functionality
is now implemented by --with-bw-arch=aarch32-a.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
---
v4 changes:
 - changed help string for --with-bw-arch
---
 configure.ac | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index ce41daebc378..a1d2846a6865 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,9 +9,18 @@  AC_INIT([boot-wrapper], [v0.2])
 
 AM_INIT_AUTOMAKE([foreign])
 
-AC_ARG_ENABLE([aarch32-bw],
-	      AS_HELP_STRING([--enable-aarch32-bw], [build a 32-bit boot-wrapper]),
-	      [BOOTWRAPPER_ES=32], [BOOTWRAPPER_ES=64])
+# Allow a user to pass --with-bw-arch={aarch64-a,aarch32-a}
+AC_ARG_WITH([bw-arch],
+	AS_HELP_STRING([--with-bw-arch], [specify boot-wrapper architecture: aarch64-a (default) or aarch32-a]),
+	[case "${withval}" in
+		no|yes|aarch64-a) USE_ARCH=aarch64-a ;;
+		aarch32-a) USE_ARCH=aarch32-a ;;
+		*) AC_MSG_ERROR([Bad value "${withval}" for --with-bw-arch. Use "aarch64-a" or "aarch32-a"]) ;;
+	esac])
+
+AS_IF([test "x$USE_ARCH" = "xaarch32-a"],
+	[BOOTWRAPPER_ES=32], [BOOTWRAPPER_ES=64]
+)
 AM_CONDITIONAL([BOOTWRAPPER_32], [test "x$BOOTWRAPPER_ES" = "x32"])
 
 AC_ARG_ENABLE([aarch32-kernel],