Khem Raj 5f6c8eb030 apitrace: Fix link failure with BMI2 capable tunes
thirdparty/zstd.cmake compiles the bundled zstd's huf_decompress.c but
not the assembly file it pairs with,
zstd/lib/decompress/huf_decompress_amd64.S. zstd selects the assembly
fast loops in portability_macros.h whenever

  !defined(ZSTD_DISABLE_ASM) && ZSTD_ASM_SUPPORTED &&
  defined(__x86_64__) && (DYNAMIC_BMI2 || defined(__BMI2__))

so the DYNAMIC_BMI2=0 that apitrace already sets is not enough: any
x86-64 tune whose -march implies BMI2, such as x86-64-v3, still takes
that path and fails to link:

| ld.lld: error: undefined hidden symbol: HUF_decompress4X2_usingDTable_internal_fast_asm_loop
| >>> referenced by huf_decompress.c:1739
| >>>               thirdparty/apitrace.lto.libzstd_bundled.a(huf_decompress.c.o)
| ld.lld: error: undefined hidden symbol: HUF_decompress4X1_usingDTable_internal_fast_asm_loop
| >>> referenced by huf_decompress.c:917

Plain -march=x86-64 does not define __BMI2__, which is why only the more
specific tunes are affected.

Define ZSTD_DISABLE_ASM so the C fast loops are used consistently, which
is already what every non-BMI2 build gets.

Not fixed upstream: master carries the same zstd.cmake, no commit since
tag 14.0 touches it, and none of the 19 open pull requests or any issue
covers this.

Verified on x86-64 for qemux86-64 (x86-64-v3 tune): do_compile fails
before the change while linking gltrim and apitrace, and do_compile,
do_install and do_package succeed after.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-08-05 23:37:21 -07:00
2026-06-23 00:45:59 -07:00
2026-08-05 10:16:17 -07:00
2025-04-10 08:31:06 -07:00
2019-06-15 16:45:33 -07:00
2026-03-02 19:25:48 -08:00

Collection of layers for the OE-core universe

Main layer maintainer: Khem Raj raj.khem@gmail.com

This repository is a collection of layers to supplement OE-Core with additional packages, Each layer have designated maintainer Please see the respective READMEs in the layer subdirectories

S
Description
No description provided
Readme 118 MiB
Languages
BitBake 86.3%
Shell 5.9%
C 2.7%
Roff 1.9%
NASL 1.7%
Other 1.3%