[Webkit-unassigned] [Bug 180678] [Linux][JSCOnly] Unable to build JSC fully statically.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 12 00:04:04 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=180678

--- Comment #1 from Konstantin Tokarev <annulen at yandex.ru> ---
Static linking of ICU is somewhat out of scope of WebKit's build system. CMake's find modules will always prefer shared libraries to static if they are found, so to get fully static build you need to force it into using your custom build of ICU via -DCMAKE_PREFIX_PATH (pointing to prefix with static ICU)

To get gcc runtime libraries and libc statically linked you should add -static to compiler flags, i.e. -DCMAKE_C_FLAGS=-static -DCMAKE_CXX_FLAGS=-static

Note that glibc is not really friendly to static linking (e.g. name resolving may be broken unless you find a way to link nss plugins), so you may want to use "-static-libgcc -static-libstdc++" instead of "-static", in this case your binary will work on all Linux systems with same or newer glibc than what you used to build (building on old distro like centos 6 should be enough to cover most users)

Other approach is static linking with alternative libc like uclibc or musl.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171212/07ba4d4b/attachment.html>


More information about the webkit-unassigned mailing list