FreeBSD Port: www/webkit2-gtk3
Robin Seggelmann
robin at seggelmann.com
Fri Aug 18 14:59:10 UTC 2017
Hi,
I’m trying to build webkit2-gtk3 as a dependency for thunar on FreeBSD 10.3 on a PowerPC G4, but came across a compilation error I’d like to report:
Source/JavaScriptCore/heap/MachineStackMarker.cpp: In function 'void pthreadSignalHandlerSuspendResume(int, siginfo_t*, void*)':
Source/JavaScriptCore/heap/MachineStackMarker.cpp:92:69: error: 'mcontext_t {aka struct __mcontext}' has no member named 'uc_regs'
threadData->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
^
ninja: build stopped: subcommand failed.
The section in MachineStackMarker.cpp:
ucontext_t* userContext = static_cast<ucontext_t*>(ucontext);
#if CPU(PPC)
threadData->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
#else
threadData->suspendedMachineContext = userContext->uc_mcontext;
#endif
There is an exception for PowerPC to use uc_regs, which is not declared on PowerPC, so this does not make much sense:
*
* $NetBSD: signal.h,v 1.4 1998/09/14 02:48:34 thorpej Exp $
* $FreeBSD: releng/10.3/sys/powerpc/include/ucontext.h 234542 2012-04-21 14:39:47Z nwhitehorn $
*/
#ifndef _MACHINE_UCONTEXT_H_
#define _MACHINE_UCONTEXT_H_
typedef struct __mcontext {
int mc_vers;
int mc_flags;
#define _MC_FP_VALID 0x01
#define _MC_AV_VALID 0x02
int mc_onstack; /* saved onstack flag */
int mc_len; /* sizeof(__mcontext) */
uint64_t mc_avec[32*2]; /* vector register file */
uint32_t mc_av[2];
register_t mc_frame[42];
uint64_t mc_fpreg[33];
} mcontext_t __aligned(16);
This definition also didn’t change in more recent versions of FreeBSD, CURRENT is still the same. The following fixes the error, so the build can continue. This shouldn’t affect functionality, although I don’t really know the code.
--- work/webkitgtk-2.16.6/Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig 2017-08-18 12:43:08.231918000 +0200
+++ work/webkitgtk-2.16.6/Source/JavaScriptCore/heap/MachineStackMarker.cpp 2017-08-18 12:43:38.689274000 +0200
@@ -88,11 +88,7 @@
}
ucontext_t* userContext = static_cast<ucontext_t*>(ucontext);
-#if CPU(PPC)
- threadData->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
-#else
threadData->suspendedMachineContext = userContext->uc_mcontext;
-#endif
// Allow suspend caller to see that this thread is suspended.
// sem_post is async-signal-safe function. It means that we can call this from a signal handler.
Best regards,
Robin
More information about the freebsd-gnome
mailing list