* [PATCH 0/1] package_manager.py: fix RPM_PREFER_ELF_ARCH for mips
@ 2015-11-23 13:41 Robert Yang
2015-11-23 13:41 ` [PATCH 1/1] " Robert Yang
0 siblings, 1 reply; 4+ messages in thread
From: Robert Yang @ 2015-11-23 13:41 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 6f98c39418c60b7c0b25b30983d2e5257158a6a4:
gcc: Drop 4.8 (2015-11-16 14:59:07 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/elf
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/elf
Robert Yang (1):
package_manager.py: fix RPM_PREFER_ELF_ARCH for mips
meta/lib/oe/package_manager.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] package_manager.py: fix RPM_PREFER_ELF_ARCH for mips
2015-11-23 13:41 [PATCH 0/1] package_manager.py: fix RPM_PREFER_ELF_ARCH for mips Robert Yang
@ 2015-11-23 13:41 ` Robert Yang
2015-11-23 14:20 ` Mark Hatle
0 siblings, 1 reply; 4+ messages in thread
From: Robert Yang @ 2015-11-23 13:41 UTC (permalink / raw)
To: openembedded-core
We can install 64 bit pkg to 32 bit pkg, so the previous checking is
incorrect, it should not only check mips64 or mips64el, the "mips"
should work, and 64bit ELF can also use mips as TUNE_ARCH, and there
are other mips varieties, so only check whether TUNE_ARCH starts with
mips or not.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/lib/oe/package_manager.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 964fddc..5e7bb66 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -954,12 +954,11 @@ class RpmPM(PackageManager):
bb.fatal("Invalid RPM_PREFER_ELF_ARCH: %s, it should be one of:\n"
"\t1: ELF32 wins\n"
"\t2: ELF64 wins\n"
- "\t4: ELF64 N32 wins (mips64 or mips64el only)" %
+ "\t4: ELF64 N32 wins (mips only)" %
prefer_color)
- if prefer_color == "4" and self.d.getVar("TUNE_ARCH", True) not in \
- ['mips64', 'mips64el']:
- bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips64 or mips64el "
- "only.")
+ if prefer_color == "4" and not \
+ self.d.getVar("TUNE_ARCH", True).startswith('mips'):
+ bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips only.")
self._invoke_smart('config --set rpm-extra-macros._prefer_color=%s'
% prefer_color)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] package_manager.py: fix RPM_PREFER_ELF_ARCH for mips
2015-11-23 13:41 ` [PATCH 1/1] " Robert Yang
@ 2015-11-23 14:20 ` Mark Hatle
2015-11-23 16:00 ` Mark Hatle
0 siblings, 1 reply; 4+ messages in thread
From: Mark Hatle @ 2015-11-23 14:20 UTC (permalink / raw)
To: Robert Yang, openembedded-core
On 11/23/15 7:41 AM, Robert Yang wrote:
> We can install 64 bit pkg to 32 bit pkg, so the previous checking is
> incorrect, it should not only check mips64 or mips64el, the "mips"
> should work, and 64bit ELF can also use mips as TUNE_ARCH, and there
> are other mips varieties, so only check whether TUNE_ARCH starts with
> mips or not.
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
> meta/lib/oe/package_manager.py | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
> index 964fddc..5e7bb66 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -954,12 +954,11 @@ class RpmPM(PackageManager):
> bb.fatal("Invalid RPM_PREFER_ELF_ARCH: %s, it should be one of:\n"
> "\t1: ELF32 wins\n"
> "\t2: ELF64 wins\n"
> - "\t4: ELF64 N32 wins (mips64 or mips64el only)" %
> + "\t4: ELF64 N32 wins (mips only)" %
N32 is only available on a MIPS64 platform. It requires MIPS64 instructions,
which is why it is documented as such above.
> prefer_color)
> - if prefer_color == "4" and self.d.getVar("TUNE_ARCH", True) not in \
> - ['mips64', 'mips64el']:
> - bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips64 or mips64el "
> - "only.")
> + if prefer_color == "4" and not \
> + self.d.getVar("TUNE_ARCH", True).startswith('mips'):
> + bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips only.")
The bug is that it's looking for TUNE_ARCH, it should be MACHINE_ARCH in this
case. Since the overall MACHINE Is what defined if it can be used or not.
--Mark
> self._invoke_smart('config --set rpm-extra-macros._prefer_color=%s'
> % prefer_color)
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] package_manager.py: fix RPM_PREFER_ELF_ARCH for mips
2015-11-23 14:20 ` Mark Hatle
@ 2015-11-23 16:00 ` Mark Hatle
0 siblings, 0 replies; 4+ messages in thread
From: Mark Hatle @ 2015-11-23 16:00 UTC (permalink / raw)
To: Robert Yang, openembedded-core
On 11/23/15 8:20 AM, Mark Hatle wrote:
> On 11/23/15 7:41 AM, Robert Yang wrote:
>> We can install 64 bit pkg to 32 bit pkg, so the previous checking is
>> incorrect, it should not only check mips64 or mips64el, the "mips"
>> should work, and 64bit ELF can also use mips as TUNE_ARCH, and there
>> are other mips varieties, so only check whether TUNE_ARCH starts with
>> mips or not.
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>> meta/lib/oe/package_manager.py | 9 ++++-----
>> 1 file changed, 4 insertions(+), 5 deletions(-)
>>
>> diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
>> index 964fddc..5e7bb66 100644
>> --- a/meta/lib/oe/package_manager.py
>> +++ b/meta/lib/oe/package_manager.py
>> @@ -954,12 +954,11 @@ class RpmPM(PackageManager):
>> bb.fatal("Invalid RPM_PREFER_ELF_ARCH: %s, it should be one of:\n"
>> "\t1: ELF32 wins\n"
>> "\t2: ELF64 wins\n"
>> - "\t4: ELF64 N32 wins (mips64 or mips64el only)" %
>> + "\t4: ELF64 N32 wins (mips only)" %
>
> N32 is only available on a MIPS64 platform. It requires MIPS64 instructions,
> which is why it is documented as such above.
>
>> prefer_color)
>> - if prefer_color == "4" and self.d.getVar("TUNE_ARCH", True) not in \
>> - ['mips64', 'mips64el']:
>> - bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips64 or mips64el "
>> - "only.")
>> + if prefer_color == "4" and not \
>> + self.d.getVar("TUNE_ARCH", True).startswith('mips'):
>> + bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips only.")
>
> The bug is that it's looking for TUNE_ARCH, it should be MACHINE_ARCH in this
> case. Since the overall MACHINE Is what defined if it can be used or not.
I just realized, it's not MACHINE_ARCH either. It's the canonical arch that is
derived from the MACHINE_ARCH -- which may not be available at this point.
So doing the sanity based on the TUNE_ARCH starting with mips might be the best
compromise. But the comment should remain that it's only applicable on MIPS64.
--Mark
> --Mark
>
>> self._invoke_smart('config --set rpm-extra-macros._prefer_color=%s'
>> % prefer_color)
>>
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-23 16:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-23 13:41 [PATCH 0/1] package_manager.py: fix RPM_PREFER_ELF_ARCH for mips Robert Yang
2015-11-23 13:41 ` [PATCH 1/1] " Robert Yang
2015-11-23 14:20 ` Mark Hatle
2015-11-23 16:00 ` Mark Hatle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox