I tried to build WebKit using the command `./Tools/Scripts/build-webkit --gtk --debug', but it failed with linking error:
../../lib/libWebCoreGTK.a: could not read symbols: Malformed archive
The size of the file `libWebCoreGTK.a' is 6.3 GiB on FreeBSD, but the file format of GNU ar uses 32-bit interger to store the position of objects, which can only support 4 GiB. There is no problem on GNU/Linux because GNU ar supports thin archive, so the size of archives is smaller than 100 MiB. However, we uses ar from elftoolchain on FreeBSD, which does not support thin archive, causing the file to grow over 4 GiB and generate a wrong symbol table.
FreeBSD ar added support for 64-bit archive several months ago: https://reviews.freebsd.org/D18793.
The patch for 64-bit archive has been backported to FreeBSD 11.3 and 12.1. Since older point releases will go EOL soon, I think we can close this bug now.
JFYI, Windows ports are using OBJECT library for WebCore.
> set(WebCore_LIBRARY_TYPE OBJECT)
See Bug 196866.