Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 624482

Summary: games-emulation/mednafen-0.9.45.1 - emerge fails with PIC enabled
Product: Gentoo Linux Reporter: Scall <scall>
Component: Current packagesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: major CC: jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Scall 2017-07-10 17:31:28 UTC
Created attachment 482916 [details]
build.log

I tried to emerge the latest mednafen version on my x86 hardened box, but it failed because of these lines in src/types.h:

#if defined(__PIC__) || defined(__pic__) || defined(__PIE__) || defined(__pie__)
 #if defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) //|| (SIZEOF_VOID_P <= 4)
  #error "Compiling with position-independent code generation enabled is not recommended, for performance reasons."

Changing the “#error” to a “#warning” would solve the issue. E.g.:
sed -i 's/#error \("Compiling with.*is not recommended\)/#warning \1/' src/types.h || die
Comment 1 David Seifert gentoo-dev 2017-08-13 12:37:15 UTC
commit 4c63abe9dafbe211dfc940bc06dfe9df77b83482
Author: David Seifert <soap@gentoo.org>
Date:   Sun Aug 13 14:35:55 2017 +0200

    games-emulation/mednafen: Version bump to 0.9.46
    
    * Also remove the annoying PIC checks
    
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=624482