Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ Notes:

* Some users may prefer to use a CMake GUI frontend, such as `cmake-gui` or `ccmake`, vs. the command-line CMake.

### Building on QNX

QNX is using its own build system. The proper build environment must be set
under the QNX host development system (Linux, Win64, MacOS) by invoking
the shell/batch script provided with QNX installation. Current building environment
under the "build-qnx" supports QNX SDP 7.0, QNX SDP 7.1 and upcoming QNX SDP 7.2.

## OpenCL ICD Loader Tests

OpenCL ICD Loader Tests can be run using `ctest`, which is a companion to CMake.
Expand Down
1 change: 1 addition & 0 deletions build-qnx/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include recurse.mk
2 changes: 2 additions & 0 deletions build-qnx/driver_stub/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
LIST=OS
include recurse.mk
33 changes: 33 additions & 0 deletions build-qnx/driver_stub/common.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

define PINFO
PINFO DESCRIPTION = "OpenCL Driver Stub"
endef

ICD_ROOT=$(CURDIR)/../../../../..

EXTRA_INCVPATH+=$(ICD_ROOT)/inc
EXTRA_INCVPATH+=$(ICD_ROOT)/test/inc

EXTRA_SRCVPATH+=$(ICD_ROOT)/test/driver_stub
EXTRA_SRCVPATH+=$(ICD_ROOT)/test/log

NAME=libOpenCLDriverStub

# Make the library

SRCS = cl.c cl_ext.c cl_gl.c icd.c icd_test_log.c

LDFLAGS += -Wl,--unresolved-symbols=report-all -Wl,--no-undefined -Wl,-fPIC

include $(MKFILES_ROOT)/qtargets.mk

CCFLAGS += -DCL_ENABLE_LAYERS -DCL_TARGET_OPENCL_VERSION=300 -DOpenCLDriverStub_EXPORTS
CCFLAGS += -fPIC -std=gnu99

CXXFLAGS += $(CCFLAGS)

INSTALLDIR=usr/lib
8 changes: 8 additions & 0 deletions build-qnx/driver_stub/nto/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=CPU
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
8 changes: 8 additions & 0 deletions build-qnx/driver_stub/nto/aarch64/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=VARIANT
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
1 change: 1 addition & 0 deletions build-qnx/driver_stub/nto/aarch64/dll.le/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../common.mk
8 changes: 8 additions & 0 deletions build-qnx/driver_stub/nto/arm/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=VARIANT
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
1 change: 1 addition & 0 deletions build-qnx/driver_stub/nto/arm/dll.le.v7/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../common.mk
8 changes: 8 additions & 0 deletions build-qnx/driver_stub/nto/x86_64/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=VARIANT
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
1 change: 1 addition & 0 deletions build-qnx/driver_stub/nto/x86_64/dll/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../common.mk
2 changes: 2 additions & 0 deletions build-qnx/icd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
LIST=OS
include recurse.mk
35 changes: 35 additions & 0 deletions build-qnx/icd/common.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

define PINFO
PINFO DESCRIPTION = "OpenCL ICD Loader"
endef

ICD_ROOT=$(CURDIR)/../../../../..

EXTRA_INCVPATH+=$(ICD_ROOT)/build_qnx
EXTRA_INCVPATH+=$(ICD_ROOT)/inc

EXTRA_SRCVPATH+=$(ICD_ROOT)/loader
EXTRA_SRCVPATH+=$(ICD_ROOT)/loader/linux

SO_VERSION=1
NAME=OpenCL

# Make the library

SRCS = icd.c icd_dispatch.c icd_dispatch_generated.c icd_linux.c icd_linux_envvars.c

LDFLAGS += -Wl,--unresolved-symbols=report-all -Wl,--no-undefined -Wl,-fPIC
LDFLAGS += -Wl,--version-script -Wl,$(ICD_ROOT)/loader/linux/icd_exports.map

include $(MKFILES_ROOT)/qtargets.mk

CCFLAGS += -DCL_ENABLE_LAYERS -DCL_TARGET_OPENCL_VERSION=300 -DOpenCL_EXPORTS
CCFLAGS += -fPIC -std=gnu99

CXXFLAGS += $(CCFLAGS)

INSTALLDIR=usr/lib
2 changes: 2 additions & 0 deletions build-qnx/icd/icd_cmake_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* #undef HAVE_SECURE_GETENV */
/* #undef HAVE___SECURE_GETENV */
8 changes: 8 additions & 0 deletions build-qnx/icd/nto/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=CPU
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
8 changes: 8 additions & 0 deletions build-qnx/icd/nto/aarch64/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=VARIANT
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
1 change: 1 addition & 0 deletions build-qnx/icd/nto/aarch64/so.le/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../common.mk
8 changes: 8 additions & 0 deletions build-qnx/icd/nto/arm/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=VARIANT
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
1 change: 1 addition & 0 deletions build-qnx/icd/nto/arm/so.le.v7/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../common.mk
8 changes: 8 additions & 0 deletions build-qnx/icd/nto/x86_64/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=VARIANT
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
1 change: 1 addition & 0 deletions build-qnx/icd/nto/x86_64/so/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../common.mk
2 changes: 2 additions & 0 deletions build-qnx/icd_loader_test/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
LIST=OS
include recurse.mk
35 changes: 35 additions & 0 deletions build-qnx/icd_loader_test/common.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

