From bb4f38d0004316f4efd6b54240cf3ce5c4ba4937 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Jan 2023 16:42:44 -0800 Subject: [PATCH] [tests] opencl/convolution: fix linking of libsimx.so Fixes linker error by following suggestion of `/usr/bin/ld: warning: libsimx.so, needed by /scratch/hansung/src/vortex/driver/simx/libvortex.so, not found (try using -rpath or -rpath-link)`. --- tests/opencl/convolution/.depend | 6 ++++++ tests/opencl/convolution/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 tests/opencl/convolution/.depend diff --git a/tests/opencl/convolution/.depend b/tests/opencl/convolution/.depend new file mode 100644 index 00000000..8b87e3b1 --- /dev/null +++ b/tests/opencl/convolution/.depend @@ -0,0 +1,6 @@ +main.o: main.cpp \ + /scratch/hansung/build/vortex-toolchain-prebuilt/pocl/runtime/include/CL/cl.h \ + /scratch/hansung/build/vortex-toolchain-prebuilt/pocl/runtime/include/CL/cl_version.h \ + /scratch/hansung/build/vortex-toolchain-prebuilt/pocl/runtime/include/CL/cl_platform.h \ + utils.h +utils.o: utils.cpp utils.h diff --git a/tests/opencl/convolution/Makefile b/tests/opencl/convolution/Makefile index 6f5aa96e..083aeb36 100644 --- a/tests/opencl/convolution/Makefile +++ b/tests/opencl/convolution/Makefile @@ -17,7 +17,7 @@ CXXFLAGS += -std=c++11 -Wall -Wextra -pedantic -Wfatal-errors CXXFLAGS += -I$(POCL_RT_PATH)/include -LDFLAGS += -L$(POCL_RT_PATH)/lib -L$(VORTEX_DRV_PATH)/simx -lOpenCL -lvortex +LDFLAGS += -L$(POCL_RT_PATH)/lib -L$(VORTEX_DRV_PATH)/simx -Wl,-rpath $(VORTEX_DRV_PATH)/simx -lOpenCL -lvortex # Debugigng ifdef DEBUG