public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Peter Robinson <pbrobinson@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Revert armv8 detection improvements
Date: Mon, 23 Nov 2026 09:33:05 GMT	[thread overview]
Message-ID: <179542638550.1.6210007557696086704.rpms-rpm-2be34826de33@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 2be34826de3380d08ec28672372f8ef6b85eb188
Author : Peter Robinson <pbrobinson@gmail.com>
Date   : 2019-10-23T22:38:51+01:00
Stats  : +99/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/2be34826de3380d08ec28672372f8ef6b85eb188?branch=pmatilai-v6

Log:
Revert armv8 detection improvements

---
diff --git a/0001-Revert-Improve-ARM-detection.patch b/0001-Revert-Improve-ARM-detection.patch
new file mode 100644
index 0000000..a50bbe5
--- /dev/null
+++ b/0001-Revert-Improve-ARM-detection.patch
@@ -0,0 +1,95 @@
+From 2426c2a066e44f4d9a342585e76cdbdb0a8a2db1 Mon Sep 17 00:00:00 2001
+From: Peter Robinson <pbrobinson@gmail.com>
+Date: Wed, 23 Oct 2019 20:22:19 +0100
+Subject: [PATCH] Revert "Improve ARM detection"
+
+This reverts commit 8c3a7b8fa92b49a811fe36b60857b12f5d7db8a8.
+
+This is the final piece in fixing rhbz 1691430. It's a clean revert
+so let's do that for F-31 and we can discuss the details later.
+
+Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
+---
+ lib/rpmrc.c | 37 +++++++++----------------------------
+ 1 file changed, 9 insertions(+), 28 deletions(-)
+
+diff --git a/lib/rpmrc.c b/lib/rpmrc.c
+index 0806e1b07..cada3f788 100644
+--- a/lib/rpmrc.c
++++ b/lib/rpmrc.c
+@@ -82,7 +82,6 @@ struct rpmOption {
+ static struct rpmat_s {
+     const char *platform;
+     uint64_t hwcap;
+-    uint64_t hwcap2;
+ } rpmat;
+ 
+ typedef struct defaultEntry_s {
+@@ -951,9 +950,6 @@ static int is_geode(void)
+ 
+ 
+ #if defined(__linux__)
+-#ifndef AT_HWCAP2 /* glibc < 2.18 */
+-#define AT_HWCAP2 26
+-#endif
+ /**
+  * Populate rpmat structure with auxv values
+  */
+@@ -967,7 +963,6 @@ static void read_auxv(void)
+ 	if (!rpmat.platform)
+ 	    rpmat.platform = "";
+ 	rpmat.hwcap = getauxval(AT_HWCAP);
+-	rpmat.hwcap2 = getauxval(AT_HWCAP2);
+ #else
+ 	rpmat.platform = "";
+ 	int fd = open("/proc/self/auxv", O_RDONLY);
+@@ -989,9 +984,6 @@ static void read_auxv(void)
+                     case AT_HWCAP:
+                         rpmat.hwcap = auxv.a_un.a_val;
+                         break;
+-		    case AT_HWCAP2:
+-			rpmat.hwcap2 = auxv.a_un.a_val;
+-			break;
+                 }
+ 	    }
+ 	    close(fd);
+@@ -1225,27 +1217,16 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
+ #	if !defined(HWCAP_ARM_VFPv3)
+ #	    define HWCAP_ARM_VFPv3	(1 << 13)
+ #	endif
+-#	if !defined(HWCAP2_AES)
+-#	    define HWCAP2_AES		(1 << 0)
+-#	endif
+-	/*
+-	 * un.machine is armvXE, where X is version number and E is
+-	 * endianness (b or l)
+-	 */
+-	if (rstreqn(un.machine, "armv", 4)) {
+-		char endian = un.machine[strlen(un.machine)-1];
+-		char *modifier = un.machine + 5;
+-		/* keep armv7, armv8, armv9, armv10, ... */
+-		while(risdigit(*modifier)) 
+-			modifier++;
+-		if (rpmat.hwcap & HWCAP_ARM_VFPv3)
+-			*modifier++ = 'h';
+-		if (rpmat.hwcap2 & HWCAP2_AES)
+-			*modifier++ = 'c';
++	if (rstreq(un.machine, "armv7l")) {
++	    if (rpmat.hwcap & HWCAP_ARM_VFPv3) {
+ 		if (rpmat.hwcap & HWCAP_ARM_NEON)
+-			*modifier++ = 'n';
+-		*modifier++ = endian;
+-		*modifier++ = 0;
++		    strcpy(un.machine, "armv7hnl");
++		else
++		    strcpy(un.machine, "armv7hl");
++	    }
++	} else if (rstreq(un.machine, "armv6l")) {
++	    if (rpmat.hwcap & HWCAP_ARM_VFP)
++		strcpy(un.machine, "armv6hl");
+ 	}
+ #	endif	/* arm*-linux */
+ 
+-- 
+2.23.0
+

diff --git a/rpm.spec b/rpm.spec
index fb81629..171c691 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -21,7 +21,7 @@
 
 %global rpmver 4.15.0
 #global snapver rc1
-%global rel 5
+%global rel 6
 
 %global srcver %{version}%{?snapver:-%{snapver}}
 %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x}
@@ -521,6 +521,9 @@ make check || (cat tests/rpmtests.log; exit 0)
 %doc doc/librpm/html/*
 
 %changelog
+* Wed Oct 23 2019 Peter Robinson <pbrobinson@fedoraproject.org> 4.15.0-6
+- Revert armv8 detection improvements
+
 * Mon Oct 21 2019 Stephen Gallagher <sgallagh@redhat.com> - 4.15.0-5
 - Revert aliasing arm64 to aarch64
 - Resolves: rhbz#1763831

                 reply	other threads:[~2026-11-23  9:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542638550.1.6210007557696086704.rpms-rpm-2be34826de33@fedoraproject.org \
    --to=pbrobinson@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox