hsakmt-1.0.6-2.20171026git172d101.fc28 builds /usr/lib64/libhsakmt.so.1.0.6 without the Fedora build flags. CFLAGS injection fails: /usr/bin/cc -Dhsakmt_EXPORTS -I/builddir/build/BUILD/ROCT-Thunk-Interface-172d101e103ae1dd6e1ed52aa708b65ba63e386d/include -I/builddir/build/BUILD/ROCT-Thunk-Interface-172d101e103ae1dd6e1ed52aa708b65ba63e386d/src -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -O2 -g -DNDEBUG -fPIC -o CMakeFiles/hsakmt.dir/src/globals.c.o -c /builddir/build/BUILD/ROCT-Thunk-Interface-172d101e103ae1dd6e1ed52aa708b65ba63e386d/src/globals.c LDFLAGS injection does not work either: /usr/bin/cc -fPIC -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -O2 -g -DNDEBUG -Wl,--version-script=/builddir/build/BUILD/ROCT-Thunk-Interface-172d101e103ae1dd6e1ed52aa708b65ba63e386d/src/libhsakmt.ver -Wl,-soname=libhsakmt.so.$(VERSION_MAJOR) -Wl,-z,nodelete -shared -Wl,-soname,libhsakmt.so.1 -o libhsakmt.so.1.0.6 CMakeFiles/hsakmt.dir/src/debug.c.o CMakeFiles/hsakmt.dir/src/events.c.o CMakeFiles/hsakmt.dir/src/fmm.c.o CMakeFiles/hsakmt.dir/src/globals.c.o CMakeFiles/hsakmt.dir/src/libhsakmt.c.o CMakeFiles/hsakmt.dir/src/memory.c.o CMakeFiles/hsakmt.dir/src/openclose.c.o CMakeFiles/hsakmt.dir/src/perfctr.c.o CMakeFiles/hsakmt.dir/src/pmc_table.c.o CMakeFiles/hsakmt.dir/src/queues.c.o CMakeFiles/hsakmt.dir/src/time.c.o CMakeFiles/hsakmt.dir/src/topology.c.o CMakeFiles/hsakmt.dir/src/version.c.o -lpthread -lrt -lpci I assume this is because CMAKE_C_FLAGS and CMAKE_SHARED_LINKER_FLAGS are overridden in CMakeLists.txt.
Fixed in hsakmt-1.0.6-4.20171026git172d101.fc28.