Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardened builds on Fedora 23+ fail #270

Open
belegdol opened this issue Jun 2, 2016 · 3 comments
Open

Hardened builds on Fedora 23+ fail #270

belegdol opened this issue Jun 2, 2016 · 3 comments

Comments

@belegdol
Copy link

belegdol commented Jun 2, 2016

Fedora 23 and above require all packages to use position-independent code [1]. As a result, yabause does not build anymore:

/usr/bin/ld: CMakeFiles/yabause.dir/sh2_dynarec/linkage_x64.s.o: relocation R_X86_64_32S against `master_ip' can not be used when making a shared object; recompile with -fPIC

or, in static libs mode (-DBUILD_SHARED_LIBS:BOOL=OFF)

/usr/bin/ld: ../libyabause.a(linkage_x64.s.o): relocation R_X86_64_32S against `master_ip' can not be used when making a shared object; recompile with -fPIC

The problem is that linkage_x64.s.o is assembled, not compiled, which means that it cannot be recompiled with -fPIC. According to a few stack overflow posts, assembly code needs to be written to be position-independent.

@Guillaumito
Copy link
Contributor

Yeah, that's a problem with the dynarec... and there's no one maintaining this part of the code, so you'll have to disable it using the SH2_DYNAREC CMake variable. Something like:

cmake -DSH2_DYNAREC=OFF ...

@belegdol
Copy link
Author

belegdol commented Jun 2, 2016

Thank you for the prompt answer! What would the performance hit be without the dynarec? I managed to work the issue around by disabling the hardening but if this code is not maintained it can clearly take time until it's fixed

@d356
Copy link
Contributor

d356 commented Jun 22, 2016

On my system running the bios the difference is about 105 fps -> 89 fps.

gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Jul 15, 2018
Drop games.eclass.

Make USE=qt5 default per upstream recommendation.

Disabling SH2_DYNAREC due to being broken, see also:
Yabause/yabause#270

Thanks-to: Samuel BAUER <BM-2cTVBXjxdVtEQCycBQjMxszLsgTNVujvM5@bitmessage.ch>
Bug: https://bugs.gentoo.org/582326
Closes: https://bugs.gentoo.org/654674
Closes: https://bugs.gentoo.org/660458
Package-Manager: Portage-2.3.42, Repoman-2.3.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants