[OE-core] [PATCH] rmc: Fix compiling issue with musl
Khem Raj
raj.khem at gmail.com
Mon Nov 14 22:50:05 UTC 2016
On 11/14/16 2:10 PM, Jianxun Zhang wrote:
> | src/rmcl/rmcl.c: In function 'query_policy_from_db':
> | src/rmcl/rmcl.c:254:25: error: unknown type name 'ssize_t'
> | ssize_t cmd_name_len = strlen((char *)&rmc_db[policy_idx]) + 1;
> | ^~~~~~~~
>
> The musl C lib provides ssize_t but we need to enable it
> with a macro.
>
> Signed-off-by: Jianxun Zhang <jianxun.zhang at linux.intel.com>
> ---
> Before maintainer(s) push "merge" button, please read this short summary.
> I feel there could be a better syntax to do it. And We could need to get
> an ack from Hernandez, Alejandro who reported this issue and seems still
> have (other) compiling errors even with this patch.
>
> I submit this patch based on my thoughts and test out of tiny config.
>
> Tests:
> () Specify TCLIBC = "musl" in local.conf in my build dir.
> () Build quark
> () I can see this issue happens without the fix
> () With this patch and do clean builds for quark and corei7-64,
> Compiling passes. Boot test passed on RMC targets quark and Broxton-m.
>
> Thanks
>
>
> common/recipes-bsp/rmc/rmc.bb | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/common/recipes-bsp/rmc/rmc.bb b/common/recipes-bsp/rmc/rmc.bb
> index aeaf12e..61a1bdb 100644
> --- a/common/recipes-bsp/rmc/rmc.bb
> +++ b/common/recipes-bsp/rmc/rmc.bb
> @@ -24,6 +24,8 @@ COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux*"
>
> EXTRA_OEMAKE='RMC_CFLAGS="-Wl,--hash-style=both"'
>
> +EXTRA_OEMAKE_append_libc-musl = '" -D__NEED_ssize_t"'
this is not right way to handle it. you should be doing something like
#include <sys/types.h> in your source file
> +
> # from gnu-efi, we should align arch-mapping with it.
> def rmc_efi_arch(d):
> import re
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20161114/ddc9d4d6/attachment-0002.sig>
More information about the Openembedded-core
mailing list