Description: Link the rocm_smi tests as non-PIE to fix the hipcc build
 hipcc (clang) links PIE executables by default, while the PAPI test helper
 library (libtestlib.a) is built non-PIE by gcc in the OpenKylin build
 environment. Linking therefore fails with "relocation R_X86_64_32 against
 `.rodata.str1.8' can not be used when making a PIE object". Pass -no-pie
 to the hipcc link, matching the other (gcc linked) PAPI test binaries.
Author: openKylinBot <openKylinBot@openkylin.top>
Forwarded: not-needed
Last-Update: 2026-09-15
---
--- papi-7.2.0.orig/src/components/rocm_smi/tests/Makefile
+++ papi-7.2.0/src/components/rocm_smi/tests/Makefile
@@ -13,7 +13,7 @@ INCLUDE += -I$(PAPI_ROCM_ROOT)/include/h
 INCLUDE += -I$(PAPI_ROCM_ROOT)/include/hsa
 INCLUDE += -I$(PAPI_ROCM_ROOT)/include/rocprofiler
 INCLUDE += -I$(PAPI_ROCM_ROOT)/include/rocblas
-LDFLAGS = -ldl -g -pthread
+LDFLAGS = -ldl -g -pthread -no-pie
 HIPCFLAGS	= $(filter-out -fcf-protection,$(CFLAGS))
 
 %.o:%.c
