diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-10-28 22:05:54 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-30 13:22:49 +0000 |
commit | fb55c447ad6f8ed6b4a926b0f856746429e3b58d (patch) | |
tree | e5c5bbd4081dce79a4faba6db370a2aff06240e5 /meta | |
parent | 711a89cc8e9897c522484036152e3b110ab4a00d (diff) | |
download | poky-fb55c447ad6f8ed6b4a926b0f856746429e3b58d.tar.gz |
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>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch b/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch index ac6dcaf101..331ea849e6 100644 --- a/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch +++ b/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch | |||
@@ -1,20 +1,21 @@ | |||
1 | From e3eff024826550aec4a6a5baef7210a29faf299d Mon Sep 17 00:00:00 2001 | 1 | From 5492ac3c716020a27a25253bbffe810db43202bf Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Thu, 9 Mar 2017 18:54:02 +0200 | 3 | Date: Thu, 9 Mar 2017 18:54:02 +0200 |
4 | Subject: [PATCH] Add a color setting for mips64_n32 binaries | 4 | Subject: [PATCH] Add a color setting for mips64_n32 binaries |
5 | 5 | ||
6 | Upstream-Status: Inappropriate [oe-core specific] | 6 | Upstream-Status: Inappropriate [oe-core specific] |
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | 7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
8 | |||
8 | --- | 9 | --- |
9 | build/rpmfc.c | 1 + | 10 | build/rpmfc.c | 4 ++++ |
10 | rpmrc.in | 2 ++ | 11 | rpmrc.in | 2 ++ |
11 | 2 files changed, 3 insertions(+) | 12 | 2 files changed, 6 insertions(+) |
12 | 13 | ||
13 | diff --git a/build/rpmfc.c b/build/rpmfc.c | 14 | diff --git a/build/rpmfc.c b/build/rpmfc.c |
14 | index d38a10916..c8e2f876a 100644 | 15 | index 10c380ee9..b7655aa93 100644 |
15 | --- a/build/rpmfc.c | 16 | --- a/build/rpmfc.c |
16 | +++ b/build/rpmfc.c | 17 | +++ b/build/rpmfc.c |
17 | @@ -622,6 +622,7 @@ exit: | 18 | @@ -639,6 +639,7 @@ exit: |
18 | static const struct rpmfcTokens_s rpmfcTokens[] = { | 19 | static const struct rpmfcTokens_s rpmfcTokens[] = { |
19 | { "directory", RPMFC_INCLUDE }, | 20 | { "directory", RPMFC_INCLUDE }, |
20 | 21 | ||
@@ -22,11 +23,21 @@ index d38a10916..c8e2f876a 100644 | |||
22 | { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE }, | 23 | { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE }, |
23 | { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE }, | 24 | { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE }, |
24 | 25 | ||
26 | @@ -1149,6 +1150,9 @@ static uint32_t getElfColor(const char *fn) | ||
27 | color = RPMFC_ELF32; | ||
28 | break; | ||
29 | } | ||
30 | + if (ehdr.e_machine == EM_MIPS || ehdr.e_machine == EM_MIPS_RS3_LE) | ||
31 | + if (ehdr.e_flags & EF_MIPS_ABI2) | ||
32 | + color = RPMFC_ELFMIPSN32; | ||
33 | elf_end(elf); | ||
34 | } | ||
35 | close(fd); | ||
25 | diff --git a/rpmrc.in b/rpmrc.in | 36 | diff --git a/rpmrc.in b/rpmrc.in |
26 | index abc08fc31..f5bc820d8 100644 | 37 | index 5bd9ba3e5..f15bb8dad 100644 |
27 | --- a/rpmrc.in | 38 | --- a/rpmrc.in |
28 | +++ b/rpmrc.in | 39 | +++ b/rpmrc.in |
29 | @@ -133,6 +133,8 @@ archcolor: mipsr6el 1 | 40 | @@ -137,6 +137,8 @@ archcolor: mipsr6el 1 |
30 | archcolor: mips64r6 2 | 41 | archcolor: mips64r6 2 |
31 | archcolor: mips64r6el 2 | 42 | archcolor: mips64r6el 2 |
32 | 43 | ||
@@ -35,6 +46,3 @@ index abc08fc31..f5bc820d8 100644 | |||
35 | archcolor: m68k 1 | 46 | archcolor: m68k 1 |
36 | 47 | ||
37 | archcolor: m68kmint 1 | 48 | archcolor: m68kmint 1 |
38 | -- | ||
39 | 2.11.0 | ||
40 | |||