Skip to content

Commit 255750b

Browse files
Adding -pthread flag for linking issues into CMakeLists.txt and src/Makefile (ROCm#31)
1 parent 3fbd328 commit 255750b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎CMakeLists.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# ########################################################################
22
# Copyright 2022 Advanced Micro Devices, Inc.
33
# ########################################################################
4+
#Adding pthread flag for linking
5+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
46

57
cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR)
68

‎src/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ HIPCUFLAGS += -I$(ROCM_PATH)/include
2727
HIPCUFLAGS += -I$(ROCM_PATH)/include/rccl
2828
HIPCUFLAGS += -I$(ROCM_PATH)/hip/include/hip
2929
LDFLAGS += -L$(ROCM_PATH)/lib -lhsa-runtime64 -lrt
30-
HIPLDFLAGS += $(CUSTOM_RCCL_LIB) -L$(ROCM_PATH)/lib -lhsa-runtime64 -lrt
30+
HIPLDFLAGS += $(CUSTOM_RCCL_LIB) -L$(ROCM_PATH)/lib -lhsa-runtime64 -lrt -pthread
3131

3232
ifeq ($(DEBUG), 0)
3333
HIPCUFLAGS += -O3

0 commit comments

Comments
 (0)