mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
rpm: adjust MIPS64 N32 support
upstream has switched from libmagic to elfutils to determine file 'colors', and so this adapts the existing patch accordingly. (From OE-Core rev: 0d420c8f6a6718b54ef9a1278bfa8fec6709d3bd) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
711a89cc8e
commit
fb55c447ad
+18
-10
@@ -1,20 +1,21 @@
|
||||
From e3eff024826550aec4a6a5baef7210a29faf299d Mon Sep 17 00:00:00 2001
|
||||
From 5492ac3c716020a27a25253bbffe810db43202bf Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Thu, 9 Mar 2017 18:54:02 +0200
|
||||
Subject: [PATCH] Add a color setting for mips64_n32 binaries
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
|
||||
---
|
||||
build/rpmfc.c | 1 +
|
||||
build/rpmfc.c | 4 ++++
|
||||
rpmrc.in | 2 ++
|
||||
2 files changed, 3 insertions(+)
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/build/rpmfc.c b/build/rpmfc.c
|
||||
index d38a10916..c8e2f876a 100644
|
||||
index 10c380ee9..b7655aa93 100644
|
||||
--- a/build/rpmfc.c
|
||||
+++ b/build/rpmfc.c
|
||||
@@ -622,6 +622,7 @@ exit:
|
||||
@@ -639,6 +639,7 @@ exit:
|
||||
static const struct rpmfcTokens_s rpmfcTokens[] = {
|
||||
{ "directory", RPMFC_INCLUDE },
|
||||
|
||||
@@ -22,11 +23,21 @@ index d38a10916..c8e2f876a 100644
|
||||
{ "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE },
|
||||
{ "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE },
|
||||
|
||||
@@ -1149,6 +1150,9 @@ static uint32_t getElfColor(const char *fn)
|
||||
color = RPMFC_ELF32;
|
||||
break;
|
||||
}
|
||||
+ if (ehdr.e_machine == EM_MIPS || ehdr.e_machine == EM_MIPS_RS3_LE)
|
||||
+ if (ehdr.e_flags & EF_MIPS_ABI2)
|
||||
+ color = RPMFC_ELFMIPSN32;
|
||||
elf_end(elf);
|
||||
}
|
||||
close(fd);
|
||||
diff --git a/rpmrc.in b/rpmrc.in
|
||||
index abc08fc31..f5bc820d8 100644
|
||||
index 5bd9ba3e5..f15bb8dad 100644
|
||||
--- a/rpmrc.in
|
||||
+++ b/rpmrc.in
|
||||
@@ -133,6 +133,8 @@ archcolor: mipsr6el 1
|
||||
@@ -137,6 +137,8 @@ archcolor: mipsr6el 1
|
||||
archcolor: mips64r6 2
|
||||
archcolor: mips64r6el 2
|
||||
|
||||
@@ -35,6 +46,3 @@ index abc08fc31..f5bc820d8 100644
|
||||
archcolor: m68k 1
|
||||
|
||||
archcolor: m68kmint 1
|
||||
--
|
||||
2.11.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user