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 <james.r.harris@intel.com>
Change-Id: I8ef702b8fbde825a4191d961738ebc605b0aa4c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5675
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Jim Harris 2020-12-22 20:08:05 +00:00 committed by Tomasz Zawadzki
parent 4340de1073
commit c006a8da16

View File

@ -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