From 8ce8a7ef754f24bc7272b1dd28b12728da302bae Mon Sep 17 00:00:00 2001 From: agodavar Date: Mon, 31 May 2021 02:33:56 -0700 Subject: [PATCH] SWDEV-288510 - Add hip shared library path to run-time search for linker Change-Id: I7eaf712c01556933b881b983a8994f4e06333116 --- samples/2_Cookbook/15_static_library/host_functions/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/2_Cookbook/15_static_library/host_functions/Makefile b/samples/2_Cookbook/15_static_library/host_functions/Makefile index 2bbc26727a..4945075cad 100644 --- a/samples/2_Cookbook/15_static_library/host_functions/Makefile +++ b/samples/2_Cookbook/15_static_library/host_functions/Makefile @@ -25,7 +25,7 @@ $(HIPCC_EXE): $(EMIT_STATIC_LIB) # Compiles hipMain1 with g++ and links with libHipOptLibrary.a which contains host function. $(HOST_EXE): $(EMIT_STATIC_LIB) - $(GXX) $(EMIT_STATIC_MAIN_SRC) -L. -lHipOptLibrary -L$(HIP_PATH)/lib -lamdhip64 -o $@ + $(GXX) $(EMIT_STATIC_MAIN_SRC) -L. -lHipOptLibrary -L$(HIP_PATH)/lib -lamdhip64 -Wl,-rpath=$(HIP_PATH)/lib -o $@ test: $(HIPCC_EXE) $(HOST_EXE) $(HIPCC_EXE)