fluentbit: Use CMAKE_C_STANDARD_LIBRARIES cmake var to pass libatomic

Since libatomic needs to be linked last in the list of libs, take
advantange of using CMAKE_C_STANDARD_LIBRARIES insread of FLB_DEPS
since DFLB_DEPS is not appended last to linker flags in CMakefiles
it ends up with undefined references for libatomic symbols in libs
appearing after FLB_LIBS in sequence

Use it for mips too

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2022-08-18 21:53:44 -07:00
parent 9ed1e62bbb
commit 6c998191cd

View File

@ -75,8 +75,9 @@ EXTRA_OECMAKE += "-DFLB_RELEASE=On"
# musl needs these options
EXTRA_OECMAKE:append:libc-musl = ' -DFLB_JEMALLOC_OPTIONS="--with-jemalloc-prefix=je_ --with-lg-quantum=3" -DFLB_CORO_STACK_SIZE=24576'
EXTRA_OECMAKE:append:riscv64 = " -DFLB_DEPS='atomic'"
EXTRA_OECMAKE:append:riscv32 = " -DFLB_DEPS='atomic'"
EXTRA_OECMAKE:append:riscv64 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic"
EXTRA_OECMAKE:append:riscv32 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic"
EXTRA_OECMAKE:append:mips = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic"
inherit cmake systemd pkgconfig