diff --git a/arm-use-alignment-workaround.patch b/arm-use-alignment-workaround.patch new file mode 100644 index 0000000..9224807 --- /dev/null +++ b/arm-use-alignment-workaround.patch @@ -0,0 +1,24 @@ +From: Jean Delvare +Subject: Use -DALIGNMENT_WORKAROUND on arm as well + +The arm build log shows a lot warnings about casts increasing the +required alignment of target type. This suggests that this +architecture needs to use the slower byte access which is enabled by +-DALIGNMENT_WORKAROUND. + +Signed-off-by: Jean Delvare +--- + config.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- dmidecode.orig/config.h ++++ dmidecode/config.h +@@ -22,7 +22,7 @@ + #endif + + /* Use memory alignment workaround or not */ +-#ifdef __ia64__ ++#if defined(__ia64__) || defined(__arm__) + #define ALIGNMENT_WORKAROUND + #endif + diff --git a/dmidecode.changes b/dmidecode.changes index 638bc85..b7ea2a3 100644 --- a/dmidecode.changes +++ b/dmidecode.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 20 10:27:24 UTC 2023 - Jean Delvare + +- arm-use-alignment-workaround.patch: Fix the massive build + warnings on armv7l. + ------------------------------------------------------------------- Thu Mar 16 12:26:11 UTC 2023 - Jean Delvare diff --git a/dmidecode.spec b/dmidecode.spec index cf989e3..f6b4337 100644 --- a/dmidecode.spec +++ b/dmidecode.spec @@ -27,6 +27,7 @@ Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{vers Source1: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz.sig # https://savannah.nongnu.org/project/memberlist-gpgkeys.php?group=dmidecode Source2: %{name}.keyring +Patch1: arm-use-alignment-workaround.patch Provides: pmtools:%{_sbindir}/dmidecode Obsoletes: pmtools < 20071117 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -49,6 +50,7 @@ the BIOS told it to. %prep %setup -q +%patch1 -p1 %build CFLAGS="%{optflags}" make %{?_smp_mflags}