<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - fix build with gcc link time optimizer"
href="https://bugs.freedesktop.org/show_bug.cgi?id=83669#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - fix build with gcc link time optimizer"
href="https://bugs.freedesktop.org/show_bug.cgi?id=83669">bug 83669</a>
from <span class="vcard"><a class="email" href="mailto:marvin24@gmx.de" title="Marc Dietrich <marvin24@gmx.de>"> <span class="fn">Marc Dietrich</span></a>
</span></b>
<pre>I check with -g -O0 and debug symbols are generated, but I can't tell about
their usefulness. Compiling with --enable-debug fails though because -DDEBUG
seems to do strange things in combination with --enable-glx-tls, but works
without:
CCLD glapi/libglapi.la
/tmp/ccLLavDU.ltrans4.ltrans.o: In function `entry_get_public':
ccLLavDU.ltrans4.o:(.text+0x10): undefined reference to `x86_64_entry_start'
/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../x86_64-suse-linux/bin/ld:
/tmp/ccLLavDU.ltrans4.ltrans.o: relocation R_X86_64_PC32 against undefined
symbol `x86_64_entry_start' can not be used when making a shared object;
recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../x86_64-suse-linux/bin/ld:
final link failed: Bad value
collect2: error: ld returned 1 exit status
The problem mentioned in <a href="show_bug.cgi?id=83669#c7">comment 7</a> (all files are compiled with sse4.1 enabled
using lto) might really exist. See
<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54231">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54231</a>. The recommendation is to
add the target pragma instead of adding linker flags, but I think this is not
portable.
Here is my configuration if anyone wants to try:
COMMON_FLAGS="--prefix=/usr \
--enable-texture-float \
--enable-gles1 \
--enable-gles2 \
--enable-openvg \
--enable-gallium-osmesa \
--enable-dri3 \
--enable-xa \
--enable-xvmc \
--enable-vdpau \
--enable-omx \
--enable-r600-llvm-compiler \
--enable-glx-tls \
--enable-gbm \
--enable-gallium-llvm \
--enable-gallium-gbm \
--enable-gallium-egl \
--with-gallium-drivers=r600,swrast \
--enable-debug \
--with-egl-platforms=drm,x11,wayland \
--with-dri-drivers=no"
./autogen.sh \
$COMMON_FLAGS \
CFLAGS="-march=native -flto -fuse-ld=gold -fuse-linker-plugin" \
CXXFLAGS="-march=native -flto -fuse-ld=gold -fuse-linker-plugin" \
LDFLAGS="-march=native -flto -fuse-ld=gold -fuse-linker-plugin" \
LD="ld.gold" \
AR="gcc-ar-4.9" \
NM="gcc-nm-4.9" \
RANLIB="gcc-ranlib-4.9"</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>