<html>
<head>
<base href="https://bugzilla.icculus.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:smcv-ioquake3@pseudorandom.co.uk" title="Simon McVittie <smcv-ioquake3@pseudorandom.co.uk>"> <span class="fn">Simon McVittie</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - vm_x86.c inline assembly error on hosts using -fPIC"
href="https://bugzilla.icculus.org/show_bug.cgi?id=6429">bug 6429</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>smcv-ioquake3@pseudorandom.co.uk
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - vm_x86.c inline assembly error on hosts using -fPIC"
href="https://bugzilla.icculus.org/show_bug.cgi?id=6429#c11">Comment # 11</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - vm_x86.c inline assembly error on hosts using -fPIC"
href="https://bugzilla.icculus.org/show_bug.cgi?id=6429">bug 6429</a>
from <span class="vcard"><a class="email" href="mailto:smcv-ioquake3@pseudorandom.co.uk" title="Simon McVittie <smcv-ioquake3@pseudorandom.co.uk>"> <span class="fn">Simon McVittie</span></a>
</span></b>
<pre>(In reply to Mark from <a href="show_bug.cgi?id=6429#c0">comment #0</a>)
<span class="quote">> On hardened distros, gcc will be configured to automatically compile code as
> position independent code as part of their hardening toolset.</span >
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 <a href="show_bug.cgi?id=6429#c10">comment #10</a>)
<span class="quote">> Also, does gcc >= 5.0 -fPIC compile standard ioquake3 (that ioquake3 without
> my newest changes) without errors?</span >
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:
<a href="https://buildd.debian.org/status/fetch.php?pkg=ioquake3&arch=i386&ver=1.36%2Bu20160122%2Bdfsg1-2&stamp=1458553671">https://buildd.debian.org/status/fetch.php?pkg=ioquake3&arch=i386&ver=1.36%2Bu20160122%2Bdfsg1-2&stamp=1458553671</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>