diff options
| author | Mark Hatle <mark.hatle@windriver.com> | 2011-07-01 11:36:41 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-27 15:45:47 +0100 |
| commit | a447c3e8599095a704f2f41f80e8ce0c2c4f3f5b (patch) | |
| tree | 6a117447c6c52c0f699709a21f6fd19822410c25 /meta/classes | |
| parent | ba8a726b7dbbca8e9ea9cc75964d366d094aa881 (diff) | |
| download | poky-a447c3e8599095a704f2f41f80e8ce0c2c4f3f5b.tar.gz | |
multilib_header.bbclass: Add oe_multilib_header wrapper
This helper function and associated header will allow us to
resolve two/three header files that conflict due to contents
that change based on wordsize and ABI.
(From OE-Core rev: 1fe66d01b7bce70a37245d47b1abce155fae926e)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
| -rw-r--r-- | meta/classes/multilib_header.bbclass | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/classes/multilib_header.bbclass b/meta/classes/multilib_header.bbclass new file mode 100644 index 0000000000..867bce4134 --- /dev/null +++ b/meta/classes/multilib_header.bbclass | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | inherit siteinfo | ||
| 2 | |||
| 3 | # If applicable on the architecture, this routine will rename the header and add | ||
| 4 | # a unique identifier to the name for the ABI/bitsize that is being used. A wrapper will | ||
| 5 | # be generated for the architecture that knows how to call all of the ABI variants for that | ||
| 6 | # given architecture. | ||
| 7 | # | ||
| 8 | # TODO: mips64 n32 is not yet recognized in this code | ||
| 9 | # when that is identified the name of the wrapped item should be "n32" and appropriately | ||
| 10 | # determined int he if coding... | ||
| 11 | # | ||
| 12 | oe_multilib_header() { | ||
| 13 | # Do nothing on ARM, only one ABI is supported at once | ||
| 14 | if echo ${TARGET_ARCH} | grep -q arm; then | ||
| 15 | return | ||
| 16 | fi | ||
| 17 | for each_header in "$@" ; do | ||
| 18 | if [ ! -f "${D}/${includedir}/$each_header" ]; then | ||
| 19 | bberror "oe_multilib_header: Unable to find header $each_header." | ||
| 20 | continue | ||
| 21 | fi | ||
| 22 | stem=$(echo $each_header | sed 's#\.h$##') | ||
| 23 | ident=${SITEINFO_BITS} | ||
| 24 | # if mips64/n32 set ident to n32 | ||
| 25 | mv ${D}/${includedir}/$each_header ${D}/${includedir}/${stem}-${ident}.h | ||
| 26 | |||
| 27 | sed -e "s#ENTER_HEADER_FILENAME_HERE#${stem}#g" ${COREBASE}/scripts/multilib_header_wrapper.h > ${D}/${includedir}/$each_header | ||
| 28 | done | ||
| 29 | } | ||
