Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 624482 - games-emulation/mednafen-0.9.45.1 - emerge fails with PIC enabled
Summary: games-emulation/mednafen-0.9.45.1 - emerge fails with PIC enabled
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-10 17:31 UTC by Scall
Modified: 2017-08-13 12:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,18.36 KB, text/x-log)
2017-07-10 17:31 UTC, Scall
Details

Note You need to log in before you can comment on or make changes to this bug.
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