[pypy-commit] pypy stmgc-c7: We must also add -fPIC here (building --shared with shadowstack)

arigo noreply at buildbot.pypy.org
Thu Nov 13 15:57:52 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r74506:a923842ee580
Date: 2014-11-13 15:56 +0100
http://bitbucket.org/pypy/pypy/changeset/a923842ee580/

Log:	We must also add -fPIC here (building --shared with shadowstack)

diff --git a/rpython/translator/c/genc.py b/rpython/translator/c/genc.py
--- a/rpython/translator/c/genc.py
+++ b/rpython/translator/c/genc.py
@@ -543,7 +543,10 @@
             if self.translator.platform.name == 'msvc':
                 mk.definition('DEBUGFLAGS', '-MD -Zi')
             else:
-                mk.definition('DEBUGFLAGS', '-O1 -g')
+                if self.config.translation.shared:
+                    mk.definition('DEBUGFLAGS', '-O1 -g -fPIC')
+                else:
+                    mk.definition('DEBUGFLAGS', '-O1 -g')
         if self.translator.platform.name == 'msvc':
             mk.rule('debug_target', 'debugmode_$(DEFAULT_TARGET)', 'rem')
         else:


More information about the pypy-commit mailing list