Suppress linker warnings in case HCC distribution contains OpenCL/SPIR symbols

This commit is contained in:
Jack Chung
2016-02-02 16:27:42 +08:00
parent 861cba6f75
commit 1e7642c569
+2
View File
@@ -66,6 +66,8 @@ if ($HIP_PLATFORM eq "hcc") {
$HIPCXXFLAGS .= " -I$HIP_PATH/include/hcc_detail/cuda";
$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";
$HIPLDFLAGS .= " -L$HSA_PATH/lib -lhsa-runtime64 -lhc_am";
# Add C++ libs for GCC.
$HIPLDFLAGS .= " -lstdc++";