On 2020-08-10, Stuart Henderson <s...@spacehopper.org> wrote: > x11/qt4 > > ld: error: relocation R_386_PC32 cannot be used against symbol cti_vm_throw; > recompile with -fPIC >>>> defined in ../../JavaScriptCore/release/libjscore.a(JITStubs.o) >>>> referenced by JITStubs.cpp >>>> JITStubs.o:(.text+0x21) in archive >>>> ../../JavaScriptCore/release/libjscore.a
We've seen that error before. That was in textproc/wkhtmltopdf, which builds its own included copy of Qt4 WebKit. Back then, removing -ffunction-sections from the compiler flags fixed it. Now the problem is back, in both wkhtmltopdf and qt4, without -ffunction-sections. I thought maybe LLVM 10 had enabled this option by default, but it doesn't look like it. -fno-function-sections also has no effect. I don't understand what's going on. There is a short assembly stub, ctiVMThrowTrampoline(), which CALLs cti_vm_throw(). Somehow that generates an R_386_PC32 relocation, and somehow that is incompatible with PIC. (How can PC-relative addressing be incompatible with position-independent code?) With LLVM 8, there is no callable ctiVMThrowTrampoline() function in the object file, and ctiVMThrowTrampoline's code is inlined... somewhere. -- Christian "naddy" Weisgerber na...@mips.inka.de