• Oliver Upton's avatar
    Add -latomic to linker flags for venc sample · ea730488
    Oliver Upton authored
    Building on debian testing fails with the following:
    
     | make[1]: Entering directory '/oupton/milkv/duo/duo-buildroot-sdk/middleware/v2/sample/venc'
     | [riscv64-unknown-linux-musl-gcc] sample_venc.o
     | [riscv64-unknown-linux-musl-gcc] sample_venc_lib.o
     | [riscv64-unknown-linux-musl-gcc] sample_venc_testcase.o
     | [riscv64-unknown-linux-musl-gcc] sample_vdec_lib.o
     | [riscv64-unknown-linux-musl-gcc] sample_vdec_testcase.o
     | /oupton/milkv/duo/duo-buildroot-sdk/host-tools/gcc/riscv64-linux-musl-x86_64/bin/../lib/gcc/riscv64-unknown-linux-musl/10.2.0/../../../../riscv64-unknown-linux-musl/bin/ld: /oupton/milkv/duo/duo-buildroot-sdk/middleware/v2/lib/libsys.a(cvi_vb.o): in function `CVI_VB_Init':
     | /root/.jenkins/workspace/v4.1.0_release_build/middleware/v2/modules/sys/src/cvi_vb.c:201: undefined reference to `__atomic_compare_exchange_1'
     | /oupton/milkv/duo/duo-buildroot-sdk/host-tools/gcc/riscv64-linux-musl-x86_64/bin/../lib/gcc/riscv64-unknown-linux-musl/10.2.0/../../../../riscv64-unknown-linux-musl/bin/ld: /oupton/milkv/duo/duo-buildroot-sdk/middleware/v2/lib/libsys.a(cvi_vb.o): in function `CVI_VB_Exit':
     | /root/.jenkins/workspace/v4.1.0_release_build/middleware/v2/modules/sys/src/cvi_vb.c:225: undefined reference to `__atomic_compare_exchange_1'
     | collect2: error: ld returned 1 exit status
     | make[1]: *** [Makefile:78: sample_venc] Error 1
     | make[1]: Leaving directory '/oupton/milkv/duo/duo-buildroot-sdk/middleware/v2/sample/venc'
     | make: *** [Makefile:9: all] Error 1
     | Error: Build board milkv-duo failed
    
    Fix it by ensuring -latomic is passed to the linker.
    Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
    ea730488
Makefile 3.14 KB