| 1 |
#!/usr/bin/make -f |
| 2 |
export CXX=hipcc |
| 3 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto |
| 4 |
export DEB_CXXFLAGS_MAINT_PREPEND = -gz |
| 5 |
export VERBOSE=1 |
| 6 |
|
| 7 |
# filter incompatible options from affecting device code |
| 8 |
CXXFLAGS := $(subst -fstack-protector-strong,-Xarch_host -fstack-protector-strong,$(CXXFLAGS)) |
| 9 |
CXXFLAGS := $(subst -fcf-protection,-Xarch_host -fcf-protection,$(CXXFLAGS)) |
| 10 |
|
| 11 |
CMAKE_FLAGS = \ |
| 12 |
-DCMAKE_BUILD_TYPE=Release \ |
| 13 |
-DCMAKE_SKIP_INSTALL_RPATH=ON \ |
| 14 |
-DROCM_SYMLINK_LIBS=OFF \ |
| 15 |
-DGPU_TARGETS="$(shell rocm-target-arch --sep ';')" \ |
| 16 |
-DBUILD_CLIENTS_TESTS_OPENMP=OFF |
| 17 |
|
| 18 |
# The hipfft test client requires the rocfft sources to build. |
| 19 |
ifeq (,$(filter nocheck,$(DEB_BUILD_PROFILES))) |
| 20 |
CMAKE_FLAGS += -DBUILD_CLIENTS_TESTS=ON \ |
| 21 |
-DUSE_HIPRAND=OFF |
| 22 |
endif |
| 23 |
|
| 24 |
%: |
| 25 |
dh $@ |
| 26 |
|
| 27 |
override_dh_auto_configure-arch: |
| 28 |
dh_auto_configure -- $(CMAKE_FLAGS) |
| 29 |
|
| 30 |
override_dh_auto_test-arch: |
| 31 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 32 |
set -e \ |
| 33 |
; if [ -r /dev/kfd ] \ |
| 34 |
; then obj-$(DEB_HOST_GNU_TYPE)/clients/staging/hipfft-test \ |
| 35 |
; else echo "W: /dev/kfd unreadable: no available AMD GPU." \ |
| 36 |
; echo "W: tests skipped." \ |
| 37 |
; fi |
| 38 |
endif |
| 39 |
|
| 40 |
override_dh_auto_configure-indep: |
| 41 |
: |
| 42 |
|
| 43 |
override_dh_auto_build-indep: |
| 44 |
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) |
| 45 |
http_proxy='127.0.0.1:9' \ |
| 46 |
https_proxy='127.0.0.1:9' \ |
| 47 |
ROCM_DOCS_REMOTE_DETAILS=http://localhost,local \ |
| 48 |
latest_version= \ |
| 49 |
release_candidate= \ |
| 50 |
sphinx-build -b html docs html |
| 51 |
endif |
| 52 |
|
| 53 |
override_dh_auto_test-indep: |
| 54 |
: |
| 55 |
|
| 56 |
override_dh_auto_install-indep: |
| 57 |
: |
| 58 |
|
| 59 |
# dwz doesn't fully support DWARF-5 yet, see #1016936 |
| 60 |
override_dh_dwz: |
| 61 |
: |
| 62 |
|
| 63 |
override_dh_gencontrol: |
| 64 |
dh_gencontrol -- -Vrocm:GPU-Architecture="$(shell rocm-target-arch)" |