From a1536ae321505a9f4c12f80dfd56a4f296fad97d7e0c190f42ba51a761bf7394 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 22 Mar 2023 08:37:12 +0000 Subject: [PATCH] Accepting request 1073703 from home:jdelvare:branches:Base:System Fix the massive build warnings on armv7l OBS-URL: https://build.opensuse.org/request/show/1073703 OBS-URL: https://build.opensuse.org/package/show/Base:System/dmidecode?expand=0&rev=67 --- arm-use-alignment-workaround.patch | 24 ++++++++++++++++++++++++ dmidecode.changes | 6 ++++++ dmidecode.spec | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 arm-use-alignment-workaround.patch 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}