Created attachment 308151 [details] build log games-puzzle/gfifteen-0.10.2 fails to compile with the following error: [...] /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../x86_64-pc-linux-gnu/bin/ld: randboard.o: relocation R_X86_64_32S against `gf_bsquare_values' can not be used when making a shared object; recompile with -fPIC randboard.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [gfifteen] Error 1 [...]
Created attachment 308153 [details] emerge --info
gfifteen 1.0 fails the same way. Both work fine with x86_64-pc-linux-gnu-4.6.2-hardenednopie, though.
Created attachment 309445 [details] gfifteen-1.0.2.ebuild (UPDATED EBUILD) The cause of this bug is that the software uses hand-crafted amd64 assembly sources (for optimization) which are not PIC-friendly. Hardened-gentoo requires that object code be PIC. It should be possible to adjust the assembly sources to be PIC-friendly; however, it is a bit of work and is not a high priority at the moment because this software is just a game that doesn't consume much resources anyway. Instead, the upstream code has been adjusted to allow the use of a "--disable-assembly" configure flag, which disables use of the assembly sources (reverting to the more generic code). The source package is available from the project homepage at <https://frigidcode.com/code/gfifteen/gfifteen-1.0.2.tar.gz>. I wasn't quite sure of the proper way to handle this on the Gentoo level. However, I saw that there are several packages in portage which use the "pic" USE flag, such as app-arch/gzip. This flag's description is: disable optimized assembly code that is not PIC friendly So my thought is that we could add the pic flag (disabled by default, but presumably enabled on hardened) to the ebuild. If the pic flag is enabled, then econf uses --disable-assembly. I have attached an ebuild I have tested that does this.
Important note: I just noticed that the new ebuild does not properly configure the package to install as a game. (In the correct directory, etc.) Please have the Gentoo games group adjust the src_configure() so that it does this properly.
bah, over-engineering. assembly optimization is pointless in this application so I just turned it off unconditionally.