[quake3-bugzilla] [Bug 6429] vm_x86.c inline assembly error on hosts using -fPIC

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Wed Jun 15 18:33:13 EDT 2016


https://bugzilla.icculus.org/show_bug.cgi?id=6429

Simon McVittie <smcv-ioquake3 at pseudorandom.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smcv-ioquake3 at pseudorandom.
                   |                            |co.uk

--- Comment #11 from Simon McVittie <smcv-ioquake3 at pseudorandom.co.uk> ---
(In reply to Mark from comment #0)
> On hardened distros, gcc will be configured to automatically compile code as
> position independent code as part of their hardening toolset.

Which specific "hardened distro" are you using, and how have they configured or
compiled their gcc?

On Debian, many packages (including ioquake3) are compiled as PIE
(position-independent executables) on an opt-in basis, but our gcc does not
(yet) default to producing PIEs.

I believe recent Ubuntu has taken a different approach, where all libraries are
PIC and all executables are PIE unless compiler options are used to opt-out.
Debian toolchain maintainers are also considering this, but haven't done it
yet.

(In reply to Thilo Schulz from comment #10)
> Also, does gcc >= 5.0 -fPIC compile standard ioquake3 (that ioquake3 without
> my newest changes) without errors?

A slightly older ioquake3 snapshot (from January, I think it's 558da252) builds
fine with Debian's approach to producing PIE: -fPIE when compiling objects for
the executable and -fPIE -pie when linking them; -fPIC when compiling objects
for the DLLs and -fPIC -pic when linking them. To achieve this I had to patch
the Makefile to introduce $(NOTSHLIBLDFLAGS) mirroring $(SHLIBLDFLAGS) - I can
send that upstream if there's interest.

This was with gcc 5.3.1, which was current in Debian unstable at the time. I'll
try a newer ioquake3 soon, with our current gcc 5.4.

Complete build logs:
https://buildd.debian.org/status/fetch.php?pkg=ioquake3&arch=i386&ver=1.36%2Bu20160122%2Bdfsg1-2&stamp=1458553671

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/quake3-bugzilla/attachments/20160615/1b7b01be/attachment.html>


More information about the quake3-bugzilla mailing list