From 812f5b3a9730605841a4a4cad258f58dfbbaef18 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Sat, 2 Apr 2016 22:32:05 +0530 Subject: [PATCH] Add c++abi to linker options for HCC [ROCm/hip commit: 8e3465f6aed7932089de54c97ac793b2acfda6b5] --- projects/hip/bin/hipcc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/projects/hip/bin/hipcc b/projects/hip/bin/hipcc index 9b10f551f4..289574d8e5 100755 --- a/projects/hip/bin/hipcc +++ b/projects/hip/bin/hipcc @@ -74,8 +74,10 @@ if ($HIP_PLATFORM eq "hcc") { $HIPCXXFLAGS .= " -I$HIP_PATH/include/hcc_detail/cuda"; $HIPCXXFLAGS .= " -I$HSA_PATH/include"; $HIPLDFLAGS = "-hc -L$HCC_HOME/lib -Wl,--rpath=$HCC_HOME/lib -lc++ -ldl -lpthread -Wl,--whole-archive -lmcwamp -Wl,--no-whole-archive"; - # Suppress linker warnings in case HCC distribution contains OpenCL/SPIR symbols - $HIPLDFLAGS .= " -Wl,--defsym=_binary_kernel_spir_end=0 -Wl,--defsym=_binary_kernel_spir_start=0 -Wl,--defsym=_binary_kernel_cl_start=0 -Wl,--defsym=_binary_kernel_cl_end=0"; + # Suppress linker warnings in case HCC distribution contains OpenCL/SPIR symbols + $HIPLDFLAGS .= " -Wl,--defsym=_binary_kernel_spir_end=0 -Wl,--defsym=_binary_kernel_spir_start=0 -Wl,--defsym=_binary_kernel_cl_start=0 -Wl,--defsym=_binary_kernel_cl_end=0"; + # Satisfy HCC dependencies + $HIPLDFLAGS .= " -lc++abi"; $HIPLDFLAGS .= " -L$HSA_PATH/lib -lhsa-runtime64 -lhc_am"; # Add trace marker library: @@ -187,7 +189,7 @@ if ($needHipHcc) { #$HIPLDFLAGS .= " -L/opt/hip/lib -lhip_hcc" ; if ($HIP_USE_SHARED_LIBRARY) { - $HIPLDFLAGS .= " -L$HIP_PATH/lib -Wl,--rpath=$HIP_PATH/lib -lhip_hcc" + $HIPLDFLAGS .= " -L$HIP_PATH/lib -Wl,--rpath=$HIP_PATH/lib -lhip_hcc"; } else { $HIPLDFLAGS .= " $HIP_PATH/lib/device_util.cpp.o $HIP_PATH/lib/hip_device.cpp.o $HIP_PATH/lib/hip_error.cpp.o $HIP_PATH/lib/hip_event.cpp.o $HIP_PATH/lib/hip_hcc.cpp.o $HIP_PATH/lib/hip_memory.cpp.o $HIP_PATH/lib/hip_peer.cpp.o $HIP_PATH/lib/hip_stream.cpp.o $HIP_PATH/lib/staging_buffer.cpp.o"; }