[oe] [meta-oe][PATCH] leveldb: fix compile error with default tune 'mips'

Khem Raj raj.khem at gmail.com
Wed Mar 6 01:46:26 UTC 2019



On 3/5/19 5:37 PM, kai.kang at windriver.com wrote:
> From: Kai Kang <kai.kang at windriver.com>
> 
> When build leveldb with default tune 'mips', it fails to compile with
> errors:
> 
> | {standard input}: Assembler messages:
> | {standard input}:8004: Error: opcode not supported on this processor:
>    mips1 (mips1) `sync'
> | {standard input}:10296: Error: opcode not supported on this processor:
>    mips1 (mips1) `sync'
> | make: *** [out-shared/db/db_bench.o] Error 1
> 
> Add 'mips32' to TUNE_FEATURES which eventually add '-march=mips32' to
> CXX to fix the errors.
> 
> Signed-off-by: Kai Kang <kai.kang at windriver.com>
> ---
>   meta-oe/recipes-dbs/leveldb/leveldb_git.bb | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/meta-oe/recipes-dbs/leveldb/leveldb_git.bb b/meta-oe/recipes-dbs/leveldb/leveldb_git.bb
> index 8fec89c6f..f0e434077 100644
> --- a/meta-oe/recipes-dbs/leveldb/leveldb_git.bb
> +++ b/meta-oe/recipes-dbs/leveldb/leveldb_git.bb
> @@ -17,6 +17,14 @@ S = "${WORKDIR}/git"
>   
>   inherit utils
>   
> +# leveldb fails to compile with default tune 'mips':
> +# | {standard input}:59226: Error: opcode not supported on this processor: mips1 (mips1) `sync'
> +# | make: *** [out-shared/db/db_impl.o] Error 1
> +python () {
> +    if 'o32' in d.getVar('TUNE_FEATURES') and d.getVar('DEFAULTTUNE') == 'mips':
> +        d.appendVar('TUNE_FEATURES', ' mips32')
> +}
> +

This does not seem to be correct, this patch is forcing a different arch 
for leveldb, which maybe wrong assumption.

>   do_compile() {
>       # do not use oe_runmake. oe_runmake pass to make compilation arguments and override
>       # leveldb makefile variable CFLAGS and broke leveldb build.
> 


More information about the Openembedded-devel mailing list