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
This commit is contained in:
Jean Delvare 2023-03-22 08:37:12 +00:00 committed by Git OBS Bridge
parent 218b52ef2b
commit a1536ae321
3 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,24 @@
From: Jean Delvare <jdelvare@suse.de>
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 <jdelvare@suse.de>
---
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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 20 10:27:24 UTC 2023 - Jean Delvare <jdelvare@suse.com>
- arm-use-alignment-workaround.patch: Fix the massive build
warnings on armv7l.
-------------------------------------------------------------------
Thu Mar 16 12:26:11 UTC 2023 - Jean Delvare <jdelvare@suse.de>

View File

@ -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}