I've been trying to package the HSA kernel bits for Gentoo. Git checkout of v.0.8 / kernel 3.14.11 (?)
Building the kernel from source I run into this failure:
make[3]: 'arch/x86/realmode/rm/realmode.bin' is up to date.
GZIP kernel/config_data.gz
CHK kernel/config_data.h
LD drivers/gpu/hsa/radeon/radeon_kfd.o
drivers/gpu/hsa/radeon/kfd_device.o: In function `lower_32':
kfd_device.c:(.text+0x1f): multiple definition of `lower_32'
drivers/gpu/hsa/radeon/kfd_module.o:(.text+0x22): first defined here
drivers/gpu/hsa/radeon/kfd_device.o: In function `upper_32':
kfd_device.c:(.text+0x27): multiple definition of `upper_32'
drivers/gpu/hsa/radeon/kfd_module.o:(.text+0x2a): first defined here
drivers/gpu/hsa/radeon/kfd_chardev.o: In function `lower_32':
kfd_chardev.c:(.text+0x101e): multiple definition of `lower_32'
drivers/gpu/hsa/radeon/kfd_module.o:(.text+0x22): first defined here
drivers/gpu/hsa/radeon/kfd_chardev.o: In function `upper_32':
kfd_chardev.c:(.text+0x1026): multiple definition of `upper_32'
drivers/gpu/hsa/radeon/kfd_module.o:(.text+0x2a): first defined here
drivers/gpu/hsa/radeon/kfd_pasid.o: In function `lower_32':
[snip]
cik_event_interrupt.c:(.text+0x5a): multiple definition of `upper_32'
drivers/gpu/hsa/radeon/kfd_module.o:(.text+0x2a): first defined here
scripts/Makefile.build:444: recipe for target
'drivers/gpu/hsa/radeon/radeon_kfd.o' failed
make[4]: *** [drivers/gpu/hsa/radeon/radeon_kfd.o] Error 1
This happens both with gcc 4.7.4 and gcc 4.8.3.