blob: 41fb456c6c232e7eaae3cba1cbea31e1eddf4104 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001From 73049e5a9e3698cc6d51471d70ac5e06bed803cc Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 17 Dec 2022 10:24:48 -0800
4Subject: [PATCH] configure: Add --with-cpu
5
6Some cross build systems e.g. yocto may use architectures different from cross compiler target tuple
7arm-yoe-gnueabi but build for armv7a, AC_CANONICAL_HOST will fail in
8this case even though target will be armv7a it will detect it as arm and
9disable armv7a specific optimization paths. This option provides the
10needed knob so it can be set explicitly e.g. --with-cpu=armv7a etc. if needed.
11
12Upstream-Status: Submitted [https://github.com/stressapptest/stressapptest/pull/100]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 configure.ac | 9 ++++++++-
16 1 file changed, 8 insertions(+), 1 deletion(-)
17
18diff --git a/configure.ac b/configure.ac
19index c839c87..403728c 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -11,7 +11,14 @@ else
23 AC_MSG_NOTICE([Compiling with dynamically linked libraries.])
24 fi
25
26-AC_CANONICAL_HOST
27+AC_ARG_WITH(cpu, [ --with-cpu define host cpu])
28+
29+if test -z "$with_cpu"
30+then
31+ AC_CANONICAL_HOST
32+else
33+ host_cpu=$with_cpu
34+fi
35 # Checking for target cpu and setting custom configuration
36 # for the different platforms
37 AS_CASE(["$host_cpu"],