runtime linker on 9.x/i386: clang vs. gcc

Mikhail T. mi+thun at aldan.algebra.com
Mon Oct 14 20:42:33 UTC 2013


10/14/13 4:31 PM, Dimitry Andric ???????(??):
> There is a problem when clang does tail-call optimization on i386 with
> PIC in effect, and it emits GOT relocations for the tail-called
> functions, instead of PLT relocations.  In some scenarios, such as with
> the way X.org does lazy dynamic linking, this can cause problems.  See
> alsohttp://llvm.org/PR15086  (which I unfortunately did not get much
> response on).
Ouch... That seems like a show-stopper for clang-adoption... At least, 
on i386.
> For now, a workaround is to recompile the affected .so files with
> -fno-optimize-sibling-calls (if you are optimizing).
Maybe, our clang (both src/ and ports/) should be compiled with that 
being in effect by default on i386?

    -mi



More information about the freebsd-stable mailing list