Bug#895969: webkit2gtk: FTBFS on riscv64 due to not linking against libatomic

Alberto Garcia berto at igalia.com
Tue Apr 24 20:26:36 BST 2018


On Tue, Apr 24, 2018 at 09:18:13PM +0200, Aurelien Jarno wrote:
> > > The correct way to link with -pthread instead of -lpthread is
> > > to use define THREADS_PREFER_PTHREAD_FLAG before importing the
> > > Thread package:
> > 
> > Oh, great, I'll give it a try.

That didn't fix the problem for me, I'm considering to try this
instead:

--- webkitgtk.orig/Source/JavaScriptCore/CMakeLists.txt
+++ webkitgtk/Source/JavaScriptCore/CMakeLists.txt
@@ -120,11 +120,9 @@ set(JavaScriptCore_LIBRARIES
 # __atomic_fetch_add_8 is not available as a compiler intrinsic. It is
 # available on other platforms (including 32-bit Arm), so the link
 # with libatomic is only neede on MIPS.
-if (WTF_CPU_MIPS)
     list(APPEND JavaScriptCore_LIBRARIES
-        -latomic
+        -Wl,--as-needed -Wl,-latomic -Wl,--no-as-needed
     )
-endif ()

> > > I haven't tried the patch for webkit2gtk, but it works
> > > for qtwebkit. In addition I guess it's necessary to add
> > > support for riscv64 in various places of WTF, by defining
> > > WTF_CPU_RISCV64. At least it's the case also for qtwebkit.
> > 
> > webkit has now WTF_CPU_UNKNOWN for cases like this so perhaps we
> > don't need to do anything else.
> 
> Hmm that might work for a first version, but it means that
> USE_JSVALUE32_64 will be used instead of USE_JSVALUE64. And that
> might disable a few features.
> 
> Is that correct?

I don't know, but it's worth checking.

Platform.h suggests that it wouldn't be the case however:

#if __SIZEOF_POINTER__ == 8
#define USE_JSVALUE64 1
#elif __SIZEOF_POINTER__ == 4
#define USE_JSVALUE32_64 1

Berto



More information about the Pkg-webkit-maintainers mailing list