define PINFO
PINFO DESCRIPTION = "ICD Loader Test"
endef

ICD_ROOT=$(CURDIR)/../../../../..

EXTRA_INCVPATH+=$(ICD_ROOT)/inc
EXTRA_INCVPATH+=$(ICD_ROOT)/test/inc

EXTRA_SRCVPATH+=$(ICD_ROOT)/test/loader_test
EXTRA_SRCVPATH+=$(ICD_ROOT)/test/log

NAME=icd_loader_test

# Make the library

SRCS = test_kernel.c main.c test_platforms.c icd_test_match.c test_program_objects.c \
test_sampler_objects.c test_buffer_object.c test_cl_runtime.c callbacks.c \
test_create_calls.c test_clgl.c test_image_objects.c icd_test_log.c

include $(MKFILES_ROOT)/qtargets.mk

CCFLAGS += -DCL_ENABLE_LAYERS -DCL_TARGET_OPENCL_VERSION=300
CCFLAGS += -std=gnu99

CXXFLAGS += $(CCFLAGS)

LIBS += OpenCL

INSTALLDIR=usr/bin
1 change: 1 addition & 0 deletions build-qnx/icd_loader_test/icd_loader_test.use
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
icd_loader_test - ICD Loader Test
8 changes: 8 additions & 0 deletions build-qnx/icd_loader_test/nto/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=CPU
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
8 changes: 8 additions & 0 deletions build-qnx/icd_loader_test/nto/aarch64/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=VARIANT
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
1 change: 1 addition & 0 deletions build-qnx/icd_loader_test/nto/aarch64/o.le/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../common.mk
8 changes: 8 additions & 0 deletions build-qnx/icd_loader_test/nto/arm/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=VARIANT
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
1 change: 1 addition & 0 deletions build-qnx/icd_loader_test/nto/arm/o.le.v7/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../common.mk
8 changes: 8 additions & 0 deletions build-qnx/icd_loader_test/nto/x86_64/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=VARIANT
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
1 change: 1 addition & 0 deletions build-qnx/icd_loader_test/nto/x86_64/o/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../common.mk
2 changes: 2 additions & 0 deletions build-qnx/layer/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
LIST=OS
include recurse.mk
35 changes: 35 additions & 0 deletions build-qnx/layer/common.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

define PINFO
PINFO DESCRIPTION = "OpenCL Layer Print Test"
endef

ICD_ROOT=$(CURDIR)/../../../../..

EXTRA_INCVPATH+=$(ICD_ROOT)/inc
#EXTRA_INCVPATH+=$(ICD_ROOT)/test/inc

EXTRA_SRCVPATH+=$(ICD_ROOT)/test/layer
#EXTRA_SRCVPATH+=$(ICD_ROOT)/test/log

NAME=libPrintLayer

# Make the library

SRCS = icd_print_layer.c icd_print_layer_generated.c

LDFLAGS += -Wl,--unresolved-symbols=report-all -Wl,--no-undefined -Wl,-fPIC
LDFLAGS += -Wl,--version-script -Wl,$(ICD_ROOT)/test/layer/icd_print_layer.map
LDFLAGS += -fvisibility=default

include $(MKFILES_ROOT)/qtargets.mk

CCFLAGS += -DCL_ENABLE_LAYERS -DCL_TARGET_OPENCL_VERSION=300 -DPrintLayer_EXPORTS
CCFLAGS += -fPIC -std=gnu99

CXXFLAGS += $(CCFLAGS)

INSTALLDIR=usr/lib
8 changes: 8 additions & 0 deletions build-qnx/layer/nto/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=CPU
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
8 changes: 8 additions & 0 deletions build-qnx/layer/nto/aarch64/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=VARIANT
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
1 change: 1 addition & 0 deletions build-qnx/layer/nto/aarch64/dll.le/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../common.mk
8 changes: 8 additions & 0 deletions build-qnx/layer/nto/arm/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=VARIANT
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
1 change: 1 addition & 0 deletions build-qnx/layer/nto/arm/dll.le.v7/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../common.mk
8 changes: 8 additions & 0 deletions build-qnx/layer/nto/x86_64/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LIST=VARIANT
ifndef QRECURSE
QRECURSE=recurse.mk
ifdef QCONFIG
QRDIR=$(dir $(QCONFIG))
endif
endif
include $(QRDIR)$(QRECURSE)
1 change: 1 addition & 0 deletions build-qnx/layer/nto/x86_64/dll/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../common.mk
2 changes: 1 addition & 1 deletion loader/icd_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef _ICD_PLATFORM_H_
#define _ICD_PLATFORM_H_

#if defined(__linux__) || defined(__APPLE__)
#if defined(__linux__) || defined(__APPLE__) || defined(__QNXNTO__)

#define PATH_SEPARATOR ':'
#define DIRECTORY_SYMBOL '/'
Expand Down
Loading