diff options
| -rw-r--r-- | meta/classes/insane.bbclass | 5 | ||||
| -rw-r--r-- | meta/conf/bitbake.conf | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 723348fc8e..60b5599b86 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
| @@ -373,11 +373,10 @@ def package_qa_hash_style(path, name, d, elf, messages): | |||
| 373 | for line in phdrs.split("\n"): | 373 | for line in phdrs.split("\n"): |
| 374 | if "SYMTAB" in line: | 374 | if "SYMTAB" in line: |
| 375 | has_syms = True | 375 | has_syms = True |
| 376 | if "GNU_HASH" in line: | 376 | if "GNU_HASH" or "DT_MIPS_XHASH" in line: |
| 377 | sane = True | 377 | sane = True |
| 378 | if "[mips32]" in line or "[mips64]" in line: | 378 | if ("[mips32]" in line or "[mips64]" in line) and d.getVar('TCLIBC') == "musl": |
| 379 | sane = True | 379 | sane = True |
| 380 | |||
| 381 | if has_syms and not sane: | 380 | if has_syms and not sane: |
| 382 | package_qa_add_message(messages, "ldflags", "No GNU_HASH in the ELF binary %s, didn't pass LDFLAGS?" % path) | 381 | package_qa_add_message(messages, "ldflags", "No GNU_HASH in the ELF binary %s, didn't pass LDFLAGS?" % path) |
| 383 | 382 | ||
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 62b5466b71..8c44f27751 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
| @@ -586,8 +586,6 @@ export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \ | |||
| 586 | BUILDSDK_LDFLAGS = "-Wl,-O1" | 586 | BUILDSDK_LDFLAGS = "-Wl,-O1" |
| 587 | 587 | ||
| 588 | LINKER_HASH_STYLE ??= "gnu" | 588 | LINKER_HASH_STYLE ??= "gnu" |
| 589 | # mips does not support GNU hash style therefore we override | ||
| 590 | LINKER_HASH_STYLE_mipsarch = "sysv" | ||
| 591 | 589 | ||
| 592 | TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE') != 'gnu']}" | 590 | TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE') != 'gnu']}" |
| 593 | 591 | ||
| @@ -595,6 +593,8 @@ ASNEEDED ?= "-Wl,--as-needed" | |||
| 595 | 593 | ||
| 596 | export LDFLAGS = "${TARGET_LDFLAGS}" | 594 | export LDFLAGS = "${TARGET_LDFLAGS}" |
| 597 | TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}" | 595 | TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}" |
| 596 | # mips does not support GNU hash style therefore we override | ||
| 597 | LINKER_HASH_STYLE_mipsarch_libc-musl = "sysv" | ||
| 598 | 598 | ||
| 599 | # Pass parallel make options to the compile task | 599 | # Pass parallel make options to the compile task |
| 600 | EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} " | 600 | EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} " |
