From c006a8da16a2b83e9903e44c0baf212ae6ed5472 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 22 Dec 2020 20:08:05 +0000 Subject: [PATCH] test/external_code: use -pthread instead of -lpthread -pthread is what SPDK in-tree Makefiles use, so use that in the external_code Makefile too. -pthread can be used both on the compilation and link stages. Signed-off-by: Jim Harris Change-Id: I8ef702b8fbde825a4191d961738ebc605b0aa4c5 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5675 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Aleksey Marchuk --- test/external_code/hello_world/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/external_code/hello_world/Makefile b/test/external_code/hello_world/Makefile index 7512ac759..a75e0681c 100644 --- a/test/external_code/hello_world/Makefile +++ b/test/external_code/hello_world/Makefile @@ -57,14 +57,14 @@ alone_shared_iso: # Shows how to compile an external application against the SPDK archives. alone_static: - $(CC) $(COMMON_CFLAGS) -o hello_bdev ./hello_bdev.c -Wl,--whole-archive,-Bstatic -lspdk_bdev_malloc -lspdk_event_bdev -lspdk_event_accel -lspdk_event_vmd \ + $(CC) $(COMMON_CFLAGS) -o hello_bdev ./hello_bdev.c -pthread -Wl,--whole-archive,-Bstatic -lspdk_bdev_malloc -lspdk_event_bdev -lspdk_event_accel -lspdk_event_vmd \ -lspdk_event_sock -lspdk_bdev -lspdk_accel -lspdk_event -lspdk_thread -lspdk_util -lspdk_conf -lspdk_trace -lspdk_log -lspdk_json \ -lspdk_jsonrpc -lspdk_rpc -lspdk_sock -lspdk_notify -lspdk_vmd \ - $(DPDK_LIB) -Wl,--no-whole-archive,-Bdynamic -lnuma -luuid -lpthread -ldl -lrt + $(DPDK_LIB) -Wl,--no-whole-archive,-Bdynamic -lnuma -luuid -ldl -lrt # Shows how to compile and external bdev and application sgainst the SPDK archives. bdev_static: - $(CC) $(COMMON_CFLAGS) -L../passthru -o hello_bdev ./hello_bdev.c -Wl,--whole-archive,-Bstatic -lpassthru_external -lspdk_bdev_malloc -lspdk_event_bdev \ + $(CC) $(COMMON_CFLAGS) -L../passthru -o hello_bdev ./hello_bdev.c -pthread -Wl,--whole-archive,-Bstatic -lpassthru_external -lspdk_bdev_malloc -lspdk_event_bdev \ -lspdk_event_accel -lspdk_event_vmd -lspdk_event_sock -lspdk_bdev -lspdk_accel -lspdk_event -lspdk_thread -lspdk_util -lspdk_conf -lspdk_trace \ -lspdk_log -lspdk_json -lspdk_jsonrpc -lspdk_rpc -lspdk_sock -lspdk_notify -lspdk_vmd $(DPDK_LIB) \ - -Wl,--no-whole-archive,-Bdynamic -lnuma -luuid -lpthread -ldl -lrt + -Wl,--no-whole-archive,-Bdynamic -lnuma -luuid -ldl -lrt