Bug 10404 - MIPS: Use MACHINEOVERRIDES and reduce duplication in various recipes due to mips variants
Summary: MIPS: Use MACHINEOVERRIDES and reduce duplication in various recipes due to m...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 2.3
Assignee: Zubair Lutfullah Kakakhel
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-10-10 12:07 UTC by Zubair Lutfullah Kakakhel
Modified: 2016-11-16 17:25 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zubair Lutfullah Kakakhel 2016-10-10 12:07:27 UTC
There are many MIPS ISA + ABI combinations. 
And there are recipes which have to duplicate information for each variant.
Its possible to use MACHINEOVERRIDES to reduce duplication.

Some discussion on this 
http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127388.html
http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127393.html

Extract from email by Richard Purdie
---

Very roughly speaking, you'd add something like:

MACHINEOVERRIDES =. "mipsarch:"

to arch-mips.inc then you could do:

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 54a587f..7bd8716 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -528,16 +528,7 @@ BUILDSDK_LDFLAGS = "-Wl,-O1"
 
 LINKER_HASH_STYLE ??= "gnu"
 # mips does not support GNU hash style therefore we override
-LINKER_HASH_STYLE_mips = "sysv"
-LINKER_HASH_STYLE_mipsel = "sysv"
-LINKER_HASH_STYLE_mips64 = "sysv"
-LINKER_HASH_STYLE_mips64el = "sysv"
-LINKER_HASH_STYLE_mips64n32 = "sysv"
-LINKER_HASH_STYLE_mips64eln32 = "sysv"
-LINKER_HASH_STYLE_mipsisa32r6 = "sysv"
-LINKER_HASH_STYLE_mipsisa32r6el = "sysv"
-LINKER_HASH_STYLE_mipsisa64r6 = "sysv"
-LINKER_HASH_STYLE_mipsisa64r6el = "sysv"
+LINKER_HASH_STYLE_mipsarch = "sysv"
 
 TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE', True) != 'gnu']}"

---
Comment 1 Zubair Lutfullah Kakakhel 2016-11-08 09:10:59 UTC
Most of the work has been done and the a patch series has already been sent out.

https://patchwork.openembedded.org/patch/133655/

Some minor tweaks needed for the next revision.
Comment 2 Zubair Lutfullah Kakakhel 2016-11-16 17:24:28 UTC
Patches have been applied.

http://git.openembedded.org/openembedded-core/commit/?id=0d2205f26e5ece089630f72af2bd5f0931e851c3

Thanks
ZubairLK
Comment 3 Zubair Lutfullah Kakakhel 2016-11-16 17:25:25 UTC
I think I misunderstood the status: Accepted.

Marking as resolved